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

IEP-1301: Null Build error if you're building a project with out any esp-idf version #1062

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.debug.core.DebugPlugin;
Expand Down Expand Up @@ -278,7 +280,12 @@ private IBinary[] getBuildOutput(final IBinaryContainer binaries, final IPath ou
public ICMakeToolChainFile getToolChainFile() throws CoreException
{
ICMakeToolChainManager manager = IDFCorePlugin.getService(ICMakeToolChainManager.class);
this.toolChainFile = manager.getToolChainFileFor(getToolChain());
IToolChain toolChain = getToolChain();
if (toolChain == null)
{
throw new CoreException(new Status(IStatus.ERROR, IDFCorePlugin.PLUGIN_ID, Messages.IDFToolChainsMissingErrorMsg));
}
this.toolChainFile = manager.getToolChainFileFor(toolChain);
return toolChainFile;
}

Expand Down Expand Up @@ -388,6 +395,8 @@ private boolean buildPrechecks(IConsole console) throws Exception

return false;
}



return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class Messages extends NLS
public static String ToolsInitializationDifferentPathMessageBoxTitle;
public static String ToolsInitializationDifferentPathMessageBoxOptionYes;
public static String ToolsInitializationDifferentPathMessageBoxOptionNo;
public static String IDFToolChainsMissingErrorMsg;

public static String RefreshingProjects_JobName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ ToolsInitializationDifferentPathMessageBoxOptionYes=Use New Path
ToolsInitializationDifferentPathMessageBoxOptionNo=Use Old Path
RefreshingProjects_JobName=Refreshing Projects...
IDFBuildConfiguration_PreCheck_DifferentIdfPath=The project was built using the ESP-IDF located at the {0} path.\nThe currently active ESP-IDF path in the IDE is {1}.\nPlease clean the project using "ESP-IDF:Project Full Clean" menu option to use the active ESP-IDF configuration.
IDFToolChainsMissingErrorMsg=Toolchains are missing. Please use ESP-IDF Manager for configuring
Loading