Platform with >1 specific commit

Hello,

from the documentation Redirecting... it is possible to use a development version from git + a specific commit, is it also possible to use more than one commit?

…What is it supposed to do when it gets two commit hashes? Combine the two versions? oO

1 Like

When you specify a commit as the point in history to use, it does mean ‘use the code as of this commit, inclusive of all prior commits’… so if that is what you mean by ‘more than one commit’, yeah, sure, you can do that… but you can’t say ‘use this platform (as of what version/commit?!) + these two random commits’ because, well, for starters, what do you want to happen when there are conflicts?

platformio could shown an error message in case of merge conflict and if the users wants to solve them he could do it

Could, but I bet it won’t happen. To my mind, this would go against the whole idea of your platformio.ini configuring your project so that it’s transferable to another system… if it’s interactive, and the user can make a different choice which then breaks something, then it’s not repeatable/transferable. If that sort of thing was wanted, it would probably be better to have a git folder that is already configured and just pull from that. Then again, I’m just one of many users, so if more people want that sort of feature, and it was feasible, it might happen!

1 Like

yep, I agree, not portable. Maybe it could just throw an error in case of a merge conflict, otherwise everything would go well and it would be portable

1 Like

@pfeerick do you know to specify a custom folder as you suggested?

from the docs Redirecting... it seems that only https://github.com/platformio/platform-* links are supported.

How can I set platform to, for example, to esp32 master/branch/commit?

The platformio.ini platform parameter syntax includes tags,branch,commits… i.e. the docs indicate, the same format as platformio platformio install is valid for platform =

platformio platform install <repository#tag> (“tag” can be commit, branch or tag)

But that doesn’t help you. What about the following?

platform_packages =
  ; use upstream Git version
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git

It overrides just the framework package, which should do what you want.

1 Like

yes, overriding only the framework seems the best idea, I guess I can point also to other repo. In case I need to do some tests I could fork the framework and change what I need for example:

platform_packages =
  ; use upstream Git version
  framework-arduinoespressif32 @ https://github.com/aster94/arduino-esp32.git
1 Like