Closed yegor256 closed 1 week 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.
@yegor256 Thank you for your submission! Unfortunately, it wasn't accepted by the team this time. As per our policy, this results in a -16 point deduction. Your current balance is -30. Don't be discouraged—your efforts to report bugs are valuable for improving our project quality. Please continue to submit issues, but try to be more precise next time. Your contributions are appreciated!
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.