Currently if we have a hello.d in the current working directory we can run dub hello to invoke the hello.d file.
However this only works if a hello.d file exists and if no hello file exists.
As soon as you use dub build --single hello.d on POSIX, the dub hello command will stop working with Error Invalid UTF-8 sequence (at index 1), since it generated the file hello which is an executable file.
This was added in #1605 by @andre2007
I think this is a hurdle when adding custom command support to DUB (e.g. loaded from the registry), so I think we should remove that feature.
However this is somewhat consistent with what the compiler does (except the compiler does not attempt to parse the executable file)
Option 1: remove this feature
Option 2: make it only work when using / or \ in the path (e.g. ./hello)
Option 3: keep it as-is (requiring decisions what to has precedence with custom commands when published on the registry)
Additionally we need to fix that it doesn't attempt to parse the executable file, but only D source files.
Currently if we have a
hello.din the current working directory we can rundub helloto invoke the hello.d file.However this only works if a
hello.dfile exists and if nohellofile exists.As soon as you use
dub build --single hello.don POSIX, thedub hellocommand will stop working withError Invalid UTF-8 sequence (at index 1), since it generated the filehellowhich is an executable file.This was added in #1605 by @andre2007
I think this is a hurdle when adding custom command support to DUB (e.g. loaded from the registry), so I think we should remove that feature.
However this is somewhat consistent with what the compiler does (except the compiler does not attempt to parse the executable file)
Option 1: remove this feature
Option 2: make it only work when using
/or\in the path (e.g../hello)Option 3: keep it as-is (requiring decisions what to has precedence with custom commands when published on the registry)
Additionally we need to fix that it doesn't attempt to parse the executable file, but only D source files.