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

Support for YAML files in solutions and a solution fix #316

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

pnickolov
Copy link
Contributor

Description

Added support for YAML files in solutions.

Added a new command, solution fix to make common changes to solutions.

Details

  1. When doing solution init, you can now provide a --yaml flag, which will make the manifest saved in a YAML format. A solution can have only one manifest, either YAML or JSON (having both will produce an error)
  2. When adding new objects with solution extend --add-xxx, new objects are now added in the same format as the manifest. (You can also override this by specifying a --json or --yaml flag to get the object created with a different format; mostly for those who what to try the YAML format but not ready to switch the whole solution)
  3. There is also a new command fsoc solution fix which, similar to go fix (in Go) and cargo fix (in Rust), will make common adjustments to your solution to adapt to recent changes in platform capabilities. We now support two "fixes":
    --manifest-format=yaml|json -- will rewrite your solution's manifest to the desired format
    --manifest-version -- will convert and rewrite your manifest into the latest manifest version (1.1.0 from 1.0.0), adding the solution type as needed.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@pnickolov pnickolov merged commit f4d0152 into main Mar 20, 2024
8 checks passed
@pnickolov pnickolov deleted the pn/yaml-manifests branch March 20, 2024 08:14
@ikstewa
Copy link

ikstewa commented Mar 21, 2024

@pnickolov When running this on the latest release it doesn't appear to function as the provided example:

❯   fsoc solution fix --manifest-type=yaml --manifest-version

Error: unknown flag: --manifest-type
Usage:
  fsoc solution fix [flags]

Examples:
  fsoc solution fix --manifest-type=yaml --manifest-version

@pnickolov
Copy link
Contributor Author

@ikstewa sorry, the example is wrong... please use --manifest-format=yaml (per fsoc help solution fix).
I'll correct the example in the next release, thank you for reporting it!

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.

None yet

2 participants