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

Use docgen in the browser #437

Open
yann300 opened this issue Mar 2, 2023 · 4 comments
Open

Use docgen in the browser #437

yann300 opened this issue Mar 2, 2023 · 4 comments

Comments

@yann300
Copy link

yann300 commented Mar 2, 2023

we, at Remix, wanted to use solidity-docgen, but it isn't working in the browser. Do you have any plan to be compatible with a non-node context?

We tweaked some part of the library to make it compatible with the browser and will pushed it to our code base (here's the PR: ethereum/remix-project#3267). We can anytime ofc make use of the official lib as soon as it works in the browser.

Also if updating solidity-docgen is too complex, perhaps you would be interested having another repo like solidity-docgen-light that would work in the browser and maybe our PR could help to set the ground for this repo.

Thanks, let us know what you think.

cc @bunsenstraat @joeizang

@frangio
Copy link
Contributor

frangio commented Mar 6, 2023

Can you list what is currently incompatible with the browser context?

@yann300
Copy link
Author

yann300 commented Mar 6, 2023

fs is one of them.
@bunsenstraat @joeizang could you provide a list of deps that aren't working in the browser?

@joeizang
Copy link

joeizang commented Mar 7, 2023

Hi @frangio,
like @yann300 mentioned, fs is a pain point. Another is the requirement of Hardhat, that also makes it tough for the browser.
Basically, when we see __dirname(), it just spells pain. Also we noticed your templates use path resolve and readdir. More pain.
Not sure if you guys could create a maybe lighter version of the library that targets the browser and eschews fs or anything that isn't possible for the browser. We know that this is a big ask but would be really appreciative of any kind of effort towards making the library more browser friendly.

I hope to hear from you so we can further this discussion.
God bless

@frangio
Copy link
Contributor

frangio commented Mar 7, 2023

Hardhat is not required, see readme. It will still try to use the file system though. I'm interested in fixing this but can't promise any timelines.

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

No branches or pull requests

3 participants