EwenG / badigeon

A Clojure build library based on tools.deps.
144 stars 19 forks source link

False resource conflicts when building ubejar #23

Closed jlesquembre closed 3 years ago

jlesquembre commented 4 years ago

Thanks for this library, really useful.

I'm getting some resource conflict warnings that I think should be omitted. In my case, I get warnings for META-INF/MANIFEST.MF and module-info.class. depstar has a list of pattern to ignore when building an uberjar:

https://github.com/seancorfield/depstar/blob/86b64dd0e6e6a3d03020e54537c0cea2b384dbdd/src/hf/depstar/uberjar.clj#L107-L116

I think it makes sense to copy that behavior

EwenG commented 4 years ago

Thank you for reaching out, sorry I need more thinking about this :)

borkdude commented 3 years ago

I'm running into an issue with .DS_Store files on macOS. How can I exclude those? This prevents me from using bundle on macOS.

EwenG commented 3 years ago

Thanks for the report. Unfortunately, there is so way to exclude them at the moment. You could programmatically remove the .DS_Store files before calling bundle but it is not ideal. I will replace the exceptions by warnings, with a few common patterns excluded, as jlesquembre suggested.

borkdude commented 3 years ago

Even if I remove them manually, they may be re-created, I don't think I can control what macOS does here exactly. Thanks for fixing this.

EwenG commented 3 years ago

Sure it will recreate them but you can remove those files just before calling bundle and abstracting the whole thing into a function.

borkdude commented 3 years ago

@EwenG I think macOS creates it even in the directory that was just generated by a tool, so it's pretty awkward to work around this.

EwenG commented 3 years ago

Thanks for this library, really useful.

I'm getting some resource conflict warnings that I think should be omitted. In my case, I get warnings for META-INF/MANIFEST.MF and module-info.class. depstar has a list of pattern to ignore when building an uberjar:

https://github.com/seancorfield/depstar/blob/86b64dd0e6e6a3d03020e54537c0cea2b384dbdd/src/hf/depstar/uberjar.clj#L107-L116

I think it makes sense to copy that behavior

I made a change to master that, by default, excludes META-INF/MANIFEST.MF and module-info.class from the warnings

EwenG commented 3 years ago

I'm running into an issue with .DS_Store files on macOS. How can I exclude those? This prevents me from using bundle on macOS.

I made a change to master to warn on resource conflicts instead of throwing. By default .DS_Store files are excluded from the warnings

borkdude commented 3 years ago

Awesome, thank you!

jlesquembre commented 3 years ago

Thank you! I think we can close this issue :-)