Skip to content
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

Ability to configure version prefix #893

Closed
hohwille opened this issue Sep 16, 2022 · 3 comments · Fixed by #934
Closed

Ability to configure version prefix #893

hohwille opened this issue Sep 16, 2022 · 3 comments · Fixed by #934
Assignees
Labels
enhancement New feature or request functions related to the collection of bash functions in functions[-core] file setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) update related to updating software or the entire devonfw-ide

Comments

@hohwille
Copy link
Member

hohwille commented Sep 16, 2022

As a devonfw-ide user, I want to use latest security fixes of tools but still be in control of e.g. major version so that my project team can work reliable but also up-to-date with minimum maintenance effort.

So e.g. for my project I might want to decide for Java 11. However, whilst using Java 11, I would like to have always the latest version available for Java 11. Currently there is no option to configure this:

  • Either I leave JAVA_VERSION unconfigured and once a new (even non LTS, kind of experimental) release gets available, my team will get it and things break
  • Or I have to configure JAVA_VERSION to the exact version number to the last digit.

Therefore, the idea is that I can set e.g. JAVA_VERSION=11* or JAVA_VERSION=11.0*.
Then, with this story being implemented, devonfw-ide would notice that this from the asterisk in the version.
Therefore, devonfw-ide (doInstall) would choose the first version from available-versions starting with the given version but not immediately followed by a digit. So JAVA_VERSION=11* would match 11.0.16.1_1 but not 111.2.3.

This slightly relates to issue #878

@hohwille hohwille added enhancement New feature or request setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) update related to updating software or the entire devonfw-ide Team_IDE functions related to the collection of bash functions in functions[-core] file labels Sep 16, 2022
@hohwille
Copy link
Member Author

hohwille commented Oct 10, 2022

I have done some more thinking about this and came to the following concern:

There may be a tool X with versions such as 11 and 11.1. Now if I set X_VERSION=11 it would be ambiguous if I want to have exactly version 11 or the latest 11* version. So it would be better to change this story in a way to avoid such ambiguity.
Therefore we should either add * as suffix to a version variable value in order to activate this feature or to end with a separator (11. would match 11.1 but 11 would only match 11 - but then also other separators such as - would need to be supported as well). Therefore IMHO using * as the common glob matching character would be the easiest but still most consistent solution.
In case of Java it might be slightly more intuitive for users to simply write JAVA_VERSION=11 than JAVA_VERSION=11* (and with * we have to be careful to avoid accidental bash globbing) but as a generic solution this makes the most sense to me and also it seems to be quite explicit and readable as 11* is obviously not a version but means 11 followed by anything (where the first character of "anything" is not a digit).

FYI: With this way it is easy for doInstall to detect if this feature is used (version ends with *) or not. If not the version does not even have to be contained in available-versions e.g. if a project wants to use a filtered version (e.g. release-candidate) of a tool on purpose. This should also still be supported and otherwise all this would be complicated as we do not easily know if the version is complete or only a prefix that needs to be resolved to a complete version by matching from available-versions.

@hohwille
Copy link
Member Author

Works but needs some special cases to be considered:

*** Setting up eclipse ***
You are using eclipse version 2022-06 that requires Java 11 or newer.
However, [EXTRA_]JAVA_VERSION is 11* - in this setup eclipse can not work.
Please update JAVA_VERSION, set EXTRA_JAVA_VERSION or downgrade ECLIPSE_VERSION in your settings/devon.properties!

Do you want to continue?
(yes/no): yes

@hohwille
Copy link
Member Author

Works but needs some special cases to be considered:

Fixed with latest commit.

@hohwille hohwille added this to the release:2022.08.004 milestone Oct 18, 2022
hohwille added a commit that referenced this issue Nov 7, 2022
… doInstall (#934)

* #878: insteall latest version if unspecified

* #933: fixed typo

* #878: insteall latest version if unspecified also for docker

* #878: added to CHANGELOG

* #826: excuse rule for cobigen added

* #878: fixed stupid bug

* #847: fix for global tools and cobigen

* #878: #933: fixes and improvements

* #893: ability to configure version prefix

* #940: handle silent mode in doInstall and simplify doSetup

* #934: shellcheck fix

* #934: CHANGELOG

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: need to implement on mac, small improvements for debugging

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: fix - thanks shellcheck

* #940: fixed doInstall java extra arg order

* #940: OMG: fixed custom tools bug

* #893: extended test and fixed doVersionCompare

* #934: removed code entirely

* #934: removed TODO

* #934: simplified

* #934: fixed download caching

* #934: fixed aws

* #934: keep code to remove aws installer

* #934: fixed typos

* #957: symlink fix

* #957: symlink fix

* #934: fixed gcviewer

* #934: shellcheck fix

* #934: shellcheck war starts

* #934: improve DEVON_SOFTWARE_PATH on win

* #934: shellcheck fix

* #958: make symlinks work on windows

* #958: updated documentation

* #934: improved DoD from review comment

* #934: define HOME always on top

* #960: prevent "oc version" error

* #940: improve MacOS workaround

* #934: fixed doMavenArchetype

* #934: fixed aws

* #934: aligned and simplified

* #940: fixes for MacOS workaround

* #940: MacOS quickfix for eclipse

* #911: further improvements for eclipse

* #934: shellcheck fix

* #934: nasty shellcheck

* #960: added to CHANGELOG

* #961: split functions, fixed intellij version command on mac

* #961: fixed function doc

* Fix Add-plugin and custom start parameter

I fixxed the add plugin function which forgot to call vscode with "--install-extension".
And I changed the run command so it passes the arguments given to the run method, so you can run vscode with custom start parameters aswell now.

For example:
devon vscode run --list-extension

* #934: removed debug output

* #961: fixed function doc

* #934: #943: improve vscode plugin installation

* rename pip-latest-windows to pip-latest-pip

There was in an error installing pip on Windows because the installation file was renamed from pip-latest-windows-py to pip-latest-pip.py

* use cg --version

* #934: added missing X flags

* #940: fixed MacOS Workaround

* #934: python fix due to doInstall installer missuse

* #934: improved doc for shared software

* #934: rancher fix due to doInstall installer missuse

* #934: kubectl shall not have knowledge about docker installation

Co-authored-by: Genetics <102921542+Amueller36@users.noreply.github.com>
Co-authored-by: alfeilex <101652401+alfeilex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request functions related to the collection of bash functions in functions[-core] file setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) update related to updating software or the entire devonfw-ide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant