-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Core 5.0.x can't handle platform-packages directive #3693
Comments
It should be?
|
This comment has been minimized.
This comment has been minimized.
then I've deleted the custom package dir manually, so it started to install:
|
The old core has installed the custom packages as |
Could you re-test with the latest |
Will test soon, thank you. However, until then a comment: The new Core 5.x claims 100% backward compatibility with 4.x projects. Your request to add a "platformio/..." prefix breaks backward compatibility....
|
Ok, it succeeds when I _do not _ use the custom packages directive, but it FAILs with custom-package directive
|
If I comment out the
|
Note, that PlatformIO did not attempt to installt the correct platform-package from github, maybe the stale bogus package, which contains some MIDI-test shit is cause of the problem? |
Ok, after manually removing the stale custom-package via PIO-Home UI, the bogus MIDI-test package has gone. Platformio now started to install the custom-packages, but again messed up with the non-custom variant of the same library. It seemingly tried to install ON TOP of the existing (non-custom) arduinoadafruitnrf52 framework. I as a PlatformIO user want/need to use both framework packages simultaneously. Installing one on top of other is not acceptable.
|
ok, I have restarted the PlatformIO-IDE, which cleared the file-access problem. Obviously that was some multihread race condition, i.e., you need to check your semaphores...
|
This crap has been installed instead of the real packages: |
I looked around a little bit:
|
I don't see |
@ivankravets, it might be so, I will check upstream. However, does that justify to install some MIDI-test crap instead??? |
Yes, that is a reason. The package manager looks recursively for |
By all respect, I disagree @ivankravets. That might trigger the bug in the pkg. management, but it is still a bug, nonetheless. Silently installing some nonsense due to a broken package content and then later failing with misleading compile time messages --- that is a bug, IMHO. |
Manifest is the only genuine information. People keep packages in the different strucutres. We recommend to keep manifest in the root. Others prefer to have an intermediary folder between root. So, if you have package.json in the root and it does not work - please open issue. We are not responsible for the packages without manifests or with broken. |
ok, so then the trigger for the bug is that I've referenced a clone of the original _ Adafruit framework, not the clone of the PlatformIO package of the said framework... This worked fine with 4.xPlatformIO :/ |
I'm sorry I'm a little lost here, do we have a work around for why forking a BSP does not work? |
It works. Just fork it and add |
@ivankravets: I tried to check the package.json for the non-modified Adafruit_nRF52_Arduino platform package. IIRC the command for this in 5.0.x:
|
Restarting the IDE did not help either:
|
Sorry, no idea. Thoundsands of develoeprs use PlatformIO everyday. You are the first with this issue. Let's wait for more reports. I don't know what I can advice. Windows brings a ton of problems latest times. Alsom people install spy "antivirus" software which blocks Python. Try to remove We discuss here PlatformIO Core issues. |
@orrmany i can verify on my end the command works on OSX |
Great! How did you fix it? |
I haven't done full test yet, just verified the access command is there (didn't do anything) will hopefully try fixing build tommorrow |
@ivankravets It looks like it is some deadlock here. Adafruite doesn't want to add package.json, see adafruit/Adafruit_nRF52_Arduino#571 and I see their point about not updating version there. PlatformIO insists on the file that was not required before. So what is the solution - only fork and add the file? |
For more details see: adafruit#571 platformio/platformio-core#3693
Yes, just fork and put |
@ivankravets, in other words: you require that the package metadata be part of the package. That is a problem for all of your package maintainers with 3rd pty libraries. Now they have create and maintain a fork just for the sake of adding a metadata... |
Yes, that was the step to remove these issues when people try to install "hello-monkey" as a dev-platform. Then contact us and ask why the monkey does not speak. So, let's protect beginners from monkeys and improve our UX. |
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
@ivankravets , a looser question maybe: how can I find the URL of the repo containing the platformio framework packages, i.e., where PlatformIO team maintains the PlatformIO fork of the Adafruit framework library? The repo, where the PlatformIO team has added your version of package.json to the Adafruit code? I would like to study your fork (and your other package-forks, as well) |
We don't have forks because we don't modify official software. The only what we do - we put |
Is there any step-by-step tutorial, how can an innocent user, like me, who has had a valid solution for his custom framework hack in PlatformIO 4.x which just had worked, migrate to 5.x? The only reason I have had to fork the Adafruit framework is for adding ANT+ radio support, which Adafruit cannot embrace due to legal reasons. The guy who has originally made the PlatformioIO integration hack for me has gone long ago. I am extremely frustrated: I have had a setup that worked in 4.x and 5.x just broke it and I am lost now. I do not want to learn how to develop/hack PlatformIO, I just want to use it I have read https://docs.platformio.org/en/latest/core/migration.html but it is no help. That document sucks for non-insiders, I am sorry: it describes what has been changed but gives zero clue for me how shall I fix my previously working stuff... I do not want to spend days on learning PlatformIO internals, I couldn't care less. It is an extremely frustrating situation and it directly invalidates the original promise of PlatformIO: make a dev.env., which "just works"... :( |
@orrmany Very good question! So, found the root why do you need to work official package. Could check these docs https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#override-package-files ? If it is not clear, we would be happy to improve. So, the goal is that you will not worry about the framework package. You will just patch it to your needs. This will help you to be up-to-date with the latest framework and apply your changes. |
Ok, thanks! Considering that adding the ANT+ radio support is not a simple diff, but in fact a bunch of additional files and several modifications to the original files, so I use git and a forked repo. Do you suggest that
|
I have to say I need to contest what you write here, @ivankravets. What helps me to be up-to-date with the latest framework and apply my changes is to keep my fork in sync with upstream. I have to do that regardless of PlatformIO both for my sake and for the sake of my GitHub downstream followers. Requiring me to redo this syncig in the PlatformIO build system really sounds as pure waste. I fail to understand why is it "easier" than I just being able to tell PlatformIO to "use this alternative forked repo instead of the upstream repo"?? What changes I've made to my fork w.r.t. the upstream library shall not be the business of the PlatformIO build system in any way, IMHO... |
You can, I still do not understand your issue. Everything works as expected. We just fixed a historical issue. If the PlatformIO package manager does not want to install an unknown package it does not mean that we broke something. Over 1,000 issues related to "this freedom" which we had in PlatformIo Core 4.0. |
So you are saying this was never feature but an unfixed bug that we could just pass in a platform-packages repo that was simply a fork as an override? |
You can do this with PlatformIO 5 as well. It has full support to override the default package with a package from a git. |
Adding package.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding package.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Finally made the build working again under Core 5.0.3 by adding a package.json and creating a platform.json, as well, for my platform fork, too. (I had to create a platform fork as I wanted to create a new board type for the modified firmware. |
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Adding packgae.json to make this fork PlatformIO Core 5.x compatible See https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/571/files and platformio/platformio-core#3693
Configuration
Operating system: Windows 10 64bit
PlatformIO Version (
platformio --version
): 5.0.1.Description of problem
Platformio mishandles platform-packages directive
Steps to Reproduce
build your project. Observe that Platformio downloads and install the nRF55 platform with its toolchain, then it builds the project succesfully
Edit your platformio.ini. Remove the leading semicolon from the front of the line:
platform_packages = framework-arduinoadafruitnrf52 @ https://github.com/orrmany/Adafruit_nRF52_Arduino.git#develop-ant-plus-ble
attempt to build
Actual Results
The build fails, the build script asserts (due to faulty download of wrong platform packages), like this:
Expected Results
It should build normally using the nRF52 platform fork https://github.com/orrmany/Adafruit_nRF52_Arduino.git#develop-ant-plus-ble
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
Obviously, PlatformIO downloads some bogus "midi-test" v. 1.0.0. package instead of the nRF52 platform fork above
The text was updated successfully, but these errors were encountered: