PlatformIO CLI 3.0: Public Alpha 1

Dear @pio3-dev,

We are glad to announce the first public development version of PlatformIO 3.0 and invite you to test it with your projects.

New features

Installation

Release Notes

  • PlatformIO Plus

  • Decentralized Development Platforms

    • Development platform manifest “platform.json” and open source development platforms
    • Semantic Versioning for platform commands, development platforms and dependent packages
    • Custom package repositories
    • External embedded board configuration files, isolated build scripts issue #479
    • Embedded Board compatibility with more than one development platform issue #456
  • Library Manager 3.0

    • Project dependencies per build environment using lib_deps option issue #413
    • Semantic Versioning for library commands and dependencies issue #410
    • Multiple library storages: Project’s Local, PlatformIO’s Global or Custom issue #475
    • Install library by name issue #414
    • Depend on a library using VCS URL (GitHub, Git, ARM mbed code registry, Hg, SVN) issue #498
    • Strict search for library dependencies issue #588
    • Allowed library.json to specify sources other than PlatformIO’s Repository issue #461
  • New Intelligent Library Build System

    • Library Dependency Finder that interprets C/C++ Preprocessor conditional macros with deep search behavior
    • Check library compatibility with project environment before building issue #415
    • Control Library Dependency Finder for compatibility using lib_compat_mode option
    • Custom library storages/directories with lib_extra_dirs option issue #537
    • Handle extra build flags, source filters and build script from library.json issue #289
    • Allowed to disable library archiving (*.ar) issue #719
    • Show detailed build information about dependent libraries issue #617
    • Support for the 3rd party manifests (Arduino IDE “library.properties”
      and ARM mbed “module.json”)
  • Print human-readable information when processing environments without -v, --verbose option
    issue #721

  • Added license field to library.json issue #522

  • Warn about unknown options in project configuration file platformio.ini issue #740

  • Stopped supporting Python 2.6

Screenshots

Project Dependencies Graph

Global libraries list

Update global libraries


Regards,
The PlatformIO Team

3 Likes

Good morning. Either I’m missing something or… the development version is still 2.11. So how to install?

How did you install development version?

As the docs day:

# uninstall existing version
pip uninstall platformio

# install the latest development version of PlatformIO
pip install -U https://github.com/platformio/platformio/archive/develop.zip

Do you use PlatformIO IDE Terminal?

Hi!

I’ve tested 3.0 on macOS with platformio-ide and command line.
The command line installation works only as root (sudo).
To switch back to the ide-version i had to uncheck the “Use Development version…” and click it again.

Tested a lot of projects (atmelavr and espressif) and all works perfect.
Switching different version of global libs works as well.

For the sake of completeness i should mention a cosmetic flaw:
The first line of compilation is always:
"Warning! Ignore unknown envs_dir option from [platformio] section"
Which isn’t true because envs_dir option is not ignored.

Robert

Thanks a lot for the report!

Thanks, I’ve just fixed it

I forgot that “pio run -t clean” also did not work in my case…

Robert

What do you mean? Try

pio run
pio run -t clean

What do you see?

eg. the blink example:

pio --version
PlatformIO, version 3.0.0a4

pio run -t clean -e uno
[Wed Aug 10 19:42:24 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)

Collected 35 compatible libraries
Looking for dependencies…
Project does not have dependencies
================== [SUCCESS] Took 0.61 seconds ==================

ls /tmp/pio/blink/uno/src/
Blink.o

ls /tmp/pio/blink/uno/
FrameworkArduino firmware.hex libFrameworkArduinoVariant.a
firmware.elf libFrameworkArduino.a src

guess these files should not be there…

Robert

Could try the same with -v option?

pio run -t clean -e uno -v

the same…

pio run -t clean -e uno -v
[Wed Aug 10 20:16:01 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)

Collected 35 compatible libraries
Looking for dependencies…
Project does not have dependencies
=================== [SUCCESS] Took 0.65 seconds ===================

I can’t reproduce this issue :frowning: Could you try to remove .pioenvs directory manually and try again?

I figured out that this only happens with envs_dir set.

e.g.:
[platformio]
envs_dir = /tmp/pio/blink

can you reproduce this?

Robert

This is a bug. Please report it here Issues · platformio/platformio-core · GitHub

No, I had actually done this through the normal terminal. Working now when run through IDE- thanks!

One thing I notice is that the builds have become slower. Previously, I was using the packaged libraries. With 3.0 I can refer to git repos instead:

; lib_install = 1,19,31,54,64,306,346
lib_deps =
  OneWire
  Adafruit-DHT
  Adafruit-Unified-Sensor
  DallasTemperature
  Json
  me-no-dev/ESPAsyncTCP
  me-no-dev/ESPAsyncWebServer
  marvinroger/async-mqtt-client

When I do this I notice that the (re)compile times almost double for my project from 2.7 to 4.7 seconds.

Maybe the builder recompiles the git libraries instead of relying on compiled objects?Other ideas for possible causes?

I can successfully install pio 3.0.0a6, but when I try to build, i get the following errors:

MacPro:flxs1 tenkai$ pio run -v
[Mon Aug 22 13:37:51 2016] Processing teensy31 (platform: teensy, board_f_cpu: 96000000, build_flags: , board: teensy31, framework: arduino)

ValueError: Expecting property name: line 11 column 1 (char 291):
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/main.py”, line 125:

env.SConscript(“$BUILD_SCRIPT”)
File “/Users/tenkai/.platformio/packages/tool-scons/script/…/engine/SCons/Script/SConscript.py”, line 551:
return _SConscript(self.fs, *files, **subst_kw)
File “/Users/tenkai/.platformio/packages/tool-scons/script/…/engine/SCons/Script/SConscript.py”, line 260:
exec file in call_stack[-1].globals
File “/Users/tenkai/.platformio/platforms/teensy/builder/main.py”, line 199:
target_elf = env.BuildProgram()
File “/Users/tenkai/.platformio/packages/tool-scons/script/…/engine/SCons/Environment.py”, line 224:
return self.method(*nargs, **kwargs)
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/platformio.py”, line 61:
deplibs = env.BuildDependentLibraries(“$PROJECTSRC_DIR”)
File “/Users/tenkai/.platformio/packages/tool-scons/script/…/engine/SCons/Environment.py”, line 224:
return self.method(*nargs, **kwargs)
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piolib.py”, line 514:
lib_builders = env.GetLibBuilders()
File “/Users/tenkai/.platformio/packages/tool-scons/script/…/engine/SCons/Environment.py”, line 224:
return self.method(*nargs, **kwargs)
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piolib.py”, line 489:
lb = LibBuilderFactory.new(env, join(libs_dir, item))
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piolib.py”, line 50:
obj = getattr(sys.modules[name], clsname)(env, path)
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piolib.py”, line 85:
self._manifest = manifest if manifest else self.load_manifest()
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piolib.py”, line 393:
manifest = util.load_json(join(self.path, “library.json”))
File “/Users/tenkai/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/util.py”, line 132:
return json.load(f)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py”, line 290:
**kw)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py”, line 338:
return _default_decoder.decode(s)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py”, line 366:
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py”, line 382:
obj, end = self.scan_once(s, idx)
============================================================================================== [ERROR] Took 0.49 seconds ==============================================================================================

I have opened a bug in github for this one.