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

Move from quarkus-extension.json to .yaml #4935

Merged
merged 3 commits into from
Oct 28, 2019

Conversation

maxandersen
Copy link
Member

Why:

  • Humans read and write .yaml better than .json
    and yaml is a superset of json.

This change addreses the need by:

  • ExtensionDescriptorMojo
    • updated to read .yaml OR .json and then still massage
      the structure into new structure for backwards compatability.
  • GenerateExtensonsMojo
    • reads .yaml or .json per extension. Still some javax.json code
      present so do a double-parse to convert back to java.json.
      Not pretty but minimal change for v1 that can be cleaned up
      afterwards.
  • ValidateExtensionJsonMojo
    • just updated to check if .yaml or .json file exists and can be
      read.

"META-INF" + File.separator + BootstrapConstants.EXTENSION_PROPS_JSON_FILE_NAME);
if (!extensionFile.exists()) {
// if does not exist look for fallback .json
extensionFile = new File(extensionFile.getParent(), "quarkus-extension.json");
Copy link
Member Author

Choose a reason for hiding this comment

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

ultimately I would like to have the extensionFile be null and then look for yaml first, json second but didn't find api

@maxandersen maxandersen marked this pull request as ready for review October 28, 2019 17:00
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

LGTM, added some minor comments

Copy link
Contributor

@quintesse quintesse left a comment

Choose a reason for hiding this comment

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

LGTM

@maxandersen maxandersen changed the title WIP: Move from quarkus-extension.json to .yaml Move from quarkus-extension.json to .yaml Oct 28, 2019
gsmet
gsmet previously requested changes Oct 28, 2019
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

At least some of the commits should be squashed: we don't want commits with formatting fixes.

Also the ignore rule for uberjars must be updated here: https://github.com/quarkusio/quarkus/blob/master/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java#L102 .

Why:

Humans read and write .yaml better than .json
and yaml is a superset of json.
This change addreses the need by:

* ExtensionDescriptorMojo
  updated to read .yaml OR .json and then still massage
  the structure into new structure for backwards compatability.
* GenerateExtensonsMojo
  reads .yaml or .json per extension. Still some javax.json code
  present so do a double-parse to convert back to java.json.
* Not pretty but minimal change for v1 that can be cleaned up
  afterwards.
* ValidateExtensionJsonMojo
  just updated to check if .yaml or .json file exists and can be
  read.

+ minor cleanup based on review
@maxandersen
Copy link
Member Author

At least some of the commits should be squashed: we don't want commits with formatting fixes.

Done.

Also the ignore rule for uberjars must be updated here: https://github.com/quarkusio/quarkus/blob/master/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java#L102 .

good catch - sorry for missing that. fixed.

@gsmet gsmet dismissed their stale review October 28, 2019 23:01

Comments addressed.

@maxandersen maxandersen merged commit 0bd8185 into quarkusio:master Oct 28, 2019
@gsmet gsmet added this to the 0.27.0 milestone Oct 29, 2019
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.

5 participants