macocio
2018-11-18 14:29:52

Any way to require a file relative to the current package’s root?


soegaard2
2018-11-18 14:30:43

If your package is named foo, then foo/bar ?


macocio
2018-11-18 14:31:15

Or PWD?


soegaard2
2018-11-18 14:31:59

I don’t think you can use current-directory in requires.


macocio
2018-11-18 15:42:33

Is there any way to subpackage collections?


soegaard2
2018-11-18 15:43:03

You can have multiple collections in a package.


macocio
2018-11-18 15:43:47

I mean, I have a program and I’d like to have a utils package for it, but not install it as something “outside” of this program, I’d like to keep it inside the program, but I also don’t want "../../../utils/utils.rkt" in my requires


macocio
2018-11-18 15:48:16

Oh now I understand @soegaard2, I could use my-program/utils or something… that’d work actually :smile:


macocio
2018-11-18 15:48:55

But what if I have git worktrees for different branches, how will this work? Will I need different pkg names for each branch?


macocio
2018-11-18 15:49:26

I guess what I’d like to see is a virtualenv (like for python) or something


soegaard2
2018-11-18 15:51:12

Haven’t had to deal with multiple gittrees. If you install your development packages using the link command, then what-ever branch is currently checked out will be used.


macocio
2018-11-18 15:52:07

With git worktrees we can check out multiple branches, @soegaard2. If I only had 1 checked out branch it’d work fine


macocio
2018-11-18 15:54:39

Maybe a solution is to change the link when switch to another worktree


soegaard2
2018-11-18 15:55:26

Could work if you script it.


macocio
2018-11-18 15:57:57

Perhaps it’s not a big issue in Racket


macocio
2018-11-18 15:58:12

At work I need the worktrees due to code generation, but in Racket that’s done with macros…


macocio
2018-11-18 15:58:29

However, precompiled files could be useful when using worktrees in racket


soegaard2
2018-11-18 16:04:52

I see what you mean.