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

ix: remove force #5

Closed
wants to merge 4 commits into from
Closed

Conversation

sakulstra
Copy link
Collaborator

I don't see a good reason on why one would want to rebuld via --force ignoring all caches.
In bigger foundry projects this can take a decent amount of time.
Therefore I'm removing the "force" - if you have strong feelings about keeping it i guess it could be an option to enable/disable via cli flag.

@kartojal
Copy link
Contributor

Unfornately if you don't use --force and there is no changes, forge will not generate the build-info artifacts.

$ forge build --build-info
[⠔] Compiling...
No files changed, compilation skipped
Compilation successful

[catapulta-verify] Exiting main handler, error:
ENOENT: No such file or directory
   path: "out/build-info"
 syscall: "open"
   errno: -2

@kartojal
Copy link
Contributor

i could add an "skip --force" param, but must only be used if you already did --build-info --force before, to prevent multiple forced builds

@sakulstra
Copy link
Collaborator Author

sakulstra commented Dec 12, 2023

I think it would be better to do it conditionally if the required files don't yet exist (providing a flag seems like an unnecessary error surface).

If sth like foundry-rs/foundry#6278 would exist, potentially rebuilding via --force could be less painful.

@kartojal
Copy link
Contributor

i will implement your idea to detect if build-info exists to skip the --force build in consequent verifications

@sakulstra
Copy link
Collaborator Author

Seems like the original issue holding this back was resolved in foundry-rs/foundry#7347

@sakulstra sakulstra closed this Mar 14, 2024
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