intersystems / git-source-control

Server-side source control hooks for InterSystems' platforms to facilitate use of git, especially in shared and/or remote development environments and for interoperability graphical editors
12 stars 7 forks source link

IRIS 2022.1 too old? #513

Closed EnricoParisi closed 2 weeks ago

EnricoParisi commented 2 weeks ago

After long wait, I've finally installed the latest git-source-control (v.2.5.0) and noticed that opening the Git UI and clicking "Workspace" I got an error window (invalid character in line 2355 in git-webui.js). After some debugging I found that the original error was "%Prepare^%SQL.Statement.1".

The problem is in the method GetOtherDeveloperChanges() in SourceControl.Git.Change.cls where the %Prepare() method is called with two arguments and my IRIS version expect only 1 parameter for %Prepare() in %SQL.Statement.

The system I'm testing is using IRIS 2022.1 (IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT), interestingly my local class reference and indeed %SQL.Statement class code does not have a second parameter in %Prepare(), however, in the online 2022.1 class reference %Prepare() does have two parameters. Evidently a "bug" in online documentation. I don't have a 2023.1 to test, therefore I'm not sure if the second parameter of %Prepare() was introduced in 2023.1 or 2024.1.

The new second parameter for %Prepare() was introduced in git-source-control with commit "now not checking sql privileges and properly gets files from other user" on Jul 2, 2024.

There is also a %Prepare() with 2 parameters in the GetContexts() method in SourceControl.Git.Utils.cls.

I think that requiring IRIS 2023.1 (or 2024.1??) as minimum version is a bit "too much" given the installed base, after all 2022.1 is not THAT old! For the moment I've removed the second parameter from the two %Prepare().

isc-tleavitt commented 2 weeks ago

@EnricoParisi thank you - good catch. IRIS 2022.1 shouldn't be too old.

%Prepare with 2 parameters is in the 2022.1 class reference: https://docs.intersystems.com/iris20221/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25SQL.Statement#%25Prepare

Looking at internal records, it seems that this argument/feature is first in 2022.1.1 and 2021.1.3 (internal ref: DP-412965). So close!

@isc-etamarch could you look into options for backward-compatibility on this as a next priority?

isc-etamarch commented 2 weeks ago

[like] Elijah Tamarchenko reacted to your message:


From: Tim Leavitt @.> Sent: Wednesday, October 2, 2024 4:30:18 PM To: intersystems/git-source-control @.> Cc: Elijah Tamarchenko @.>; Mention @.> Subject: Re: [intersystems/git-source-control] IRIS 2022.1 too old? (Issue #513)

@EnricoParisihttps://github.com/EnricoParisi thank you - good catch. IRIS 2022.1 shouldn't be too old.

%Prepare with 2 parameters is in the 2022.1 class reference: https://docs.intersystems.com/iris20221/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25SQL.Statement#%25Prepare

Looking at internal records, it seems that this argument/feature is first in 2022.1.1 and 2021.1.3 (internal ref: DP-412965). So close!

@isc-etamarchhttps://github.com/isc-etamarch could you look into options for backward-compatibility on this as a next priority?

— Reply to this email directly, view it on GitHubhttps://github.com/intersystems/git-source-control/issues/513#issuecomment-2389104733, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BF5VKWGT3EAGYY3GYSIBSKDZZQNRVAVCNFSM6AAAAABPH7V7K6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBZGEYDINZTGM. You are receiving this because you were mentioned.Message ID: @.***>