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

Project dependency on https://github.com/Candas1/Arduino-FOC.git requires manual process to update #3

Open
robcazzaro opened this issue Jun 18, 2023 · 13 comments

Comments

@robcazzaro
Copy link

I just realized that when there is a checkin in https://github.com/Candas1/Arduino-FOC.git, it doesn't get automatically processed just by updating (pull) this project.

To make sure all the most recent changes in https://github.com/Candas1/Arduino-FOC.git are picked up, the safest way is to remove the .pio directory and let Platformio re-download the most recent code from github.

Otherwise it's possible to copy the changed files into .pio\build\libdeps\GD32F130C8\SimpleFOC\ and .pio\build\libdeps\GD32F130C8\SimpleFOC\

This is simply a side effect of not having released versions of the GD32 SimpleFOC and the ability of updating them from the Platformio UI

@Candas1
Copy link
Owner

Candas1 commented Jun 19, 2023

Hi Rob,

I was using this command to update arduino-gd32 after fixes have been published.
It can probably be used to update all dependencies.

@robcazzaro
Copy link
Author

It is possible to open the Platformio Core CLI and issue a command like pio pkg update -l

But it requires a library name. And when I list the installed packages for the project I get

PS C:\GD32\Candas> pio pkg list      
Resolving GD32F130C8 dependencies...
Platform gd32 @ 1.0.0+sha.3424e66 (required: git+https://github.com/CommunityGD32Cores/platform-gd32.git)
├── framework-arduinogd32 @ 4.20000.210603+sha.dfa7ccb (required: git+https://github.com/CommunityGD32Cores/ArduinoCore-GD32.git)
├── tool-dfuutil @ 1.9.200310 (required: platformio/tool-dfuutil @ ~1.9.190708)
├── tool-openocd-gd32 @ 2.1100.211207 (required: communitygd32cores/tool-openocd-gd32 @ ~2.1100.0)
├── tool-sreccat @ 1.164.0 (required: platformio/tool-sreccat @ ~1.164.0)
├── tool-stm32duino @ 1.0.2 (required: platformio/tool-stm32duino @ ~1.0.1)
└── toolchain-gccarmnoneeabi @ 1.90201.191206 (required: platformio/toolchain-gccarmnoneeabi @ ~1.90201.0)

Libraries
├── RTT Stream @ 1.4.0 (required: koendv/RTT Stream @ ^1.3.0)
│   └── ANSI @ 0.2.0 (required: ANSI)
└── Simple FOC @ 2.3.0+sha.7cff1fa (required: git+https://github.com/Candas1/Arduino-FOC.git)

For the "gd32" package, the command pio pkg update -g -p gd32 works, because it recognizes gd32 as a platform name

@robcazzaro
Copy link
Author

I just tried this pio pkg update -l "Simple FOC" and it seems to work

PS C:\GD32\Candas> pio pkg update -l "Simple FOC"
Resolving GD32F130C8 dependencies...
Library Manager: Simple FOC@2.3.0+sha.7cff1fa is already up-to-date
Already up-to-date.

I will wait until you make any change to your Simple FOC and try again. If it works, we can document how to update both GD32 and SimpleFOC and close this issue

@Candas1
Copy link
Owner

Candas1 commented Jun 19, 2023

I used it without a parameter and it worked

@robcazzaro
Copy link
Author

Yes, but I was worried about side effects potentially updating other Platformio projects. I have a few dozens Platformio projects for all processors with various version of libraries. Updating the wrong library would mess up things badly (sometimes a newer library is incompatible and breaks a 3 years old project)

with pio pkg update -l "Simple FOC" it's guaranteed to only update that single library

@Candas1
Copy link
Owner

Candas1 commented Jun 19, 2023

ok I thought it was only updating dependencies for the current project/environment.

@robcazzaro
Copy link
Author

Yes, it should update only the current project. But, for example, GD32 is global so it updates it for all projects. And if you have multiple projects open, it's possible to open the CLI on another project without realizing.

By adding the -l "Simple FOC", you are guaranteed to only update that one. It's not that running it without parameters is "wrong", it's just safer to add the -l "Simple FOC". One thing I learned over many years coding, is that mistakes happen unless you do everything to ensure that a mistake is very hard to make. It's the concept of "design induced errors", common in so many fields. Since we are documenting things for potentially others to help, I thought it's better to have as few potential problems as possible

@Candas1
Copy link
Owner

Candas1 commented Jun 19, 2023

I added those extra scripts
image

What is weird is if I run the simpleFOC update, it adds lib_deps to each environment:
image

@Candas1
Copy link
Owner

Candas1 commented Jun 19, 2023

Ah we can probably use that

@robcazzaro
Copy link
Author

Good idea adding the Custom option!

Incidentally, for the time being I would remove the C6 environment. We are all using C8 and having both can cause confusion for some future new contributor. I also found it takes longer to update as it copies the libraries to multiple directories

@Candas1
Copy link
Owner

Candas1 commented Jun 20, 2023

I wanted to use the same layout as Robodurden is using for his tests, this layout has a C6 chip.

@RoboDurden
Copy link
Contributor

@Candas1 now i am a little bit confused myself :-) My test setup with cc power supply that i have with me in my solar camper is a gen2.0 board with c8 chip. The gen2.5 test setup with c6 is back at my train station.

@Candas1
Copy link
Owner

Candas1 commented Jun 20, 2023

Well I am either stupid or blind.
I have always thought it was a C6.
So I am wasting our time.
My fault sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants