Skip to content

Use workspace inheritance to abstract some packages metadata#9896

Closed
ameknite wants to merge 2 commits intobevyengine:mainfrom
ameknite:add-authors
Closed

Use workspace inheritance to abstract some packages metadata#9896
ameknite wants to merge 2 commits intobevyengine:mainfrom
ameknite:add-authors

Conversation

@ameknite
Copy link
Contributor

@ameknite ameknite commented Sep 22, 2023

Objective

  • Abstract the package metadata in all the crates

Solution

Use workspace inheritance to define the next fields:

version.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
authors.workspace = true
readme.workspace = true
rust-version.workspace = true

I also added some keywords and categories, and included the macro repositories as members of the workspace.

@alice-i-cecile alice-i-cecile added the A-Meta About the project itself label Sep 22, 2023
@waywardmonkeys
Copy link
Contributor

This might be a good time to start using workspace inheritance! It would also be useful for license, repository, and other fields.

@alice-i-cecile
Copy link
Member

That's an excellent call. Can we do that here and update the title + description to match?

@mockersf
Copy link
Member

Authors were removed in #2654

@ameknite ameknite changed the title Add authors to all crates and format Use workspace inheritance to define some packages field in all crates Sep 22, 2023
@ameknite ameknite changed the title Use workspace inheritance to define some packages field in all crates Use workspace inheritance to abstract some packages metadata Sep 22, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Much nicer :) A bit annoying that we have to list "please we do actually want to use that" in all of the child crates, but if that's required there's nothing we can do.

@mockersf
Copy link
Member

I don't think using workspace inheritance for metadata is that interesting, as it's very verbose and doesn't really solve a problem.

#6089 was doing pretty much that and was rejected.

@mockersf mockersf added the X-Needs-SME This type of work requires an SME to approve it. label Sep 22, 2023
@ameknite
Copy link
Contributor Author

Just for context, I just did this PR because I wanted to have author data when listing all the dependency licenses with Cargo license. I found it strange that other crates have an author, but Bevy doesn't.

Example:
bevy_window: 0.12.0-dev, "Apache-2.0 OR MIT", by, "N/A"

instead of something like

tracing-core: 0.1.31, "MIT", by, "Tokio Contributors <team@tokio.rs>"

@ameknite
Copy link
Contributor Author

ameknite commented Sep 22, 2023

@mockersf, I think that if there are problems with the version metadata, we can set it manually. However, I don't see any reason why we shouldn't use workspace inheritance for something like the repository field.

@ameknite ameknite closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Meta About the project itself X-Needs-SME This type of work requires an SME to approve it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants