New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dtcw ignores installed Java RE when docker is installed - your java version 17 is too new #1031
Comments
argh. yes, this is still a bug in the wrapper. you have to run So, if you spot this bug in the dtcw, this would be quite helpful :-) |
I started to test the installation instructions for the different setups:
What I don't like is that the wrapper script changes its behavior as soon the user installs more than one possible docToolchain runtime environment. For example the user used
Even if the bug for this issue is fixed the user is confronted with a sudden change. Lets assume we have the least tech savvy user, an author which does not know much about
IMHO it would make sense to choose a "sane default" in which order the different environments are use in case more than one runtime environment exists and show the used environment during execution. What about "local" before "sdk" before "docker"? What do you think about this? |
I thought it is this way :-) sdkman is an option I never used for docToolchain. So, I don't care if we change the behaviour. I wonder if it makes sense to force the use of the temurin JDK 11 and remove the |
We have to differentiate between the order of how an installation is suggested and the order of which environment is used when more than one is installed. I would suggest following changes to the wrapper script:
Does that make sense? |
shall we crate a new issue for that? |
If you don't mind I would like to take a look at this issue before creating a new one. |
I just noticed that there are two version
My question is:
|
The one at doctoolchain is the master and it is deployed via a github action to doctoolchain.github.io . The github.io one has the benefit that it gets a good shorr url (doctoolchain.org/dtcw) which is good for the curl statement. In the past, both where disjunct which lead to trouble. Maybe we should add some more comments/docs about this. |
I think this issue is blocked by #988. So I'm going to fix that first. |
Since #988 is ready for integration, I'm going to work on this one. Looking at the @rdmueller: do you mind if the wrapper script gets a major overhaul? |
@mh182 I don't mind a major overhaul, as long as things get better :-) |
Same issue here. I had to edit the |
@obfischer really? |
I was not aware of this option. |
With the PR I changed how The major change is that Explicit is better than implicit: the user has to use Usage: ./dtcw [environment] [option...] [task...]
./dtcw [local] install {doctoolchain | java | reveal.js}
Use 'local', 'sdk' or 'docker' as first argument to force the use of a specific
docToolchain environment:
- local: installation in '/home/max/.doctoolchain'
- sdk: installation with SDKMAN! (https://sdkman.io/)
- docker: use docToolchain container image Example:
Note: this change only affects the installation on the local environment. All other command invocations behave like before. So if someone installs Maybe we should make this consistent and ask the user to call Do you think we should integrate this user visible change? |
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install docToolchain locally. - Improve output: provide the concept of 'environments'. Refactorings: - Replace boolean flags which controlled dtcw behavior with associative arrays. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components. - Improve output: provide the concept of 'environments'. - Refactoring to replace 6 boolean flags with descriptive functions Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. - Show deprecation of 'getJava' - Skip 'install doctoolchain' if already installed Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. - Show deprecation of 'getJava' - Skip 'install doctoolchain' if already installed Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
- Fix bug docToolchain#1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. - Show deprecation of 'getJava' - Skip 'install doctoolchain' if already installed Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments.
* dtcw: closes #1031, improve output to guide the user - Fix bug #1031 - Fix: support of JAVA_HOME which was silently ignored. - Add `--version` option - dtcw API change: use explicit 'install' command to install components locally. - Improve output: provide the concept of 'environments'. - Show deprecation of 'getJava' - Skip 'install doctoolchain' if already installed Refactorings: - Replace boolean flags which `available_environments` and `dtc_installations`. Tests: - Use mocks for dtcw test suite to improve performance. - Added end-to-end tests for installation in 'local' and 'sdk' environments. * CI (dtcw): integrate dtcw tests into CI build Add new worflow dtcw-test which runs shellcheck, and if successfull, executes the test suite on Ubuntu and macOS runners. Don't run GHA workflow `default-build` when dtcw changes. GitHub Actions runners for macOS don't support running container images. Thus the test execution has to be done on the virtual machine. * CI build: remove obsolete resource/clone.sh * test powershell on windows with bats * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update dtcw-tests.yaml * Update DtcwOnPowershellSpec.groovy * extracted ps1 tests to extra file * some refactorings because of a 'shellcheck' * switch powershell.exe to pwsh * fixed tests * added os to report filename * added os to report filename * added os to report filename * added os to report filename * updated tests * removed chatGPT tests * fix report name --------- Co-authored-by: Max Hofer <mh182@chello.at>
Following the installation instructions as described in Install docToolchain with a newer Java version fails.
The reason is due my setup of having a JRE 17 and Docker installed.
I assume users with an installed Docker will prefer the
docToolchain
provided as a container image. But some people may prefer to install the tool chain even if they have docker installed.To Reproduce
System setup: Debian unstable with OpenJDK 17 and docker installed.
docToolchain
was installed withsdk install doctoolchain
.Steps to reproduce the behavior:
getJava
JAVA_HOME
to the previously downloaded JRE is ignoredExpected behavior
After executing
dtcw getJava
the newly installed Java RE is used.I would change the documentation in Install docToolchain and make a clear separation between following concepts:
docker
orpodman
)Side-note: the output about the missing Java environment is erroneous. Using
sdk install java
will pick the current JRE which is not supported bydocToolchain
.Additional context
Looking into the
dtcw
wrapper script is see that theJAVA_HOME
is only setup in case docker is not installed.The text was updated successfully, but these errors were encountered: