Open yegor256 opened 1 day ago
@deemp please, take a look
@deemp we will appreciate if you resolve it ASAP, it's blocking us
@yegor256, As a quick fix, I suggest using the mkdir
command before calling normalizer
.
I will add support for directory creation and will release the new version of normalizer
today.
@yegor256, I thought a bit more on the issue.
I think creating missing directories by default is not a good option because:
normalizer
expects that a file exists so that normalizer
can transform that file. normalizer
creates missing directories for any path, directories may be created for non-existent (misspelled) paths, and the user will have to remove these directories afterwards.I can add the -p
or --create-parent-directories
flag to the transform
command.
When the flag is enabled, normalizer
will create the missing directories.
@yegor256, do you need such a flag?
@deemp sounds like a good plan, let's add a flag. Even though, keep in mind, that for example javac compiler doesn't need a flag for that: it creates directories by default.
@yegor256, what is the reasoning behind this decision in the javac compiler?
Even though, keep in mind, that for example javac compiler doesn't need a flag for that: it creates directories by default.
@yegor256, I misunderstood your original request. I see that normalizer
throws an error because there are no parent directories for the output file. I agree that the normalizer
should create such directories without a flag.
I'm doing this:
The directory
/target/generated-sources/phi-optimized/org/eolang/hone/
is absent, but/target/generated-sources
is present. I'm getting:Would be much better if Normalizer would create the target directory automatically.