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

Feature request - append for mlBundle #675

Closed
DavidEnnis-CleverLlamas opened this issue Sep 28, 2023 · 5 comments
Closed

Feature request - append for mlBundle #675

DavidEnnis-CleverLlamas opened this issue Sep 28, 2023 · 5 comments

Comments

@DavidEnnis-CleverLlamas

Referring to this document:

https://github.com/marklogic/ml-gradle/wiki/Bundles

The items are always pre-pended to the configurations - making them get executed first. However, there may be times in which one would want to use a bundle to change a default behavior. Example: replace an xQuery module to change how something was implemented.

It would be nice if, via configuration, the choice could be made between prepend and append

@rjrudin
Copy link
Contributor

rjrudin commented Sep 28, 2023

I haven't tried this yet, but I think for modules, this would work:

mlModulePaths=src/main/ml-modules,build/mlBundle/marklogic-unit-test-modules/ml-modules

At runtime, ml-gradle will then modify this to toss build/mlBundle/marklogic-unit-test-modules/ml-modules at the start of mlModulePaths. It'll be slightly inefficient then - the modules will get loaded twice - but the modules in the bundle would then have the opportunity to overwrite your own app modules.

@DavidEnnis-CleverLlamas
Copy link
Author

Good point - just force it to append again. This would make sense for modules. However, I'd be curious about the overhead of ml-config.

Will play around with this soon. Trying to see how far I can take using a bundle for various combined-code and config requirements

@rjrudin
Copy link
Contributor

rjrudin commented Sep 29, 2023

It should work for ml-config as well - ml-gradle will merge the resource files together, with the last directory in the list "winning" and overwriting any keys already present in the merged JSON object.

@DavidEnnis-CleverLlamas
Copy link
Author

DavidEnnis-CleverLlamas commented Oct 2, 2023 via email

@rjrudin
Copy link
Contributor

rjrudin commented Jan 11, 2024

Closing as I believe this request was addressed, but please reopen if that is not the case.

@rjrudin rjrudin closed this as completed Jan 11, 2024
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

No branches or pull requests

2 participants