vernemq / rebar3_cuttlefish

Cuttlefish plugin for rebar3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

overlay templates are ignored

Licenser opened this issue · comments

when running the cuttlefish plugin it is spoosed to not copy files that are already copied by the overlay, however that is not the case.

The problem is in here: https://github.com/tsloughter/rebar3_cuttlefish/blob/master/src/rebar3_cuttlefish_release.erl#L94-L95

Overlays uses relative a path like "apps/howl/priv/howl.schema" however the Schemas are absolute given a paths like "/Users/heinz/Projects/fifo/core/howl/apps/howl/priv/howl.schema"

Upon further investigation there is another issue for this namely it is here:

https://github.com/tsloughter/rebar3_cuttlefish/blob/master/src/rebar3_cuttlefish_release.erl#L50-L55

this tries to generate the config file based on the overlays found, not the one generated after the overlay.

I know this will require some re-writing but I think the file needs to be generated after relx has run and based on the final .schema files.

The issue here boing that cuttlefish does not allow having substitutions in the schema files.

Won't help, the problem is that the cuttlefish schema files contain placeholders, which can't be parsed as they are not valid cuttlefish syntax so the line before L62 crashes.

That doesn't make sense, I could have swore that is how cuttlefish worked with rebar2/nodepackage.