Skip to content
Merged
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions arduino-core/src/processing/app/BaseNoGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,14 @@ static public PreferencesMap getBoardPreferences() {

// Add all tools dependencies from the (possibily) referenced core
String core = prefs.get("build.core");
if (core.contains(":")) {
if (core != null && core.contains(":")) {
String split[] = core.split(":");
TargetPlatform referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced);
if (referencedPlatform != null)
requiredTools.addAll(referencedPlatform.getResolvedTools());
if (referenced != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't an error be given when a referenced core does not exist?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmh, good idea 😄
Compilation would fail anyway, so the problem should be solved by the maintainer (Arrow SAMD boards and Win10 IoT core are affected). However a message is ok, I'm pushing it tomorrow

ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced);
if (referencedPlatform != null)
requiredTools.addAll(referencedPlatform.getResolvedTools());
}
}

String prefix = "runtime.tools.";
Expand Down