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

build directory is not deleted using east clean when it is not named build #46

Open
TjazVracko opened this issue Feb 7, 2023 · 3 comments
Assignees
Labels
type: bug Something is not working and must be fixed.

Comments

@TjazVracko
Copy link
Contributor

TjazVracko commented Feb 7, 2023

Describe the bug
When using the --build-dir flag, the build directory will not be deleted on a subsequent call to east clean unless it is called exactly build which defeats the purpose of the --build-dir flag.

Firmware/Software Version
0.6.2

To Reproduce
Steps to reproduce the behavior. Example using hello world sample:

cd zephyr/samples/hello_world
# board does not matterr
east build -b nrf52840dk_nrf52840 --build-dir build_52dk
# observe a folder named build_52dk was created
ls

east clean
# observe the folder named build_52dk is still there
ls
@TjazVracko TjazVracko added the type: bug Something is not working and must be fixed. label Feb 7, 2023
@MarkoSagadin
Copy link
Collaborator

To implement this I would have to save some kind of data in the ~/.local/share/east folder to keep track of where build folders of previous builds are stored.

So I would need a mapping between:

  • folder path where build command was called and
  • path to the build folder that was created at build call.

This is a one to many relationship, as it is valid to do:

east build
east build --build-dir my_build_dir

(Should calling east clean on this same path clear both (all) build folders or just the last one?)

@MarkoSagadin
Copy link
Collaborator

Also, if we were thinking that having a east clean --all (clear all build folders in the project repository) would be useful.

In that case there should be some relationship between project and above mentioned mappings.
Otherwise you would write east clean --all and it would wipe all build folders that you ever created with east.

@TjazVracko what do you think about above, there are probably some mistakes in the logic.

@TjazVracko
Copy link
Contributor Author

I think you should add the metadata to each project (like west does in .west).

east clean should remove all build folders in the current directory.
east clean --all should clean all build folders in this project - I think you can limit yourself to only the project folder. Keeping track of all samples in nrf/zephyr/... is overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working and must be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants