@aleitch020 i will give namespaces a try even though it sounds like using a cannonball to kill a fly. I would expect something like a define/opaque
or something would do but since we are in racket I guess I could always write a macro or something. Thanks.
Is there a way to override pkg versions specified in the deps info.rkt
for testing purposes. For example, for production I use version x of pkg P
and I have in deps ["P" #:version "x"]
, however, how can I override this for testing my package against several versions of P
? Any suggestions?
@mflatt What is the difference between using local-expand
with #f
as the stop list and (kernel-form-identifier-list)
as the stop list? The only difference I can immediately discover via experimentation is that the latter introduces #%app
wrappers and expands them if they’re not #%plain-app
, but I’m not sure if anything else differs.
The 2nd & 4th paragraphs of the docs for local-expand
try to explain this
@lexi.lambda… or (list #'lambda)
as the stop list, since that’s implicitly expanded to (kernel-form-identifier-list)
. Although there’s the #%app
difference, I think there’s not a deep difference, and it’s just that we arrived at the same behavior from two different directions. (Originally, a non-empty stop list was not implicitly expanded.)
@mflatt On that note, could you explain why a non-empty stop list is expanded? I always figured there was some deep reason with respect to expansion order, but I’m not sure if that’s actually true anymore.
I don’t think it’s true anymore, either. The deep reason with marks+renames was that re-expansion of a binding form doesn’t work unless you expand all potential references to remove extra marks. Scope sets don’t have that problem, and we’ve just never taken the step of adding back the ability to expand more selectively.
Interesting, thanks! I still don’t really understand the marks+renames model.
@pocmatos For constraining variable references, a macro that uses free-vars
from syntax/free-vars
might do what you want. For the package issue, does it work to install with --force
to ignore the version requirement?
@pocmatos to follow up on free-vars
, note that that only finds lexical variable references, not imports, but could be extended to track those fairly easily
@samth It looks like Vincent added a #:module-bound?
option a couple of years ago
Indeed. I should keep up with the times!
@mflatt thanks or the free-vars
suggestion, this might be exactly what I need.
@mflatt with regards to force, I am just not sure how I can force a specific version, for example, version 1.1 of package foo. raco pkg update --force foo==1.1
doesn’t work.