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

Fix servo crate name confliction on documentation #29878

Closed
wants to merge 1 commit into from

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Jun 15, 2023


  • There are tests for these changes OR it should be able to build all ports
  • These changes do not require tests because ___

The name of winit binary is conflicted with servo crate.
We can't read documentation of servo library crate at the moment.
It's actually the winit binary documentation.

@wusyong wusyong changed the title Fix crate name confliction on documentation Fix servo crate name confliction on documentation Jun 15, 2023
@mrobinson
Copy link
Member

Hrm. I have been considering this change for a while, but I'm not sure if it's the right one. Renaming the library because of a documentation issue seems like the wrong incentive structure. Is there a way to fix the documentation without the rename. Perhaps we could move the runner/winit port documentation out of rustdoc and simply disable documentation for that crate?

@wusyong
Copy link
Member Author

wusyong commented Jun 26, 2023

The tracking issue of this bug is cargo/#6313. I didn't follow through all conversations, but the beginning of the thread said this will be considered a hard error in the future.

Adding doc = false to the bin will just make mach build generate nothing. Another way I could think of is cargo doc -p libservo with features you specified and add this to mach. But this still won't solve the winit binary name is conflicted with servo library.

@mrobinson
Copy link
Member

An alternate approach here might be to rename the runner project, but have it produce the a binary with the name "servo." It's my understanding that the binary artifact itself will not conflict, but the documentation might.

@wusyong
Copy link
Member Author

wusyong commented Jun 26, 2023

I tried this before. Artifacts will not conflict indeed, but doc will. Carge doc will still warn about this if there are crates with same names despite the fact that they might have different package names.

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #29956) made this pull request unmergeable. Please resolve the merge conflicts.

@wusyong
Copy link
Member Author

wusyong commented Aug 6, 2023

I think another workaround could be adding another command argument like --lib instead.
I can look into it if you think this is better.
But we'll need to verify other mach commands because they all go through run_cargo_build_like_command function.

@mrobinson
Copy link
Member

I suspect that if changing the name of the crate is on the only way to fix this, it makes more sense to change the name of the crate of the binary rather than the crate of the library.

@delan delan mentioned this pull request Aug 22, 2023
2 tasks
@wusyong wusyong closed this Jun 25, 2024
@wusyong wusyong deleted the doc-name branch June 25, 2024 07:04
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

Successfully merging this pull request may close these issues.

Docs are not built for libservo
3 participants