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

Developping two local packages (binary and library) simultaneously #1165

Open
Cornichon622 opened this issue Dec 3, 2023 · 2 comments
Open

Comments

@Cornichon622
Copy link

Cornichon622 commented Dec 3, 2023

I'd like to develop a library and a binary which uses this library, each in their directory/package, at the same time.

From Nimble's readme, I see multiple solutions:

  • using nimble install every time I make a change to my library, which is not practical at all for a tight feedback loop.
  • using nimble develop, but I'm unable to figure out how it works and what it does exactly. I don't even understand if I'm supposed to use it in the binary package or the library package.

I'm using Nim 2.0.0 and Nimble 0.14.2.

Have I missed something?

@penguinite
Copy link

You might be able to use a nim config file to fix this instead.

So, suppose you have the library in ~/library/ and the binary in ~/binary, you could make a nim.cfg file with --path=../library/src and insert it in the binary project.

Just remember to change the paths of course.

@Cornichon622
Copy link
Author

Thank you for the answer. I finally made it work by using nimble develop -a as shown in #1124.

I think the documentation of the develop command isn't clear enough for beginners. A few use cases and examples would help; currently it mentions develop files and old style links which does not mean anything to a newcomer.

The fact that this subcommand is used to clone distant packages and to put local packages in development mode at the same time hasn't helped me either.

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

No branches or pull requests

2 participants