You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer, I want devonfw-ide to support the variable definitions from different devon.properties the same on the different supported operating systems.
Currently the environment-project.bat does the interpretation of devon.properties with code independent of environment-project. It is quite likely there are more issues with the results, when some variable values beyond the more simpler cases were used. The non-support for "!" in the value under windows as mentioned within #456 is just one example.
I have instead the following architecture in mind:
the environment-project.bat could be replaced by a wrapper which - more or less - just executes @FOR /f "tokens=*" %i IN ('bash environment-project --windows') DO @%i (*)
the environment-project could be extended with
learn a new option --windows
if option is set do not set / unset variables but instead output a "set ${key}=${value}" / "${key}=" on stdout
the ${value} needs to be made compatible to windows (e.g. by using cygpath)
This could even be extended, so the bash script with the logic always just outputs the variable definitions - depending on the shell environment, which is either read from command option or as fallback autodetected. Even on macOS / linux the environment-project itself were then also just a short wrapper script, which runs this script and uses eval or another appropriate way to do the variable setting.
At the same time some - at least - simple test cases could be added, that help to verify, the devon.properties syntax stays supported after another change.
I'll try to make provide some concrete PR for this proposal. But potentially needs some more work and time.
Feedback for this proposal is more than welcome.
(*) The idea of such a wrapper is borrowed from the command docker-machine env as well as some other related cli commands
The text was updated successfully, but these errors were encountered:
I generally love the idea to reduce maintenance effort and when I redesigned oasp4j-ide to create devonfw-ide, I started the idea to do as much in bash and as little in CMD as possible. So thanks for your ideas and suggestions.
I am happy to review your PR but currently I am not entirely sure how to solve this properly (still considering ${var} vs. %var% and all these cases) but with quite some effort it should be doable. We should also test the performance before we make a final choice...
As a developer, I want
devonfw-ide
to support the variable definitions from differentdevon.properties
the same on the different supported operating systems.Currently the
environment-project.bat
does the interpretation ofdevon.properties
with code independent ofenvironment-project
. It is quite likely there are more issues with the results, when some variable values beyond the more simpler cases were used. The non-support for "!" in the value under windows as mentioned within #456 is just one example.I have instead the following architecture in mind:
environment-project.bat
could be replaced by a wrapper which - more or less - just executes@FOR /f "tokens=*" %i IN ('bash environment-project --windows') DO @%i
(*)environment-project
could be extended with--windows
"set ${key}=${value}" / "${key}="
on stdoutcygpath
)This could even be extended, so the bash script with the logic always just outputs the variable definitions - depending on the shell environment, which is either read from command option or as fallback autodetected. Even on macOS / linux the
environment-project
itself were then also just a short wrapper script, which runs this script and useseval
or another appropriate way to do the variable setting.At the same time some - at least - simple test cases could be added, that help to verify, the devon.properties syntax stays supported after another change.
I'll try to make provide some concrete PR for this proposal. But potentially needs some more work and time.
Feedback for this proposal is more than welcome.
(*) The idea of such a wrapper is borrowed from the command
docker-machine env
as well as some other related cli commandsThe text was updated successfully, but these errors were encountered: