forked from platformio/platformio-core
Merge tag 'v6.1.0' into develop
Bump version to 6.1.0
This commit is contained in:
10
.github/workflows/projects.yml
vendored
10
.github/workflows/projects.yml
vendored
@@ -13,11 +13,11 @@ jobs:
|
|||||||
folder: "Marlin"
|
folder: "Marlin"
|
||||||
config_dir: "Marlin"
|
config_dir: "Marlin"
|
||||||
env_name: "mega2560"
|
env_name: "mega2560"
|
||||||
- esphome:
|
# - esphome:
|
||||||
repository: "esphome/esphome"
|
# repository: "esphome/esphome"
|
||||||
folder: "esphome"
|
# folder: "esphome"
|
||||||
config_dir: "esphome"
|
# config_dir: "esphome"
|
||||||
env_name: "esp32-arduino"
|
# env_name: "esp32-arduino"
|
||||||
- smartknob:
|
- smartknob:
|
||||||
repository: "scottbez1/smartknob"
|
repository: "scottbez1/smartknob"
|
||||||
folder: "smartknob"
|
folder: "smartknob"
|
||||||
|
@@ -13,7 +13,7 @@ PlatformIO Core 6
|
|||||||
|
|
||||||
**A professional collaborative platform for declarative, safety-critical, and test-driven embedded development.**
|
**A professional collaborative platform for declarative, safety-critical, and test-driven embedded development.**
|
||||||
|
|
||||||
6.1.0 (2022-??-??)
|
6.1.0 (2022-07-06)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* **Device Manager**
|
* **Device Manager**
|
||||||
|
2
docs
2
docs
Submodule docs updated: be6e3e87ec...f5958b8756
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (6, 1, "0rc1")
|
VERSION = (6, 1, 0)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@@ -50,7 +50,11 @@ def pkgs_to_specs(pkgs):
|
|||||||
|
|
||||||
|
|
||||||
def test_global_packages(
|
def test_global_packages(
|
||||||
clirunner, validate_cliresult, func_isolated_pio_core, tmp_path
|
clirunner,
|
||||||
|
validate_cliresult,
|
||||||
|
func_isolated_pio_core,
|
||||||
|
get_pkg_latest_version,
|
||||||
|
tmp_path,
|
||||||
):
|
):
|
||||||
# libraries
|
# libraries
|
||||||
result = clirunner.invoke(
|
result = clirunner.invoke(
|
||||||
@@ -81,7 +85,7 @@ def test_global_packages(
|
|||||||
assert pkgs_to_specs(LibraryPackageManager().get_installed()) == [
|
assert pkgs_to_specs(LibraryPackageManager().get_installed()) == [
|
||||||
PackageSpec("ArduinoJson@5.13.4"),
|
PackageSpec("ArduinoJson@5.13.4"),
|
||||||
PackageSpec("DallasTemperature@3.9.0+sha.964939d"),
|
PackageSpec("DallasTemperature@3.9.0+sha.964939d"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec("OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")),
|
||||||
]
|
]
|
||||||
# custom storage
|
# custom storage
|
||||||
storage_dir = tmp_path / "custom_lib_storage"
|
storage_dir = tmp_path / "custom_lib_storage"
|
||||||
@@ -122,7 +126,9 @@ def test_global_packages(
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_skip_dependencies(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
def test_skip_dependencies(
|
||||||
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
||||||
@@ -136,13 +142,18 @@ def test_skip_dependencies(clirunner, validate_cliresult, isolated_pio_core, tmp
|
|||||||
os.path.join(ProjectConfig().get("platformio", "libdeps_dir"), "devkit")
|
os.path.join(ProjectConfig().get("platformio", "libdeps_dir"), "devkit")
|
||||||
).get_installed()
|
).get_installed()
|
||||||
assert pkgs_to_specs(installed_lib_pkgs) == [
|
assert pkgs_to_specs(installed_lib_pkgs) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
||||||
]
|
]
|
||||||
assert len(ToolPackageManager().get_installed()) == 0
|
assert len(ToolPackageManager().get_installed()) == 0
|
||||||
|
|
||||||
|
|
||||||
def test_baremetal_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
def test_baremetal_project(
|
||||||
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
||||||
@@ -156,16 +167,23 @@ def test_baremetal_project(clirunner, validate_cliresult, isolated_pio_core, tmp
|
|||||||
os.path.join(ProjectConfig().get("platformio", "libdeps_dir"), "baremetal")
|
os.path.join(ProjectConfig().get("platformio", "libdeps_dir"), "baremetal")
|
||||||
).get_installed()
|
).get_installed()
|
||||||
assert pkgs_to_specs(installed_lib_pkgs) == [
|
assert pkgs_to_specs(installed_lib_pkgs) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
||||||
PackageSpec("toolchain-atmelavr@1.70300.191015"),
|
PackageSpec("toolchain-atmelavr@1.70300.191015"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
def test_project(
|
||||||
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
(project_dir / "platformio.ini").write_text(PROJECT_CONFIG_TPL)
|
||||||
@@ -180,9 +198,14 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
|||||||
os.path.join(config.get("platformio", "libdeps_dir"), "devkit")
|
os.path.join(config.get("platformio", "libdeps_dir"), "devkit")
|
||||||
)
|
)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
||||||
PackageSpec("framework-arduino-avr-attiny@1.5.2"),
|
PackageSpec("framework-arduino-avr-attiny@1.5.2"),
|
||||||
@@ -202,7 +225,9 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
|||||||
assert "Already up-to-date" in result.output
|
assert "Already up-to-date" in result.output
|
||||||
|
|
||||||
|
|
||||||
def test_private_lib_deps(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
def test_private_lib_deps(
|
||||||
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
private_lib_dir = project_dir / "lib" / "private"
|
private_lib_dir = project_dir / "lib" / "private"
|
||||||
private_lib_dir.mkdir(parents=True)
|
private_lib_dir.mkdir(parents=True)
|
||||||
@@ -247,7 +272,9 @@ platform = native
|
|||||||
config.get("platformio", "lib_dir")
|
config.get("platformio", "lib_dir")
|
||||||
).get_installed()
|
).get_installed()
|
||||||
assert pkgs_to_specs(installed_private_pkgs) == [
|
assert pkgs_to_specs(installed_private_pkgs) == [
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
PackageSpec("My Private Lib@1.0.0"),
|
PackageSpec("My Private Lib@1.0.0"),
|
||||||
]
|
]
|
||||||
installed_env_pkgs = LibraryPackageManager(
|
installed_env_pkgs = LibraryPackageManager(
|
||||||
@@ -255,12 +282,15 @@ platform = native
|
|||||||
).get_installed()
|
).get_installed()
|
||||||
assert pkgs_to_specs(installed_env_pkgs) == [
|
assert pkgs_to_specs(installed_env_pkgs) == [
|
||||||
PackageSpec("ArduinoJson@5.13.4"),
|
PackageSpec("ArduinoJson@5.13.4"),
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_remove_project_unused_libdeps(
|
def test_remove_project_unused_libdeps(
|
||||||
clirunner, validate_cliresult, isolated_pio_core, tmp_path
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
):
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
@@ -275,9 +305,14 @@ def test_remove_project_unused_libdeps(
|
|||||||
storage_dir = os.path.join(config.get("platformio", "libdeps_dir"), "baremetal")
|
storage_dir = os.path.join(config.get("platformio", "libdeps_dir"), "baremetal")
|
||||||
lm = LibraryPackageManager(storage_dir)
|
lm = LibraryPackageManager(storage_dir)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# add new deps
|
# add new deps
|
||||||
@@ -292,9 +327,14 @@ def test_remove_project_unused_libdeps(
|
|||||||
lm = LibraryPackageManager(storage_dir)
|
lm = LibraryPackageManager(storage_dir)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("ArduinoJson@5.13.4"),
|
PackageSpec("ArduinoJson@5.13.4"),
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
PackageSpec("ESPAsyncWebServer-esphome@2.1.0"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# manually remove from cofiguration file
|
# manually remove from cofiguration file
|
||||||
|
@@ -145,7 +145,9 @@ def test_global_packages(
|
|||||||
assert isinstance(result.exception, UnknownPackageError)
|
assert isinstance(result.exception, UnknownPackageError)
|
||||||
|
|
||||||
|
|
||||||
def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
def test_project(
|
||||||
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
(project_dir / "platformio.ini").write_text(PROJECT_OUTDATED_CONFIG_TPL)
|
(project_dir / "platformio.ini").write_text(PROJECT_OUTDATED_CONFIG_TPL)
|
||||||
@@ -161,7 +163,9 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
|||||||
)
|
)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.8.1"),
|
PackageSpec("DallasTemperature@3.8.1"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
assert pkgs_to_specs(PlatformPackageManager().get_installed()) == [
|
assert pkgs_to_specs(PlatformPackageManager().get_installed()) == [
|
||||||
PackageSpec("atmelavr@2.2.0")
|
PackageSpec("atmelavr@2.2.0")
|
||||||
@@ -187,8 +191,13 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
|||||||
assert pkgs[0].metadata.name == "atmelavr"
|
assert pkgs[0].metadata.name == "atmelavr"
|
||||||
assert pkgs[0].metadata.version.major == 3
|
assert pkgs[0].metadata.version.major == 3
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
PackageSpec("OneWire@2.3.7"),
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
assert pkgs_to_specs(ToolPackageManager().get_installed()) == [
|
||||||
PackageSpec("framework-arduino-avr-attiny@1.3.2"),
|
PackageSpec("framework-arduino-avr-attiny@1.3.2"),
|
||||||
@@ -211,7 +220,7 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path):
|
|||||||
|
|
||||||
|
|
||||||
def test_custom_project_libraries(
|
def test_custom_project_libraries(
|
||||||
clirunner, validate_cliresult, isolated_pio_core, tmp_path
|
clirunner, validate_cliresult, isolated_pio_core, get_pkg_latest_version, tmp_path
|
||||||
):
|
):
|
||||||
project_dir = tmp_path / "project"
|
project_dir = tmp_path / "project"
|
||||||
project_dir.mkdir()
|
project_dir.mkdir()
|
||||||
@@ -230,7 +239,9 @@ def test_custom_project_libraries(
|
|||||||
)
|
)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.8.1"),
|
PackageSpec("DallasTemperature@3.8.1"),
|
||||||
PackageSpec("OneWire@2.3.7"),
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
# update package
|
# update package
|
||||||
result = clirunner.invoke(
|
result = clirunner.invoke(
|
||||||
@@ -260,8 +271,13 @@ def test_custom_project_libraries(
|
|||||||
os.path.join(config.get("platformio", "libdeps_dir"), "devkit")
|
os.path.join(config.get("platformio", "libdeps_dir"), "devkit")
|
||||||
)
|
)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("DallasTemperature@3.10.0"),
|
PackageSpec(
|
||||||
PackageSpec("OneWire@2.3.7"),
|
"DallasTemperature@%s"
|
||||||
|
% get_pkg_latest_version("milesburton/DallasTemperature")
|
||||||
|
),
|
||||||
|
PackageSpec(
|
||||||
|
"OneWire@%s" % get_pkg_latest_version("paulstoffregen/OneWire")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
assert config.get("env:devkit", "lib_deps") == [
|
assert config.get("env:devkit", "lib_deps") == [
|
||||||
"milesburton/DallasTemperature@^3.8.0"
|
"milesburton/DallasTemperature@^3.8.0"
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import email
|
import email
|
||||||
|
import functools
|
||||||
import imaplib
|
import imaplib
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
@@ -21,6 +22,8 @@ import pytest
|
|||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
|
||||||
from platformio import http
|
from platformio import http
|
||||||
|
from platformio.package.meta import PackageSpec, PackageType
|
||||||
|
from platformio.registry.client import RegistryClient
|
||||||
|
|
||||||
|
|
||||||
def pytest_configure(config):
|
def pytest_configure(config):
|
||||||
@@ -131,3 +134,17 @@ def receive_email(): # pylint:disable=redefined-outer-name, too-many-locals
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
return _receive_email
|
return _receive_email
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def get_pkg_latest_version():
|
||||||
|
@functools.lru_cache()
|
||||||
|
def wrap(spec, pkg_type=None):
|
||||||
|
if not isinstance(spec, PackageSpec):
|
||||||
|
spec = PackageSpec(spec)
|
||||||
|
pkg_type = pkg_type or PackageType.LIBRARY
|
||||||
|
client = RegistryClient()
|
||||||
|
pkg = client.get_package(pkg_type, spec.owner, spec.name)
|
||||||
|
return pkg["version"]["name"]
|
||||||
|
|
||||||
|
return wrap
|
||||||
|
Reference in New Issue
Block a user