-
Notifications
You must be signed in to change notification settings - Fork 133
fix: Update lsp dependencies #1190
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
Changes from 29 commits
2fd47bb
3eee414
6c44c5a
e2a449d
ff06464
774c41d
a7b9ebd
68fcf4e
df58322
07a4cc4
200b33e
c878a80
3c1d9e5
6c05f54
dcf536b
4dc94f9
d1c60a8
c375a61
133c2fa
8c5c9a4
be5ff58
10612fb
41862f3
910dda9
baa817e
acd59c0
af63534
dca4db0
bcf0eaf
5da3a3c
84d0722
0f12f9d
20e83f8
711cdc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="module" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="output" path="target/classes"/> | ||
| </classpath> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,39 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="src" path="src"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.4.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-text-1.10.0.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/opencsv-5.7.0.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/snakeyaml-1.30.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/json-simple-1.1.1.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-io-2.9.0.jar" sourcepath="lib/commons-io-2.9.0-sources.jar"> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="javadoc_location" value="jar:platform:/resource/com.espressif.idf.core/lib/commons-io-2.9.0-javadoc.jar!/"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="src" output="bin" path="src"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry exported="true" kind="lib" path="lib/json-simple-1.1.1.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-collections4-4.4.jar" sourcepath="lib/commons-collections4-4.4-sources.jar"> | ||
| <attributes> | ||
| <attribute name="javadoc_location" value="jar:platform:/resource/com.espressif.idf.core/lib/commons-collections4-4.4-javadoc.jar!/"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-io-2.9.0.jar" sourcepath="lib/commons-io-2.9.0-sources.jar"> | ||
| <attributes> | ||
| <attribute name="javadoc_location" value="jar:platform:/resource/com.espressif.idf.core/lib/commons-io-2.9.0-javadoc.jar!/"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.12.0.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/snakeyaml-1.30.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/opencsv-5.7.0.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.4.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/commons-text-1.10.0.jar"/> | ||
| <classpathentry kind="lib" path="lib/commons-compress-1.21.jar"/> | ||
| <classpathentry kind="lib" path="lib/xz-1.9.jar"/> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
| <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="module" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="output" path="target/classes"/> | ||
| <classpathentry kind="output" path="bin"/> | ||
| </classpath> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ | |
| import org.eclipse.cdt.core.build.ICBuildConfigurationManager; | ||
| import org.eclipse.cdt.core.build.ICBuildConfigurationProvider; | ||
| import org.eclipse.cdt.core.build.IToolChain; | ||
| import org.eclipse.cdt.core.build.IToolChainManager; | ||
| import org.eclipse.core.resources.IBuildConfiguration; | ||
| import org.eclipse.core.resources.IProject; | ||
| import org.eclipse.core.runtime.CoreException; | ||
|
|
@@ -27,7 +26,6 @@ | |
|
|
||
| import com.espressif.idf.core.IDFCorePlugin; | ||
| import com.espressif.idf.core.logging.Logger; | ||
| import com.espressif.idf.core.toolchain.ESPToolchain; | ||
|
|
||
| /** | ||
| * @author Kondal Kolipaka <[email protected]> | ||
|
|
@@ -51,80 +49,38 @@ public String getId() | |
| public synchronized ICBuildConfiguration getCBuildConfiguration(IBuildConfiguration config, String name) | ||
| throws CoreException | ||
| { | ||
| ILaunchBarManager barManager = IDFCorePlugin.getService(ILaunchBarManager.class); | ||
| ILaunchTarget target = barManager != null ? barManager.getActiveLaunchTarget() : null; | ||
| if (config.getName().equals(IBuildConfiguration.DEFAULT_CONFIG_NAME)) | ||
| { | ||
| IToolChain toolChain = null; | ||
|
|
||
| // try the toolchain for the current target | ||
| IToolChainManager toolChainManager = IDFCorePlugin.getService(IToolChainManager.class); | ||
| ILaunchBarManager barManager = IDFCorePlugin.getService(ILaunchBarManager.class); | ||
| try | ||
| { | ||
| ILaunchTarget target = barManager.getActiveLaunchTarget(); | ||
| if (target == null) | ||
| { | ||
| return null; | ||
| } | ||
| for (IToolChain tc : toolChainManager.getToolChainsMatching(target.getAttributes())) | ||
| { | ||
| if (tc instanceof ESPToolchain) | ||
| { | ||
| toolChain = tc; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| catch (CoreException e) | ||
| { | ||
| Logger.log(e); | ||
| } | ||
|
|
||
| // current didn't work, try and find one that does | ||
| if (toolChain == null) | ||
| { | ||
| for (IToolChain tc : toolChainManager.getToolChainsMatching(new HashMap<>())) | ||
| { | ||
| if (tc instanceof ESPToolchain) | ||
| { | ||
| toolChain = tc; | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
||
| if (toolChain != null) | ||
| { | ||
| return new IDFBuildConfiguration(config, name, toolChain); | ||
| } | ||
| else | ||
| { | ||
| // No valid combinations | ||
| return null; | ||
| } | ||
| Logger.log("Default config name is not supported"); //$NON-NLS-1$ | ||
| return null; | ||
| } | ||
| IDFBuildConfiguration cmakeConfig = new IDFBuildConfiguration(config, name); | ||
| ICMakeToolChainFile tcFile = cmakeConfig.getToolChainFile(); | ||
| IToolChain toolChain = cmakeConfig.getToolChain(); | ||
| if (toolChain == null) | ||
| { | ||
| Logger.log("Toolchain is null"); //$NON-NLS-1$ | ||
| // config not complete | ||
| return null; | ||
| } | ||
| if (tcFile != null && !toolChain.equals(tcFile.getToolChain())) | ||
| { | ||
| // toolchain changed | ||
| return new IDFBuildConfiguration(config, name, tcFile.getToolChain(), tcFile, cmakeConfig.getLaunchMode()); | ||
| return new IDFBuildConfiguration(config, name, tcFile.getToolChain(), tcFile, cmakeConfig.getLaunchMode(), | ||
| target); | ||
| } | ||
| else | ||
| { | ||
| return cmakeConfig; | ||
| } | ||
|
|
||
| } | ||
|
|
||
| @Override | ||
| public ICBuildConfiguration createBuildConfiguration(IProject project, IToolChain toolChain, String launchMode, | ||
| IProgressMonitor monitor) throws CoreException | ||
| public ICBuildConfiguration createCBuildConfiguration(IProject project, IToolChain toolChain, String launchMode, | ||
| ILaunchTarget launchTarget, IProgressMonitor monitor) throws CoreException | ||
|
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAPI method signature changed and renamed The method has been renamed from 🏁 Script executed: #!/bin/bash
# Check for any other code that might be calling the old method signature
rg "createBuildConfiguration\(" --type javaLength of output: 231 Action Required: Update API Call to the New Method Signature The API method in
Please update this invocation (and any similar references throughout the codebase) to use the new method name and include the required |
||
| { | ||
| // get matching toolchain file if any | ||
| Map<String, String> properties = new HashMap<>(); | ||
|
|
@@ -150,7 +106,7 @@ public ICBuildConfiguration createBuildConfiguration(IProject project, IToolChai | |
| } | ||
|
|
||
| // Let's generate build artifacts directly under the build folder so that CLI and eclipse IDF will be in sync | ||
| String name = ICBuildConfiguration.DEFAULT_NAME; | ||
| String name = ICBuildConfiguration.TOOLCHAIN_ID; | ||
| IBuildConfiguration buildConfig; | ||
| if (configManager.hasConfiguration(this, project, name)) | ||
| { | ||
|
|
@@ -162,7 +118,8 @@ public ICBuildConfiguration createBuildConfiguration(IProject project, IToolChai | |
|
|
||
| } | ||
|
|
||
| CBuildConfiguration cmakeConfig = new IDFBuildConfiguration(buildConfig, name, toolChain, file, launchMode); | ||
| CBuildConfiguration cmakeConfig = new IDFBuildConfiguration(buildConfig, name, toolChain, file, launchMode, | ||
| launchTarget); | ||
| configManager.addBuildConfiguration(buildConfig, cmakeConfig); | ||
| return cmakeConfig; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,22 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="module" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="src" path="src"/> | ||
| <classpathentry kind="src" output="target/classes" path="src"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry exported="true" kind="lib" path="svd" sourcepath="svd"/> | ||
| <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="output" path="target/classes"/> | ||
| </classpath> |
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.
💡 Verification agent
🧩 Analysis chain
Launch target propagated only on toolchain change
targetis passed to theIDFBuildConfigurationconstructor only when the tool‑chain differs from the CMake tool‑chain file.For the common path (tool‑chains equal) the build configuration will miss the launch target, which can later surface as a
nullwhen resolving debugger paths (compare the stack‑trace shared in the PR discussion).Consider always wiring the launch target:
To verify whether the launch
targetis indeed only wired in the tool‑chain‐change branch, let’s inspect both thenew IDFBuildConfigurationinvocations and thereturn cmakeConfigbranch:🏁 Script executed:
Length of output: 1897
Always wire the launch
targetin both branchesBoth the “toolchain changed” path and the default path currently return different constructors—only the former includes
target. In theelsebranch the launch target is never set, leading to a null later in debugger resolution.Please update in
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfigurationProvider.javaaround the toolchain‐check:
This ensures
targetis passed into everyIDFBuildConfigurationinstance.📝 Committable suggestion