neo-project / neo-devpack-dotnet

NEO Development Pack
MIT License
79 stars 100 forks source link

Set optimization level from command line #1071

Closed Hecate2 closed 1 month ago

Hecate2 commented 1 month ago

It seems command line users cannot trigger --no-optimize or the experimental optimizers🤣, although they can be set in tests. To test this PR, use the following flags: --debug --ex-optimize --assembly --debug --no-optimize --assembly --debug --no-optimize --ex-optimize --assembly (should fail) --debug --ex-optimize --no-optimize --assembly (should fail) and read bin/sc/{contract}.nef.txt to see whether the contract has been correctly optimized.

shargon commented 1 month ago

It seems command line users cannot trigger --no-optimize

What about use --optimize=none ?

Hecate2 commented 1 month ago

It seems command line users cannot trigger --no-optimize

What about use --optimize=none ?

That's great for me

shargon commented 1 month ago

I think that we should instruct the user to use --optimize=Level

Hecate2 commented 1 month ago

--debug --optimize=All --assembly --debug --optimize=Basic --assembly --debug --optimize=None --assembly