-
Notifications
You must be signed in to change notification settings - Fork 228
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
Publish inkwell to crates.io #154
Comments
We're currently blocked on publishing to crates.io because Rust doesn't support mutually exclusive features. So we have no way to support a single library with multiple llvm versions. The llvm-sys.rs versioning scheme doesn't make sense since we're not completely dependant on LLVM (unlike llvm-sys) and would want to be able to release major/minor/patch versions at our whim, not according to LLVM's version. That said, I realize this is inconvenient and I've been thinking about releasing a single LLVM version publish of inkwell (likely LLVM 8 since we don't yet support LLVM 9). This would be a stop-gap for similar use cases to your own that require a published crate but would not be a frequent thing. First class support for mutex features is really what we need long term. |
@TheDan64 doing a single LLVM version publish of inkwell would be absolutely perfect for now. |
You can manually make features exclusive by checking them in a build script or via |
That isn't sufficient because cargo needs to be able to understand that two feature-controlled versions of llvm-sys won't overlap. See rust-lang/cargo#5653 (comment) and the following comment by alex |
Ah, that makes sense |
There is now a |
Note: TheDan64/inkwell#154 (comment) Signed-off-by: Sean Young <[email protected]>
Note: TheDan64/inkwell#154 (comment) Signed-off-by: Sean Young <[email protected]>
Thank you, now I've been able to publish a new version of solang to crates, which is great! Thanks again. Having said all that, llvm-sys.rs publishes a range of versions to crates, 80.x.y for llvm 8 and 90.x.y for llvm 9. I don't get why this is not possible for inkwell. Of course this is more admin for you and not ideal. With the support for mutually exclusive cargo feature you've mentioned, none of this is necessary. |
Why not just publish it using normal features, like already implemented, for now, and when one tries to use multiple features, it just fails? |
It already does fail when one tries to use multiple features via a bunch of macro magic. Part of the problem is that the |
So the problem here is, that llvm-sys uses versions to represent llvm versions instead of features. Features can at least be forwarded, I guess. |
What You can already specify crates by features. Mutually exclusive features would fix this because cargo would become aware that two exclusive feature's dependant crates can't overlap. |
Could https://crates.io/crates/cfg-if solve this problem for us? |
I don't think so, because cargo still needs knowledge about mutually exclusive crates(ie llvm-sys-xx vs llvm-sys-yy). |
As I mentioned in #187 we are keen on seeing public releases of Inkwell too. For now we've postponed publishing of several of our crates that (indirectly) depend on Inkwell, but for our next release we might have to plan for alternatives. Unfortunately, we cannot control the Rust Cargo Team's desire to add mutex features, so the only option that we can actually control ourselves is changing the upstream dependency. Have you previously raised this issue with the maintainer of |
I have not, as I don't think the idea will be well-received. The amount of effort required to switch from a branch to a feature-based system is massive. |
I've published another stop-gap version but for LLVM 10, |
My crate My solution, in case it's helpful to anyone else, was to manually combine some of the recent versions of Currently, If anyone else wants to use or contribute to |
@cdisselkoen Nice! If it's a mirror/fork, is there a chance of you upstreaming the changes? |
Good idea. Originally I had agreed with others on this thread that I didn't think there was much chance of |
@cdisselkoen Thank you so much for helping figure this out! We can now release an LLVM version agnostic crate! This will live on the master branch going forward. I'll leave the existing branches up so that it'll continue to work for anyone currently using them. See master readme for setup instructions. I'm going to go ahead and close this issue. We'll release a v0.1.0 to crates.io once we've closed out all of the remaining v0.1.0 tickets. We might release a release candidate crate along the way to get some of the new features out there at some point. Would greatly appreciate the community's help with the remaining tickets. Super exciting! |
Dear all, inkwell is great and we are using it as the base of our own codegen framework. What is the progress of version 0.1.0 ? We are using inkwell with LLVM 110. Thanks. |
I agree that 0.1.0 would be nice. The current version doesn't play well with semver, which means tools like
|
The remaining 0.1.0 issues are tracked here: https://github.com/TheDan64/inkwell/milestone/1 |
My project (Solang) depends on inkwell. I cannot publish to crates, since there is no version of inkwell on crates.io.
Would it be possible to publish inkwell to crates.io, following the llvm-sys.rs versioning scheme? So version 90.minor.patch is llvm 9, etc.
Thank you
The text was updated successfully, but these errors were encountered: