Skip to content

Add a subdirectory for CPX frozen modules #117

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

Merged
merged 1 commit into from
May 23, 2022

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented May 4, 2022

Add a subdirectory in the repository with a copy of the library made using symbolic links excluding the CPB specific file.

This PR is required for the Circuitpython core PR that changes the frozen directory to the frozen_cpx subdirectory, allowing to only freeze in the CPX version of the library, for a 1 kB gain in space.

I have tested it locally with the bundle release script and the library release script, and have seen no issue so far.

A possible issue would be the script finding the symbolic links and either spitting out an error (it expects only one main module per repository), or include them in the bundle, but it filters packages by prefix, and it expects the adafruit_ prefix. As long as that doesn't change, we're fine. I think.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this successfully on both CPX (with custom build using this branch frozen in) and CPB with many of the examples from this guide: https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/circuit-playground-express-library

All examples appear to be working successfully on both devices.

On the CPX builds using current repo the remaining free space for an english language build was:

251864 bytes used, 1576 bytes free in flash firmware space out of 253440 bytes (247.5kB).
11856 bytes used, 20912 bytes free in ram for stack and heap out of 32768 bytes (32.0kB).

With the modification to use the branch from this PR the space is:

247448 bytes used, 5992 bytes free in flash firmware space out of 253440 bytes (247.5kB).
11856 bytes used, 20912 bytes free in ram for stack and heap out of 32768 bytes (32.0kB).

@FoamyGuy FoamyGuy merged commit 54b2fa0 into adafruit:main May 23, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 24, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_BH1750 to 1.1.0 from 1.0.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_BH1750#6 from DeadSix27/main
  > Patch .pre-commit-config.yaml
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
  > Update Black to latest.
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 5.2.1 from 5.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#117 from Neradoc/frozen-module-subdirectory

Updating https://github.com/adafruit/Adafruit_CircuitPython_DS1307 to 2.1.10 from 2.1.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_DS1307#24 from coplate/main
  > Patch .pre-commit-config.yaml
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
  > Update Black to latest.
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_UC8151D to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_UC8151D#4 from HDR/main
  > Patch .pre-commit-config.yaml
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
  > Update Black to latest.
  > Fixed readthedocs build
  > Post-patch cleanup
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_BitmapSaver to 1.2.1 from 1.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BitmapSaver#23 from matt-land/add-typing
  > Patch .pre-commit-config.yaml
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.

2 participants