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

Avoid filename collision in the monorepo structure #115

Closed
thenorili opened this issue Nov 10, 2023 · 0 comments
Closed

Avoid filename collision in the monorepo structure #115

thenorili opened this issue Nov 10, 2023 · 0 comments

Comments

@thenorili
Copy link
Contributor

thenorili commented Nov 10, 2023

Error 1 below appears in both stable and nightly builds.

It's slightly more impactful than just a warning. Running cargo +nightly test, cargo test, cargo +nightly test in windows produces a linker error where color-spantrace tries to use eyre's usage.exe, see error 2 below. It's worked around pretty easily with cargo clean, but it's a problem that might get worse as the monorepo effort expands!

[1]
warning: output filename collision.
The example target usage in package eyre v0.6.8 (C:\Users\nori\dev\eyre\eyre) has the same output filename as the example target usage in package color-spantrace v0.2.0 (C:\Users\nori\dev\eyre\color-spantrace).
Colliding filename is: C:\Users\nori\dev\eyre\target\debug\examples\usage.exe
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see rust-lang/cargo#6313.

[2]
= note: LINK : fatal error LNK1104: cannot open file 'C:\Users\nori\dev\eyre\target\debug\examples\usage.exe'

error: could not compile color-spantrace (example "usage") due to previous error

thenorili added a commit to thenorili/eyre that referenced this issue Nov 10, 2023
Warning: output filename collision appears in both stable and nightly builds.

It's slightly more impactful than just a warning. Running cargo +nightly
test, cargo test, cargo +nightly test in windows produces a linker error
where color-spantrace tries to use eyre's usage.exe, see error 2 below.
It's worked around pretty easily with cargo clean, but it's a problem
that might get worse as the monorepo effort expands!

This patch renames `usage.rs` to `CRATENAME-usage.rs`.

Issue eyre-rs#115
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