pocmatos
2018-1-24 08:47:45

@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.


pocmatos
2018-1-24 10:53:28

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?


lexi.lambda
2018-1-24 17:56:10

@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.


ben
2018-1-24 18:03:27

The 2nd & 4th paragraphs of the docs for local-expand try to explain this


mflatt
2018-1-24 19:14:22

@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.)


lexi.lambda
2018-1-24 19:22:03

@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.


mflatt
2018-1-24 19:24:18

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.


lexi.lambda
2018-1-24 19:26:46

Interesting, thanks! I still don’t really understand the marks+renames model.


mflatt
2018-1-24 20:49:08

@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?


samth
2018-1-24 20:50:21

@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


mflatt
2018-1-24 20:53:04

@samth It looks like Vincent added a #:module-bound? option a couple of years ago


samth
2018-1-24 21:00:04

Indeed. I should keep up with the times!


pocmatos
2018-1-25 07:37:34

@mflatt thanks or the free-vars suggestion, this might be exactly what I need.


pocmatos
2018-1-25 07:54:12

@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.