Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
83 stars 11 forks source link

target name conflict #135

Closed jayvdb closed 11 months ago

jayvdb commented 11 months ago

Not sure what the options are to resolve this.

Running > rustup run stable cargo doc locally results in

warning: output filename collision. The bin target butane in package butane_cli v0.6.1 (/home/jayvdb/rust/butane/butane_cli) has the same output filename as the lib target butane in package butane v0.6.1 (/home/jayvdb/rust/butane/butane). Colliding filename is: /home/jayvdb/rust/butane/target/doc/butane/index.html The targets should have unique names. This is a known bug where multiple crates with the same name use the same path; see https://github.com/rust-lang/cargo/issues/6313.

Electron100 commented 11 months ago

Do you see any impact besides the unfortunate warning? It sounds as though there is a potential issue of one doc stomping on the other, although I haven't noticed that in practice.

Reading through the issue, it appears that there's fairly widespread acknowledgement that this is a bug cargo/rustdoc will need to fix. We don't actually need to document butane_cli so I tried adding doc=false to the bin target, but it doesn't seem to make a difference for the warning.

If you're not seeing concrete impact I'm going to close this as it's not clear that there's any reasonable fix at the project level.

jayvdb commented 11 months ago

The result locally is that 'butane' docs are the cli, not the lib, and as a result they are blank. I didnt look for workarounds yet.

Electron100 commented 11 months ago

Ah, ok, I'm not seeing that but it fits with the description in the linked bug of it being arbitrary which one wins. For viewing docs locally if we don't find a workaround, I believe this should work reliably cd butane && cargo +nightly doc --all-features --open (or run make docview which runs this)

jayvdb commented 11 months ago

yes, that works, and IMO is good enough.