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

Added legacy config #631

Merged
merged 3 commits into from
Feb 19, 2024
Merged

Added legacy config #631

merged 3 commits into from
Feb 19, 2024

Conversation

leoafarias
Copy link
Owner

Generates legacy fvm_config.json file to better support tools that need to migrate

Copy link

vercel bot commented Feb 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fvm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2024 4:15pm

Copy link

github-actions bot commented Feb 16, 2024

DCM report

✅ no issues found!

Full report: https://github.com/leoafarias/fvm/runs/21686580477

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (c0029c3) 62.63% compared to head (ad74f1f) 61.99%.
Report is 3 commits behind head on main.

Files Patch % Lines
lib/src/models/project_model.dart 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #631      +/-   ##
==========================================
- Coverage   62.63%   61.99%   -0.64%     
==========================================
  Files          50       50              
  Lines        1908     1921      +13     
==========================================
- Hits         1195     1191       -4     
- Misses        713      730      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// Used for migration of config files
final legacyConfig = ProjectConfig.loadFromPath(legacyConfigFile);

if (legacyConfig != null) {
if (config == null && legacyConfig != null) {
legacyConfig.save(configFile);

Choose a reason for hiding this comment

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

Does this need to load the new config?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, this is the migration of the new config that does not exist. It creates a new one based on the old one.

Choose a reason for hiding this comment

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

Yes, but config is still null right, doesn't it need to be loaded after migration?

Copy link

@jibbers42 jibbers42 left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for this!

@leoafarias leoafarias merged commit fb973a6 into main Feb 19, 2024
6 checks passed
@leoafarias leoafarias deleted the fix/better-migration-path branch February 19, 2024 14:56
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.

3 participants