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

Start using workspace dependencies #297

Merged
merged 4 commits into from
Dec 13, 2022
Merged

Start using workspace dependencies #297

merged 4 commits into from
Dec 13, 2022

Conversation

adriantombu
Copy link
Contributor

As discussed in #282 (comment) here's a separate PR to test the ability to use workspace dependencies that were introduced in Rust 1.64.

From what I see in the Firefox Rust update policy it should be ok as this is the Rust version used in the latest stable release of Firefox (lucky us haha).

Screenshot 2022-11-30 at 12 46 55

@adriantombu adriantombu marked this pull request as ready for review November 30, 2022 11:49
@gregtatum
Copy link
Member

This also needs testing with ./mach vendor rust on the Firefox codebase. I think you can run it locally by replacing the paths to a local repo, and then running it. Our vendor script uses a custom python vendoring system that may not yet know about what cargo and rustc can do yet.

https://firefox-source-docs.mozilla.org/build/buildsystem/rust.html

Would you be interested in taking a stab at this @adriantombu or would you prefer me or @nordzilla to try it. It may be a bit before we can get to it if it's us.

@gregtatum
Copy link
Member

We need to document how to do the local testing in https://github.com/projectfluent/fluent-rs/tree/main/docs

Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

The code itself looks good to me. I'm marking this as "request changes" only so that the status is clear that we need to block on manually testing the vendor process in Firefox. I left details in comments on what this process should look like.


[workspace.dependencies]
criterion = "0.3"
fluent-langneg = "0.13"
Copy link
Member

Choose a reason for hiding this comment

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

Thought: I'm not sure why this isn't in this repo, or if we should migrate to icu4x. @zbraniecki do you know?

Copy link
Collaborator

Choose a reason for hiding this comment

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

fluent-langneg should migrate to icu4x. But I'm not confident that icu4x should be providing language negotiation.

In terms of moving that into this repo - sure!

Cargo.toml Outdated
iai = "0.1"
intl_pluralrules = "7.0.1"
rustc-hash = "1"
serde = { version = "1.0", features = ["derive"] }
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: I don't think features should be enabled/disabled at the workspace level, they should be done at the crate level.

fluent-bundle = { version = "0.15.2", path = "../fluent-bundle" }
fluent-fallback = { version = "0.7.0", path = "../fluent-fallback" }
unic-langid = "0.9"
fluent-bundle.workspace = true
Copy link
Member

Choose a reason for hiding this comment

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

Praise: Yes, this is much nicer.

@gregtatum gregtatum requested a review from nordzilla December 2, 2022 17:26
@adriantombu
Copy link
Contributor Author

Would you be interested in taking a stab at this @adriantombu or would you prefer me or @nordzilla to try it. It may be a bit before we can get to it if it's us.

@gregtatum I can have a look at that, I have some free time currently 😁

@adriantombu
Copy link
Contributor Author

I tested against the Firefox codebase locally successfully and added a documentation file to explain the different steps to achieve it.

@adriantombu adriantombu requested review from gregtatum and removed request for nordzilla December 4, 2022 11:20
@gregtatum
Copy link
Member

This is still in my review queue, but I haven't had time to look at it yet.

Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

This looks good to me! I didn't follow the vendoring process on my own, but it seems correct. Next time I do a release I can try it out and handle any fast follows if needed. I would like to get a quick once-over from @nordzilla before merging to make sure I'm not missing anything.

Cargo.toml Outdated Show resolved Hide resolved
@gregtatum gregtatum requested a review from nordzilla December 12, 2022 16:25
Copy link
Collaborator

@nordzilla nordzilla left a comment

Choose a reason for hiding this comment

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

LGTM, especially after the most recent commit regarding the version numbers. Thanks so much!

@gregtatum gregtatum merged commit 860b1f0 into projectfluent:main Dec 13, 2022
@gregtatum
Copy link
Member

@adriantombu Thanks once again for the contribution! 🎉

@adriantombu adriantombu deleted the task/workspace-dependencies branch December 13, 2022 16:58
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.

4 participants