I have a Library on build.particle.io WEB IDE. I have added a new example to the github repo for the library and updated the version in the Spark.json file. What do I need to do to get build to pull in these changes to the library on the IDE?
You just do as you did when you first contributed it.
You “old” lib will still be valid and your new version only visible to yourself till you publish it.
So I just contribute a new library with the same name and everything, then publish it? I assume users will only see the new library and not the old one so it will overwrite? Any idea how long it takes for this update to become visible to users?
Yup, that’s how you do it.
It will be available immediately but since the library list is cached on the user’s side they’d need to REFRESH LIBRARIES in the libraries drawer or might even have to CLEAR CACHE in the settings drawer.
Your previous versions will still be available too via the
(i) icon next to the library name.
It was the browser cache that was getting me. I opened an incognito tab and the Library is updated. Stupid Browser Cache, not the first time its got me!
If have the same issue. I have updated my library using GIT. In spark.json I set version 0.0.7.
After opening particle build my library version is displayed as 0.0.6. This is a valid but old version.
I tried in particle build: clear cache, refresh libraries
I tried clearing my browser cache.
But library version in particle builds stays at 0.0.6 and doesn’t update to 0.0.7
My library : https://github.com/df3xc/rsl_switch
How to proceed ?
If I walk through the history of my spark.json it shows version
So 0.0.6 is missing in GitHub. But in Particle Build version 0.0.6 is displayed.
There is version 0.0.6 stored. Do you copy from GitHub to another location before exposing the library to particle build ?
With the history you mean the pop-up that comes up in Particle Build when hitting the
(i) icon next to your lib name?
If so, this shows you which other versions can be selected, but the one you have currently selected will not be displayed, since you won’t need to select it again.
0.0.7 this should switch over to it.
I guess you haven’t published 0.0.7 yet, since I can’t see it either.
Have you checked that you properly imported the library and got a flag next to the library name in Build?
Thank you for spending your time.
I have changed and updated the library outsite particle build IDE. I pushed the changes using GIT.
I was not aware that I have to update the library with Particle Build too:
- contribute library using my GIT URL
- publish library
Finally my library version 0.0.7 became visible in Particle Build.
Still open point : Why can’t I edit the source code of my library using Particle Build. It is listed as my library.
The reason why you can’t just edit the library once it was published has at least two sides.
In technically not absolutely correct words:
One is that the library got uploaded to the Particle Build library repository to which you don’t have direct write access.
And the second is that once published libraries will be included in other peoples projects, but if you had write access you could break other peoples projects by just altering the existing version - hence it’s prohibited.