Skip to content

fix update check if current version type is stable#2527

Merged
sunderme merged 4 commits intotexstudio-org:masterfrom
octaeder:updatecheck
Aug 12, 2022
Merged

fix update check if current version type is stable#2527
sunderme merged 4 commits intotexstudio-org:masterfrom
octaeder:updatecheck

Conversation

@octaeder
Copy link
Copy Markdown
Contributor

@octaeder octaeder commented Aug 11, 2022

This PR will fix a problem with current stable version 4.3.0. When updates are checked result is:

image
The second 0 is the revision that is printed after the version type (which should be "stable", s. next section).

Reason: Conversion of string "4.3.0" into a version object leaves type as null string instead of assigning "stable". This was intended to remember that the string was not the equivalent one "4.3.0stable0" (which would be accepted but is never used). But printing the version always suppresses stable0, so a null string for type is obsolete.

This is fixed and I added printing some debug information. Further I added a message for the case that the current version object isn't valid (note that type is empty in the message):

image
This is accompanied by a new auto test for this case.

Final test running txs now shows the message expected:

image

TSXVERSION changed to 4.3.1 shortly after releasing 4.3.0, but next (dev) builds are based on 4.3.0 (shown by git 4.3.0-n-g in About dialog). So we better use 4.3.0 from git number. 4.3.1 versions (alpha, beta, rc, and stable) will show git 4.3.1..., so this should be ok.
@octaeder octaeder marked this pull request as ready for review August 11, 2022 23:19
@sunderme
Copy link
Copy Markdown
Member

there is still debug code in the PR ...

@octaeder
Copy link
Copy Markdown
Contributor Author

I thought this is ok, since it only runs if you have a debug build and run the update check.

@sunderme
Copy link
Copy Markdown
Member

I would prefer not to have debug code in it.
It makes things confusing if I look for something else.

@sunderme
Copy link
Copy Markdown
Member

and it messes up autotest output

@sunderme
Copy link
Copy Markdown
Member

I would prefer to remove the debug code completely as it degrades code readability

for better readable code
@sunderme sunderme merged commit 89886ff into texstudio-org:master Aug 12, 2022
@sunderme
Copy link
Copy Markdown
Member

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants