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

Structure for a hybrid package with two modules and binaries #837

Closed
sschwarzer opened this issue Aug 23, 2020 · 3 comments
Closed

Structure for a hybrid package with two modules and binaries #837

sschwarzer opened this issue Aug 23, 2020 · 3 comments

Comments

@sschwarzer
Copy link

sschwarzer commented Aug 23, 2020

Both @c-blake and I tried to find a way to convince Nimble to install a package that has two .nim files where both files are supposed to be both Nim modules and binaries. In other words, both modules contain a when isMainModule statement.

The package in question is https://github.com/c-blake/hldiff . I had opened a ticket there which contains a discussion of our so far unsuccessful attempts.

On the Nimble side, I don't know if #747 is somehow related. That ticket describes a different problem though.

What I'd like is a suggestion for a working package setup for hldiff and if possible an explanation for this setup, so we can transfer this knowledge to future packages. Once we have found a suitable setup, it'll probably make sense to update the Nimble readme to contain the necessary background information to arrive at this setup.

@dom96
Copy link
Collaborator

dom96 commented Aug 23, 2020

See my explanation in: c-blake/hldiff#1 (comment).

To add to that, there are efforts being planned to change how Nimble installs packages which will hopefully avoid these kinds of problems. CC @genotrance

@genotrance
Copy link
Contributor

So I just tried hldiff and it works fine with no errors, I presume this specific issue can be closed. The pkg suffix issue is already being tracked in #308.

@sschwarzer
Copy link
Author

So I just tried hldiff and it works fine with no errors

Yes, hldiff was adapted to work with Nimble since I opened this ticket.

I'm still not totally happy with the current state of Nimble (see also c-blake/hldiff#1 ), but that's a discussion for another ticket. ;-)

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

3 participants