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

Respect package.readme in Cargo.toml #1216

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Conversation

heaths
Copy link
Contributor

@heaths heaths commented Jan 21, 2023

Fixes #1215 by honoring how package.readme is authored in Cargo.toml, if authored. This could be a path or a boolean to disable searching for the path.

Also fixes the existing it_copies_a_readme_provided_path test which was an exact copy - just with fewer empty lines - of it_copies_a_readme_default_path and wasn't honoring any authored path since there was no way to get the authored path.

Copy link
Member

@drager drager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me! Can you rebase latest master into your branch perhaps?

@heaths
Copy link
Contributor Author

heaths commented May 30, 2023

Thanks! Looks good to me! Can you rebase latest master into your branch perhaps?

Unfortunately, because #1185 took a dependency on a new crate, the problem needs to fix there as well. It has the same problem as this crate did where it expects a readme to be a path only (present or absent) so I can't tell the difference between explicitly disabled or just not specified.

I've opened oli-obk/cargo_metadata#234 to track.

Fixes rustwasm#1215 by honoring how package.readme is authored in Cargo.toml, if authored. This could be a path or a boolean to disable searching for the path.

Also fixes the existing `it_copies_a_readme_provided_path` test which was an exact copy - just with fewer empty lines - of `it_copies_a_readme_default_path` and wasn't honoring any authored path since there was no way to get the authored path.
@heaths
Copy link
Contributor Author

heaths commented May 30, 2023

Ready. I misunderstood that cargo_metadata was consuming from the command cargo metadata, which results in null in this case so we can still detect when readme = false was specified.

@heaths
Copy link
Contributor Author

heaths commented May 30, 2023

Looks like the test failures started in or around 3073db8

@drager
Copy link
Member

drager commented May 31, 2023

Ready. I misunderstood that cargo_metadata was consuming from the command cargo metadata, which results in null in this case so we can still detect when readme = false was specified.

Great, thanks a lot! Appreceite you fixing it!

Looks like the test failures started in or around 3073db8

Yeah, I will look into the failures. Thanks

@drager drager merged commit 372733b into rustwasm:master Jun 8, 2023
@heaths heaths deleted the issue1215 branch June 8, 2023 18:14
@drager
Copy link
Member

drager commented Jun 11, 2023

Sorry @heaths. I had to revert this PR since we got some actual test failures after this was merged. Both locally and in Github actions. Could you perhaps take a look at that and submit a new PR? Sorry for the inconvenience...

@heaths
Copy link
Contributor Author

heaths commented Jun 16, 2023

Understood. Will take a look.

@heaths
Copy link
Contributor Author

heaths commented Jun 16, 2023

To note, the two failing log_level tests started earlier in 3073db8 - sometime around when the deserialization of the manifest was removed from this crate in lieu of running a tool.

@heaths
Copy link
Contributor Author

heaths commented Jun 16, 2023

@drager please see #1298

@drager
Copy link
Member

drager commented Jun 17, 2023

Thank you for taking the time to investigate and fix it! Appreciate it!

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.

Warning about no README when readme = false
2 participants