-
Notifications
You must be signed in to change notification settings - Fork 25
Add Delphi 10.2 Tokyo support via dedicated client and tool frame #101
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
base: master
Are you sure you want to change the base?
Add Delphi 10.2 Tokyo support via dedicated client and tool frame #101
Conversation
fourls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @andrevfarias, thank you for the PR! It mostly looks good and I'm happy to accept most of its changes to improve compatibility with older Delphi versions.
I have made some comments. Because I do not have Tokyo installed, I will not be able to test it or ensure any quality guarantees.
Many teams still use Delphi 10.2 Tokyo, and the main client relies on components not available there.
I'm not super comfortable with how specific this change is to 10.2. Many teams still use Delphi 7, XE3, etc, but that doesn't seem like a reason to require a separate tool frame for each of those versions as well. Could we reframe this as a more general "legacy tool frame" instead of something specific to a minor release of the compiler?
Also, the build script should not be updated to build unsupported versions of Delphi. The purpose of the build script is for packaging and release, which won't need to be done for unsupported versions. There's also nothing special about 10.2 that necessitates it being added to the build script, and it implies a guarantee that it will be compatible (which there is not).
The script doesn't do anything fancy, so if you'd like to compile an unsupported version's BPL it can just be compiled in the IDE / via MSBuild / whatever approach is best for your setup. Or by making the changes to the build script locally.
|
|
||
| if not TFile.Exists(FLogPath) then begin | ||
| FreeAndNil(TFile.Create(FLogPath)); | ||
| TFile.Create(FLogPath).Free; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of these changes?
| Hook.Free; | ||
| end; | ||
| FreeAndNil(FPopupHooks); | ||
| FreeAndNil(FPopupHooks); // Remover? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this comment mean?
|
|
||
| function TRuleHtmlGenerator.BuildHtmlPage(BodyHtml: string; BodyClass: string): string; | ||
|
|
||
| function GetLegacyScript: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Webpack/Babel can polyfill for old IE versions (see client/jslib/webpack.config.js) so there's no need to include it ourselves. Could you identify the IE version you want to support and try configuring webpack to bundle for that version?
| {$IF CompilerVersion < 33.0} | ||
| (BorlandIDEServices as IOTAIDEThemingServices250).RegisterFormClass(FormClass); | ||
| {$ELSE} | ||
| (BorlandIDEServices as IOTAIDEThemingServices).RegisterFormClass(FormClass); | ||
| {$ENDIF} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to do the ifdef here, just change to 250 if it's a compatibility issue. Newer Delphi versions also have the 250 version.
| begin | ||
| LintContext.IDEServices.ApplyTheme(Self); | ||
| WindowColor := StyleServices(Self).GetSystemColor(clWindow); | ||
| WindowColor := StyleServices.GetSystemColor(clWindow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this trailing whitespace.
| begin | ||
| LintContext.IDEServices.ApplyTheme(Self); | ||
| WindowColor := StyleServices(Self).GetSystemColor(clWindow); | ||
| WindowColor := StyleServices.GetSystemColor(clWindow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this trailing whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please
- Translate comments to English
- Remove Tokyo-specific references
- Include this unit in all DelphiLintClient dprojs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this change. As stated previously, we will not be officially supporting building for versions of Delphi before Delphi 11, especially not specifically for 10.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this change?
| if (properties.containsKey("sonar.sourceEncoding")) { | ||
| return Charset.forName(properties.get("sonar.sourceEncoding")); | ||
| } else if (properties.containsKey("sonar.encoding")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this seems like a legitimate bug, thanks for picking this up. Could you move this out into a separate commit?
This PR introduces initial compatibility for Delphi 10.2 Tokyo by adding a dedicated client build and a Tokyo-specific tool window implementation. It addresses the request to support older Delphi IDEs, motivated by issue #14.
Summary of changes
DelphiLint.ToolFrame.Tokyo.pas/.dfm, usingTListViewandTWebBrowser(SHDocVw) instead of newer components that are not available on 10.2.client/source/DelphiLintClient250.dpk,DelphiLintClient250.dproj, and group projectclient/DelphiLintClientProjects250.groupproj.client/test/DelphiLintClientTest250.dpr/.dproj.DelphiLint.Plugin.passelectsDelphiLint.ToolFrame.TokyowhenCompilerVersion < 33.0.DelphiLint.IDEContext.pasusesIOTAIDEThemingServices250where required.scripts/build.ps1updated to support version250(Tokyo), map registry version19.0, and useDCC_UseMSBuildExternally=trueto avoid long command-line issues.Why
Build notes
build.ps1 250).Impact