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

Invalid simple block (semantic_version), from dependency that refs to git repo #3658

Closed
1 task done
Bmooij opened this issue Sep 7, 2020 · 1 comment
Closed
1 task done

Comments

@Bmooij
Copy link

Bmooij commented Sep 7, 2020

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system: Windows 10

PlatformIO Version (platformio --version): version 5.0.1a1

Description of problem

Trying to install library dependency that requires an other dependency from git.
When installing the dependency from library.json (that references to a git repo), the semantic_version tries to parse the git url as a semantic version, but off course fails.

Steps to Reproduce

  1. a dependency with a library.json that refers to a git repo: (used ref: https://docs.platformio.org/en/latest/librarymanager/config.html#dependencies)
"dependencies": [
    {
      "name": "AsyncTCP",
      "version": "https://github.com/Bmooij/AsyncTCP.git",
      "platforms": "espressif32"
    }
  ]
  1. Add the library with the library.json to your platformio.ini file
[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#v1.12.4
board = esp32dev
framework = arduino
lib_deps =
    ESP Async WebServer = https://github.com/Bmooij/ESPAsyncWebServer.git#1.2.3.3
  1. Build project

Actual Results

ValueError: Invalid simple block 'https://github.com/Bmooij/AsyncTCP.git':
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 169:
    env.SConscript("$BUILD_SCRIPT")
  File "[HIDDEN]\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "[HIDDEN]\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 287:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "[HIDDEN]\.platformio\platforms\espressif32\builder\main.py", line 223:
    target_elf = env.BuildProgram()
  File "[HIDDEN]\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 62:
    env.ProcessProjectDeps()
  File "[HIDDEN]\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 140:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "[HIDDEN]\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 1062:
    project.install_dependencies()
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 898:
    lm.install(spec)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 49:
    spec, silent=silent, skip_dependencies=skip_dependencies, force=force
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 117:
    self.install_dependencies(pkg, silent)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\manager\library.py", line 74:
    if not self._install_dependency(dependency, silent) and not silent:
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\manager\library.py", line 83:
    name=dependency.get("name"), requirements=dependency.get("version")
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\meta.py", line 117:
    self.requirements = requirements
  File "[HIDDEN]\.platformio\penv\lib\site-packages\platformio\package\meta.py", line 162:
    else semantic_version.SimpleSpec(str(value))
  File "[HIDDEN]\.platformio\penv\lib\site-packages\semantic_version\base.py", line 618:
    self.clause = self._parse_to_clause(expression)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\semantic_version\base.py", line 1014:
    return cls.Parser.parse(expression)
  File "[HIDDEN]\.platformio\penv\lib\site-packages\semantic_version\base.py", line 1034:
    raise ValueError("Invalid simple block %r" % block)

Expected Results

Download and install dependency

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#v1.12.4
board = esp32dev
framework = arduino
lib_deps =
    ESP Async WebServer = https://github.com/Bmooij/ESPAsyncWebServer.git#1.2.3.3

Source file to reproduce issue:

#include <Arduino.h>
#include <FS.h>
#include <WiFi.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

Additional info

@ivankravets
Copy link
Member

Please re-test with pio upgrade --dev.

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

No branches or pull requests

2 participants