NomicFoundation / hardhat-vscode

Solidity and Hardhat support for Visual Studio Code
https://hardhat.org
MIT License
174 stars 44 forks source link

GitPod compatibility #208

Closed storm1er closed 2 years ago

storm1er commented 2 years ago

Hi everyone,

Explicit title: is there any plan to make this extension compatible with gitpod? (vscode online, linked to repo, very useful for contributors)

Thanks =)

alcuadrado commented 2 years ago

Yes, we have plans to make both the extension and the language server work in other environments.

These are mid-term plans, so I don't think we'll work on them in the next 2-3 months, unfortunately. If this changes (e.g. because we hire more people or priorities change), I'll update this issue.

kanej commented 2 years ago

One option to speed up support for vscode for web (and gitpod with it), would be to split syntax highlighting and maybe navigation from the compiler validation and warnings.

The barrier to running as a web extension is our access of the file system and those are mainly to support validation via solc (and hardhat dependency resolution). Navigation is based off of a solidity-parser parse, so we may be able to provide this in a pure browser setting.

Janther commented 2 years ago

Could be worth to evaluate having extension packs one with all the web-only functionalities and another with everything.

Janther commented 2 years ago

By the way I installed the vsix file in Gitpod and everything runs beautifully, even navigation. I believe the file system bits are seamlessly run on the Gitpod ephemeral server via SSH. I did not test much though.

EDIT

Sorry about that, clicking on open hardhat configuration fails

Screen Shot 2022-08-09 at 9 57 22 PM

also the validation is blocked.

Screen Shot 2022-08-09 at 9 59 38 PM

other features just work which is very very nice

kanej commented 2 years ago

Oh that is interesting. I suspect the nav to hardhat.config.ts file is a separate bug, maybe some assumptions about file paths that don't hold on the web host.

I have opened an issue for that (as separate from gitpod support): https://github.com/NomicFoundation/hardhat-vscode/issues/227

kanej commented 2 years ago

@Janther I had assumed that gitpod wasn't showing our extension because we are not a webextension, but if your able to install via vsix, it means they are running vscode extensions partially on the backend (which is all hardhat-vscode needs to run).

Let me dig a bit further and see why we are not appearing in the extensions tab when clearly the plugin can run.

Janther commented 2 years ago

Gitpod has its own registry for extensions because vscode is Microsoft and doesn't want to share extensions with 3rd party implementations of the editor.

Here is more info https://www.gitpod.io/docs/ides-and-editors/vscode-extensions#where-do-i-find-extensions

kanej commented 2 years ago

@Janther we have added hardhat-vscode to openvsx (v0.4.6), I have been able to install the extension (and use it) via gitpod's web-based vscode:

image

kanej commented 2 years ago

Reviews on openvsx welcome!

Janther commented 2 years ago

Don't forget to add to your workflow the publishing of new versions to both registries now so there will be consistency in the environments ;)

kanej commented 2 years ago

Don't forget to add to your workflow the publishing of new versions to both registries now so there will be consistency in the environments ;)

Ha, I am updating our release docs as we speak!

kanej commented 2 years ago

The extension is available in gitpod via the openvsx registry: https://open-vsx.org/extension/NomicFoundation/hardhat-solidity