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

feat: migrate dist.toml to dist-workspace.toml #1656

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

mistydemeo
Copy link
Contributor

@mistydemeo mistydemeo commented Dec 18, 2024

We treat dist.toml-alone generic projects a bit awkwardly because of our migration to the new metadata structure. The easiest solution for us is to migrate those proejcts to dist-workspace.toml, where they can be structured and interpreted the same as Cargo.toml projects with a dist-workspace.toml file.

Currently, this produces a pair of dist-workspace.toml and dist.toml. The dist.toml retains the package-level metadata, while the dist-workspace.toml contains a workspace entry with a single dist:. member and the [dist] metadata.

At @ashleygwilliams's suggestion, I've updated axoproject so it now supports generic projects whose dist-workspace.toml contains a [workspace] and [package] in the same file, and we produce that single metadata when migrating solo-dist.toml.

We treat dist.toml-alone generic projects a bit awkwardly because of our
migration to the new metadata structure. The easiest solution for us is
to migrate those proejcts to dist-workspace.toml, where they can be
structured and interpreted the same as Cargo.toml projects with a
dist-workspace.toml file.
Previously, we disallowed both [package] and [workspace] in a
single dist-workspace.toml. However, we want to allow this for
generic/non-Rust projects so that these users only need a single
metadata file, not two. This required a few changes to axoproject
in order to make sure we structure the data we're returning
properly.
Copy link
Contributor

@duckinator duckinator left a comment

Choose a reason for hiding this comment

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

Tried this on a little dist.toml-only C project and it migrated it perfectly. Very nice. :3

@mistydemeo mistydemeo merged commit aa437ee into main Dec 19, 2024
18 checks passed
@mistydemeo mistydemeo deleted the migrate_dist_alone branch December 19, 2024 19:12
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.

2 participants