Skip to content

Conversation

@amgross
Copy link
Contributor

@amgross amgross commented Feb 8, 2026

I found out that in some cases --compact fails with no-space error.
Seems like the issue is because the order of creating the no-compact filesystem is based on the on-disk filesystem while the order of creating the compact filesystem is based on the non-compact filesystem.
I added test that reproduces the error, and fix that making also the compact filesystem be based on the on-disk filesystem.
To reproduce the error just run the test I added without the fix I added.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a littlefs create --compact failure (“no-space” error) by making the compaction build step use the same source ordering as the initial filesystem creation (based on the host on-disk directory walk), and adds a regression test intended to reproduce the issue.

Changes:

  • Update create --compact to populate the compact filesystem directly from the original source paths rather than walking the initially-created filesystem.
  • Add a CLI test that runs create --compact --no-pad across multiple file-count/size configurations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/littlefs/__main__.py Changes compaction population logic to iterate sources instead of fs.walk("/").
test/cli/test_create_and_extract.py Adds a new test for create --compact across multiple configurations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BrianPugh
Copy link
Collaborator

Thanks! also let me know when you want me to tag a release, i know the changes are stacking up.

@BrianPugh BrianPugh merged commit cb85400 into jrast:master Feb 8, 2026
21 checks passed
@amgross
Copy link
Contributor Author

amgross commented Feb 8, 2026

You can release whenever you want, I am using this REPO from source code. (#150 is still planned, probably will happen in the next 3 weeks)

@BrianPugh
Copy link
Collaborator

just released v0.17.1

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