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

Using Specific Commit/tag of arduino core may not be working as expected for submodules #3060

Closed
arihantdaga opened this issue Sep 28, 2019 · 1 comment

Comments

@arihantdaga
Copy link

commented Sep 28, 2019

What kind of issue is this?

  • [ X ] PlatformIO Core.

Configuration

Operating system: Mac Os

PlatformIO Version 4.1.0b1

Description of problem

I am using platformio for my esp8266 project with arduino framework.
I found that we can use git urls for installing custom/staging version of the core.
I have a url like this - where i want to use the core upto a specific commit.
https://github.com/arihantdaga/Arduino.git#961b558a91caf9589cdf0daa76a2aafd4a6ec568
We are using package manager's _install_from_url method and then calling vcsclient.export().
However in this export method we first call

git clone --recursive {repo url} 
and then call 
git reset --hard {tag}

def export(self):
is_commit = self.is_commit_id(self.tag)
args = ["clone", "--recursive"]
if not self.tag or not is_commit:
args += ["--depth", "1"]
if self.tag:
args += ["--branch", self.tag]
args += [self.remote_url, self.src_dir]
assert self.run_cmd(args)
if is_commit:
return self.run_cmd(["reset", "--hard", self.tag])
return True

Problem is while cloning recursively we cloned submodules and checkout specific tags of thos submodules as they were in latest https://github.com/arihantdaga/Arduino.git and then calling reset --hard will only reset the parent module, but the submodules are still at the same version (latest from git) and are not checked out to the version they are at the tag of framework.
I was thinking maybe we should add another stage and call git submodule update --init --recursive.
I am sorry if i am not thinking in right direction. I am not sure, i haven't looked the complete code of this and how different parts are working.

@arihantdaga arihantdaga changed the title Using Specific Commit/tag of arduino core may not be working as expected. Using Specific Commit/tag of arduino core may not be working as expected for submodules Sep 28, 2019
@ivankravets ivankravets added the bug label Oct 2, 2019
@ivankravets ivankravets added this to the 4.1.0 milestone Oct 2, 2019
@ivankravets

This comment has been minimized.

Copy link
Member

commented Oct 2, 2019

Thanks for the report! Please re-test with pio upgrade --dev

ivankravets added a commit that referenced this issue Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.