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 single-file command to nimbus-fml file to rationalize a complex graph of FML files #5676
Add single-file command to nimbus-fml file to rationalize a complex graph of FML files #5676
Conversation
a1a5eeb
to
d05d669
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #5676 +/- ##
==========================================
+ Coverage 84.02% 84.07% +0.04%
==========================================
Files 106 109 +3
Lines 11272 11413 +141
==========================================
+ Hits 9471 9595 +124
- Misses 1801 1818 +17
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! 🚢
# This will move to the generate command when deprecated commands are removed. | ||
# - channel: | ||
# help: The channel to generate the defaults for | ||
# long: channel | ||
# takes_value: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Does this comment need to be here too?
.file_stem() | ||
.ok_or_else(|| anyhow!("Manifest file path isn't a file"))? | ||
.to_str() | ||
.ok_or_else(|| anyhow!("Manifest file path isn't a file with a sensible name"))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with a sensible name
😂 amazing
#[test] | ||
fn test_single_file_command() -> Result<()> { | ||
test_single_merged_manifest_file("fixtures/fe/browser.yaml", "release")?; | ||
test_single_merged_manifest_file( | ||
"fixtures/fe/importing/including-imports/ui.fml.yaml", | ||
"none", | ||
)?; | ||
test_single_merged_manifest_file( | ||
"fixtures/fe/importing/including-imports/app.fml.yaml", | ||
"release", | ||
)?; | ||
test_single_merged_manifest_file("fixtures/fe/importing/overrides/app.fml.yaml", "debug")?; | ||
test_single_merged_manifest_file("fixtures/fe/importing/overrides/lib.fml.yaml", "debug")?; | ||
test_single_merged_manifest_file("fixtures/fe/importing/diamond/00-app.yaml", "debug")?; | ||
test_single_merged_manifest_file("fixtures/fe/importing/diamond/01-lib.yaml", "debug")?; | ||
test_single_merged_manifest_file("fixtures/fe/importing/diamond/02-sublib.yaml", "debug")?; | ||
Ok(()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic
let observed = fm.default_json(); | ||
|
||
// They should be the same. | ||
assert_eq!(expected, observed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay so to make sure I'm understanding this, this function that's used in the below test does the following?
- Load and get default json
- Generate the merged file
- Load merged and get default json
- Compare the initial file default and merged file default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly so.
Fixes EXP-3520.
Pull Request checklist
[ci full]
to the PR title.Branch builds: add
[firefox-android: branch-name]
to the PR title.