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

Add edition info into metadata #5834

Merged
merged 3 commits into from
Aug 1, 2018
Merged

Conversation

Undin
Copy link
Contributor

@Undin Undin commented Jul 30, 2018

Since edition feature was introduced, external tools have to support this new feature.
But cargo metadata doesn't provide info about package edition.
This commit adds edition field to SerializedPackage struct to add the corresponding field into metadata output.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matklad (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@matklad
Copy link
Member

matklad commented Jul 30, 2018

#5816 will make an edition a property of a target, so it make sense to this in metadata as well

@alexcrichton
Copy link
Member

Indeed! @Undin want to switch this to being part of a serialized target?

@Undin
Copy link
Contributor Author

Undin commented Jul 30, 2018

Indeed! @Undin want to switch this to being part of a serialized target?

Yep! In this case, I'll wait when #5816 will be merged to add edition field into SerializedTarget

#5816 will make an edition a property of a target, so it make sense to this in metadata as well

If we make edition part of target metadata, should we add this info into package data at all?

@alexcrichton
Copy link
Member

I think having it in both places is probably best for now, at the package level Cargo may distinguish various features of manifests and so it may be worthwhile at some point!

@alexcrichton
Copy link
Member

@Undin ok that PR has now merged! Want to update this when you get a chance?

@Undin
Copy link
Contributor Author

Undin commented Jul 31, 2018

@alexcrichton yep, I'll update it ASAP

@dwijnand
Copy link
Member

Excellent. Thanks @Undin.

Since edition feature was introduced, external tools have to support this new feature.
But cargo metadata doesn't provide info about package edition.
This commit adds edition field to SerializedPackage struct
to add the corresponding field into metadata output.
@Undin Undin force-pushed the metadata-edition branch 2 times, most recently from 0fe707d to f93eeaa Compare July 31, 2018 22:33
@Undin
Copy link
Contributor Author

Undin commented Jul 31, 2018

I've added edition info into target object in metadata
But I've had to rebase onto master to get changes from #5816

@alexcrichton
Copy link
Member

Thanks! Looks like a test may be failing on windows though?

@Undin
Copy link
Contributor Author

Undin commented Aug 1, 2018

Oops, forgot about slashes

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

LGTM

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Aug 1, 2018

📌 Commit 3fdce22 has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Aug 1, 2018

⌛ Testing commit 3fdce22 with merge 140fde355708d122384474cd10f2e814073829ee...

@bors
Copy link
Collaborator

bors commented Aug 1, 2018

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Collaborator

bors commented Aug 1, 2018

⌛ Testing commit 3fdce22 with merge f14aea5...

bors added a commit that referenced this pull request Aug 1, 2018
Add edition info into metadata

Since edition feature was introduced, external tools have to support this new feature.
But cargo metadata doesn't provide info about package edition.
This commit adds edition field to `SerializedPackage` struct to add the corresponding field into metadata output.
@bors
Copy link
Collaborator

bors commented Aug 1, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f14aea5 to master...

@bors bors merged commit 3fdce22 into rust-lang:master Aug 1, 2018
@Undin Undin deleted the metadata-edition branch August 1, 2018 16:41
@ehuss ehuss added this to the 1.29.0 milestone Feb 6, 2022
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.

7 participants