Closed lispking closed 2 months ago
Hi @lispking, This is done to make sure that what's being deployed is compiled from the latest source code. If we didn't do this, it would be easy for a user to accidentally deploy the wrong (stale) bytecode.
Hi @lispking, This is done to make sure that what's being deployed is compiled from the latest source code. If we didn't do this, it would be easy for a user to accidentally deploy the wrong (stale) bytecode.
Understood, but we could consider it as an optional feature, allowing users to avoid recompiling, for instance by adding a 'non-compile' flag. When users add this option, they can reuse the output/release artifacts. @sdankel
Could you explain more about your use case? You said "This design doesn't seem user-friendly", is that just because it takes longer to recompile, or is it something else?
This is related to the issue here. The amp tool will separate these steps and build these capabilities in. You can see the specific implementation code here.
If you look closely, you'll notice that the code here hardcodes a wallet. In fact, I also want to change this to the 'wallet import' command, which would allow users to input their own private_key and password. This way, users can deploy using their own wallets.
If feasible, I can help implement these patches. @sdankel
I'm still not sure I understand why you need the compile step to be separated from the deploy step, but I'm okay with having a --skip-compile
option.
It might require significant refactoring. The current implementation uses the compiler output structures directly rather than reading from the compiled artifact files. I'll reopen this if you want to take it on.
Yeah. I understand that we should add the --skip-compile
option.
Why does the
forc build --release
command require the code to be rebuilt when executingforc deploy
afterwards? This design doesn't seem user-friendly;deploy
doesn't need to rebuild the code again, it should simply check if there are artifacts in the release directory.