Skip to content
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

nimble (install|build) --skipdeps to install|build but skipping checking dependencies #589

Open
timotheecour opened this issue Nov 29, 2018 · 9 comments

Comments

@timotheecour
Copy link
Member

timotheecour commented Nov 29, 2018

when developping a project, after a successful nimble install or nimble build it's wasteful to keep checking all dependencies (especially when there are a lot); a flag

nimble install --skipdeps
nimble build --skipdeps

would just do the install part, skipping the Verifying dependencies for foo@ver part

@timotheecour timotheecour changed the title nimble install --skipdeps to install but skipping checking dependencies nimble (install|build) --skipdeps to install but skipping checking dependencies Nov 29, 2018
@timotheecour timotheecour changed the title nimble (install|build) --skipdeps to install but skipping checking dependencies nimble (install|build) --skipdeps to install|build but skipping checking dependencies Nov 29, 2018
@dom96
Copy link
Collaborator

dom96 commented Nov 30, 2018

when developing a project you should use nimble develop

@timotheecour
Copy link
Member Author

even for nimble develop the problem still holds:

git clone https://github.com/genotrance/nimterop/
cd nimterop
nimble develop
nimble build # takes majority of time in Verifying dependencies for XXX
nimble build --skipdeps # this is what I'd like

@dom96
Copy link
Collaborator

dom96 commented Nov 30, 2018

Are you running a debug build of Nimble? That usually causes lots of slowness. Check by running nimble blahblah

@timotheecour
Copy link
Member Author

Are you running a debug build of Nimble?

not super sure; here's the output you asked:

nimble blahblah
       Tip: 1 messages have been suppressed, use --verbose to show them.
     Error: Specified directory (/Users/timothee/git_clone/nim/vitanim/testcases/tests) does not contain a .nimble file.

as for slowness: some packages have lots of (recursive) dependencies, so majority time is spent on handling the dependencies as opposed to the actual build action

when user already processed the dependencies successfully (and hasn't updated them in requires section), user may want this flag --skipdeps to avoid wasting computation time

@dom96
Copy link
Collaborator

dom96 commented Nov 30, 2018

Looks like you don't have a debug build (You would see a stack trace with the error output by Nimble).

I would prefer to make the dependency resolution faster rather than expect users to learn various flags like this.

@GULPF
Copy link
Member

GULPF commented Nov 30, 2018

Wouldn't lockfiles solve this as well?

@timotheecour
Copy link
Member Author

timotheecour commented Nov 30, 2018

/cc @dom96

I would prefer to make the dependency resolution faster rather than expect users to learn various flags like this.

making it faster would be nice, but is likely more effort, and I doubt it can ever be as fast as just skipping it (or even close to that);

  • furthermore, it'll be a logical thing to have given we also have:
    [-d, --depsOnly] Install only dependencies.

  • nimble's D analog, dub, has a similar flag; --nodeps Do not resolve missing dependencies before building

/cc @GULPF what do you mean, can you elaborate (or give a link to issue?)

@GULPF
Copy link
Member

GULPF commented Nov 30, 2018

@timotheecour See #127. With a lockfile, the dependencies would only be resolved once (until the dependencies are changed). After that, the lockfile will indicate which packages & versions are required.

@timotheecour
Copy link
Member Author

ok, makes sense, if #127 is implemented I'm happy to close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants