-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instead of copyDir(fustion, stdlib/lib), update --path #25
Comments
Because Nim packaging is currently semi-compatible with the FHS and I do not want to make it worse. Adding paths relative to In the future I'll write an RFC for a formal file system layout for Nim so that additions like this can be simplified and maybe we can then use |
how does that interact with eg, after |
As usual, user paths come first. If you want to use std fusion, |
this might need to be thought through |
The search will work like every other stdlib things... If user installed version is not found, use stdlib.
Yes, as usual. All of these concerns apply for basically any other stdlib stuff. fusion is nothing special here. If we want to employ nimble path for fusion, we would still need support within nimble itself, or user's packages won't build when they use fusion because nimble will clear all paths, and if you add |
I think that's a recipie for a lot of problems down the road, for several reasons:
why not instead the following: fusion is default installed (with either
this guarantees that there's only fusion used; in particular in the common case where user has installed fusion via nimble install fusion, there would be no clash. |
This rarely happens, and all it would take to solve this is to practice proper import hygiene within the project, as with all nimble packages.
This is too magical. I imagine fusion to be a bundled nimble package. It should not receive any special import treatment. This is currently not the case, but once nimble have support for multiple nimble directory we can implement fusion in that direction. |
it's not so rare, I've seen it many times, eg:
The problem is the current import semantics are not ideal for relative paths, eg: import mypkg/foo # likely incorrect if the importing file is within mypkg (violates import hygiene)
import ./[foo,bar] # not supported (it's a wontfix github issue IIRC)
import "."/[foo,bar] # uglier
import foo, bar
# big downside: impossible to tell from reading this source file whether this points to a relative path or uses pkg/foo/bar
# this is also a source of bugs when things move around, with refactorings etc
import ../../path/to/baz # this is hard to write, and brittle if things move around I'd be like to propose the following import syntax which would solve those issues: # example:
import this/sub/foo # this resolves to /pathto/fusion/src/fusion/sub/foo.nim anywhere inside /pathto/fusion/ where /pathto/fusion/fusion.nimble is defined
can you elaborate on this or give a link where |
I wouldn't be against that but it appears to be unrelated to fusion and more about nimble packages instead. I assume that you will formulate a proper RFC for the nim-lang/RFCs repo?
|
yes |
wondering if new nimbledeps fits the bill:
|
It doesn't. |
@alaviss
continuation of #22 (comment) to avoid mingling unrelated topics
NIMBLE_DIR=pathto/Nim/dist
work?--path:dist/fusion/src
to Nim/config/nim.cfg ?if the sources are there it'll pick them up, else, it will be a noop
The text was updated successfully, but these errors were encountered: