Skip to content

Weirdness with some platforms not being visible #3851

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

Closed
matthijskooijman opened this issue Sep 23, 2015 · 4 comments
Closed

Weirdness with some platforms not being visible #3851

matthijskooijman opened this issue Sep 23, 2015 · 4 comments
Assignees
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug
Milestone

Comments

@matthijskooijman
Copy link
Collaborator

I have a bit of a peculiar setup, apparently, which seems to confuses the Arduino IDE. My setup is that I have a symlink Sketchbook/hardware/arduino/avr pointing to arduino_git_checkout/hardware/arduino/avr. The reasoning here is that, while working on the Arduino AVR core files, I can test them by hitting recompile in the IDE, instead of also having to recompile the IDE itself to copy the right files into build/linux/work where they are normally loaded from.

So far, this setup has worked great (and, for the AVR core, it still does). However, I recently tried to install the SAMD core through the boards manager. It is now installed, and listed as such in the board manager, but its boards are not shown in the menu.

I did a bit of digging, and found out that BaseNoGui:

  1. Loads any packages/platforms from the builtin hardware directory.
  2. Loads packages/platforms from the ContributionsIndexer (e.g. any platforms and versions listed in the package JSON files).
  3. Loads packages/platforms from the sketchbook hardware directory.

However, in each step, it completely overwrites the full (previous) package. Since the ContributionsIndexer actually looks at the builtin hardware folder (and possibly the sketch folder as well?), that won't run into problems (as long as the versions are all listed in the JSON). However, the last step overwrites the "arduino" package with a package containing just the "avr" platform from my sketchbook directory.

While writing this, I realized that I should probably just clone the samd repository too and add a similar symlink to it, which should probably fix my problem. However, I do wonder if this handling can somehow be improved. While reading the code, I actually wondered if we really need all this special handling of "packages" in the first place? Perhaps we can just use a flat list of platforms only, using the package name as a name prefix to qualify the platform names, but without having any Java objects for them?

@matthijskooijman
Copy link
Collaborator Author

I just tried adding the symlink to samd, which seems to work (it even picks up the tools needed from ~/.arduino15/packages, nice).

@ffissore ffissore self-assigned this Sep 25, 2015
@ffissore
Copy link
Contributor

Uhm I didn't know but I'm not surprised. At least, it's all solved in arduino-builder, which merges all definitions it finds instead of replacing them. I'll fix that on the IDE side too

@ffissore ffissore added Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug labels Sep 25, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Sep 25, 2015
@ffissore
Copy link
Contributor

Fixed. Fix will be available with next hourly build http://www.arduino.cc/en/Main/Software#hourly

@matthijskooijman
Copy link
Collaborator Author

Looks good, thanks!

sandeepmistry pushed a commit to sandeepmistry/Arduino that referenced this issue Sep 29, 2015
…(for example) in sketchbook/hardware, but merge their contents. Fixes arduino#3851
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants