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

Try out nightly renamed deps in Cargo.toml #53

Closed
TheDan64 opened this issue Oct 8, 2018 · 2 comments
Closed

Try out nightly renamed deps in Cargo.toml #53

TheDan64 opened this issue Oct 8, 2018 · 2 comments
Assignees
Milestone

Comments

@TheDan64
Copy link
Owner

TheDan64 commented Oct 8, 2018

Is your feature request related to a problem? Please describe.
The current version management story means we'd have to create separate crates for each llvm version, ie: inkwell-0.1.0-3_6, inkwell-0.1.0-7, etc. rust-lang/cargo#5653 might allow us to instead have a single crate that relies solely on the feature flags we already use today.

Describe the solution you'd like
For example this new cargo feature might allow us to instead do this

#[cfg(feature = "llvm3-6")]
extern crate llvm_sys_36 as llvm_sys;
#[cfg(feature = "llvm7-0")]
extern crate llvm_sys_70 as llvm_sys;

when Cargo.toml has:

[dependencies]
llvm_sys_36 = { package = "llvm-sys", version = "36.2.0" }
llvm_sys_70 = { package = "llvm-sys", version = "70.0.0" }

Describe possible drawbacks to your solution
None that I can think of; it would significantly improve the current approach for the end user (if it does indeed work this way).

@TheDan64 TheDan64 self-assigned this Oct 8, 2018
@TheDan64 TheDan64 added this to the 0.1.0 milestone Oct 17, 2018
@TheDan64
Copy link
Owner Author

...This doesn't seem to work due to conflicts in linking even when using conditional compilation:

error: failed to select a version for `llvm-sys`.
    ... required by package `inkwell v0.1.0 (/mnt/d/LinuxData/repos/inkwell)`
versions that meet the requirements `^50.2` are: 50.2.0

the package `llvm-sys` links to the native library `llvm`, but it conflicts with a previous package which links to `llvm` as well:
package `llvm-sys v40.2.0`
    ... which is depended on by `inkwell v0.1.0 (/mnt/d/LinuxData/repos/inkwell)`

failed to select a version for `llvm-sys` which could resolve this conflict

@TheDan64
Copy link
Owner Author

Unfortunately it doesn't seem like they'll support our use-case :(

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

1 participant