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

optimize and make sure unused-imports is accurate #2477

Open
0xalpharush opened this issue Jun 5, 2024 · 3 comments
Open

optimize and make sure unused-imports is accurate #2477

0xalpharush opened this issue Jun 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@0xalpharush
Copy link
Contributor

It was added in #2392 but it is really slow and has some edge cases e.g.
this is wrong

The following unused import(s) in src/universal/CrossDomainMessenger.sol should be removed:
        -import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; (src/universal/CrossDomainMessenger.sol#4)

slither contracts.zip --detect unused-import
contracts.zip

@0xalpharush 0xalpharush added the bug Something isn't working label Jun 5, 2024
@0xalpharush
Copy link
Contributor Author

@DarkaMaul Maybe you will have a chance to give this a go

DarkaMaul added a commit that referenced this issue Jun 10, 2024
@0xalpharush
Copy link
Contributor Author

We may be able to use something like this to speed up the lookups
https://pypi.org/project/intervaltree/

Also, we could look into something like Rowan's red-green trees

@smartcontracts
Copy link

Yeah this would be great, we're looking to check for unused imports to keep things clean ethereum-optimism/optimism#11806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants