Skip to content

pio ci always recompiling everything #2109

Closed

Description

@mtfurlan

Configuration

Operating system: Debian testing, Linux moranix 4.19.0-1-amd64 # 1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux

PlatformIO Version: PlatformIO, version 3.6.2

Description of problem

If I run

pio ci examples/mqtt_pub/ -l . -C platformio.ini --build-dir /tmp/piobuild --keep-build-dir

/tmp/piobuild/platformio.ini is updated every time that is run, and everything is rebuilt every time.

Steps to Reproduce

  1. platfomrio.ini:
[env:d1_mini]
platform = espressif8266
framework = arduino
board = d1_mini
pio ci examples/mqtt_pub/ -l . -C platformio.ini --build-dir /tmp/piobuild --keep-build-dir

Actual Results

Rebuilds everything

Expected Results

Cache anything from the last bui.d

Additional info

Previous discussion:
https://community.platformio.org/t/compiling-library-examples-without-recompiling-unchanged-files/5685

Activity

  1. added this to the 4.0 milestone on Feb 23, 2019
  2. ivankravets commented on Feb 23, 2019

    @ivankravets
    Member

    Thanks! Please re-test with $ pio upgrade --dev.

  3. added a commit that references this issue on Feb 23, 2019
    8567984
  4. modified the milestones: 4.0, 3.6.5 on Mar 7, 2019
  5. mtfurlan commented on Mar 31, 2019

    @mtfurlan
    Author

    So that did fix the initial issue, it's not rebuilding everything every time now.
    Now I'm noticing that if I change options in the pio ci command, platformio.ini is not updated to reflect those.
    So for example, if I pass --project-option="build_flags = -Dsomething=42" and then pass --project-option="build_flags = -Dsomething=43", platformio.ini is not updated.

  6. ivankravets commented on Apr 1, 2019

    @ivankravets
    Member

    If you update platformio.ini, we will recompile the whole project. So, there is no sense in--keep-build-dir.

    There are a few workarounds:

    1. pio ci --exclude=platformio.ini - means, we will remove previous
    2. pio ci --project-conf /path/to/custom/platformio.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions