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

Useless import and make #795

Open
thomas-lamiaux opened this issue May 12, 2022 · 2 comments
Open

Useless import and make #795

thomas-lamiaux opened this issue May 12, 2022 · 2 comments
Labels
refactor Refactorings, e.g. renaming, moving, rearranging...

Comments

@thomas-lamiaux
Copy link
Contributor

When cleaning the code, I have realized that there is actually a lot of files that import module that are not used at all.
This annoying because when renaming or moving something, this can create a lot of dependencies.

A make like during the compilation of the pull request, should check if the agda files are importing useless modules.
An automatic method would enable to clean considerably the code and ensure that people are no longer importing anything.

@thomas-lamiaux thomas-lamiaux changed the title Useless import Useless import and make May 12, 2022
@MatthiasHu
Copy link
Contributor

I tried to search for unused imports recently: #732 . I got the impression that there is currently no good automatic way of doing this.

I tried this tool, but it doesn't support all agda features, so the best I could think of was running it on individual files instead of the whole library and ignoring all the cases where it failed.

@felixwellen felixwellen added the refactor Refactorings, e.g. renaming, moving, rearranging... label May 23, 2022
@thomas-lamiaux
Copy link
Contributor Author

As it can be seen in #824 for instance https://github.com/agda/cubical/pull/824/files#diff-4a2a2c1432b474e7043879a7522d65805ad61112d16267e130091b89d4ee29b1L7, there is still a lot of useless import that can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactorings, e.g. renaming, moving, rearranging...
Projects
None yet
Development

No branches or pull requests

3 participants