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

Precompiled libraries: only select a folder if it contains files #1134

Merged

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Jan 13, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

If a folder meant to contain precompiled libraries is empty (or only contains other folders) it can be safely skipped

  • What is the current behavior?

The folder is not skipped, so libraries with src/$architecture/$fp_specs will try to use src/$architecture/ as precompiled base folder, even if it doesn't contain any library

  • What is the new behavior?

The folder is skipped and the library can be compiled from sources

  • Other information:

See how to contribute

@facchinm facchinm changed the title Recompiled libraries: only select a folder if it contains files Precompiled libraries: only select a folder if it contains files Jan 13, 2021
@facchinm facchinm force-pushed the precompiled_only_choose_nonempty_dirs branch from 4a23f6b to 2cbd753 Compare January 13, 2021 14:29
@facchinm facchinm force-pushed the precompiled_only_choose_nonempty_dirs branch from 195c913 to 39a1b2b Compare January 15, 2021 09:06
test/test_compile.py Outdated Show resolved Hide resolved
@silvanocerza
Copy link
Contributor

Python tests are failing:

 poetry run flake8
./test/test_compile.py:244:1: E302 expected 2 blank lines, found 1
task: Failed to run task "python:check": exit status 1

You should run task python:format locally to fix the issue, to be sure it's fixed then run task python:check.

@silvanocerza
Copy link
Contributor

@facchinm nevermind, I and @cmaglie pushed the fixes. :)

@silvanocerza
Copy link
Contributor

We pushed some fixes to the failing steps of test_compile.py::test_compile_without_precompiled_libraries, now there are other steps that are failing that we are investigating.

@silvanocerza silvanocerza force-pushed the precompiled_only_choose_nonempty_dirs branch from 31a0713 to e19b9ec Compare January 15, 2021 16:06
@silvanocerza silvanocerza merged commit c6be6fa into arduino:master Jan 18, 2021
silvanocerza added a commit that referenced this pull request Jan 27, 2021
* Precompiled libraries: only select a folder if it contains files

* Restore precompiled tests

* slightly refactored directoryContainsFile function

* [skip changelog] Fix compile tests

* [skip changelog] Fix compile test

Co-authored-by: Cristian Maglie <c.maglie@arduino.cc>
Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants