Skip to content

[native_assets_builder] build input and output should be JSON instead of YAML #991

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

Closed
Tracked by #992
dcharkes opened this issue Mar 12, 2024 · 1 comment
Closed
Tracked by #992
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures package:hooks_runner package:hooks

Comments

@dcharkes
Copy link
Collaborator

@jonasfj and @mkustermann have pestered me enough about not using YAML for machine generated files. 😅

Good arguments to switch to JSON:

  • Less ambiguities in the format that we have to deal with.
  • Less dependencies in package:native_assets_cli (get rid of the yaml_edit package dependency).

Inconvenience to switch to JSON from YAML:

  • Trouble shooting user problems and developing will require parsing JSON files as a human being.

Least breaking way to go to JSON:

  • Keep supporting both YAML and JSON for the time being.
  • Keep supporting both the JSON and YAML file path for build output for the time being.
    • (Side note: @jonasfj Suggested we should not write the build output file to the output directory, so that it doesn't conflict with a possible asset file name.)
      • (Side side note: @mkustermann suggested we might use different output directories for different asset types e.g. the dylibs go in to a different dir than jars. I'm not sure if that gains us anything.)
@dcharkes dcharkes added P2 A bug or feature request we're likely to work on package:hooks package:hooks_runner labels Mar 12, 2024
@dcharkes dcharkes added P1 A high priority bug; for example, a single project is unusable or has many test failures and removed P2 A bug or feature request we're likely to work on labels Mar 12, 2024
@mkustermann
Copy link
Member

(Side side note: @mkustermann suggested we might use different output directories for different asset types e.g. the dylibs go in to a different dir than jars. I'm not sure if that gains us anything.)

By separating different asset types as sub-configs in config (e.g. config.native, config.java) and output (output.java, output.native) they are somewhat isolated from each other (which they should be, because adding native libraries vs jars is completely separate).

That in return means any sub-config may configure things like architecture, jdk versions, and they could also specify out directory - not saying that this is what we should do, but the structure would allow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures package:hooks_runner package:hooks
Projects
None yet
Development

No branches or pull requests

2 participants