-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add environment setting and detection. Add 'run tests' command #372
base: master
Are you sure you want to change the base?
Conversation
Hi @Willyham this needs refactoring a bit, as the testing is getting mixed with environment, and the command executed directly on the extension. I can do that, but that may break your other changes. |
Hey, I'm happy to fix things up if needed. Not quite sure what you mean about getting mixed with the environment? In terms of the command execution, I wasn't really sure about the extension architecture and the separation of the extension and the server. Does that need to be executed on the server and the data passed back to the extension? Is there any docs you can point me towards which explains the 'why' for that? Thanks! |
No. this does not need to be in the server side, just the client. Although it could be but it will complicate things for the time being. Environment vscode-solidity/src/extension.ts Lines 58 to 71 in 2e90df5
vscode-solidity/src/extension.ts Line 74 in 2e90df5
vscode-solidity/src/extension.ts Lines 310 to 328 in 2e90df5
This could also have "truffle" whilst at it and dapptools Task execution vscode-solidity/src/extension.ts Lines 339 to 351 in 2e90df5
to here.. https://github.com/juanfranblanco/vscode-solidity/blob/master/src/common/util.ts Rootfolder |
Tests
|
This adds a
developmentEnvironment
configuration setting, with options (none, forge, hardhat). When the extension activates it attempts to automatically set this environment if it's not set.When the environment config value changes, we attempt to set specific environment based configuration, if those are not already set. The only environment currently configured with any defaults or behaviour is
forge
.It also adds a
runTests
command. When invoked, this runs the value in thesolidity.test.command
configuration setting, and attempts to interpret the output of the command based on the configured environment.Screen.Recording.2022-11-02.at.12.43.57.mov
I'll follow this PR up with more features: