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

Flycheck Gets Stuck at Import #61

Open
creese opened this issue Sep 26, 2020 · 7 comments
Open

Flycheck Gets Stuck at Import #61

creese opened this issue Sep 26, 2020 · 7 comments

Comments

@creese
Copy link

creese commented Sep 26, 2020

I'm running into the same issue described here. Flycheck never gets past the import. The solution is to call solc with a remapping like:

@openzeppelin/=$(pwd)/node_modules/@openzeppelin/

How can this be achieved?

@LefterisJP
Copy link
Collaborator

Hey @creese. Would the workd done by @landakram in #64 solve your problem?

@wminshew
Copy link

@LefterisJP @landakram has anyone been able to figure this out? haven't been able to get import statements to simultaneously work for flycheck & my compiler (hardhat) having tried on several different occasions over the last few months

greatly appreciate any advice from people who've figured it out

@wminshew
Copy link

@hrkrshnn I've noticed you're still actively using this package -- would you mind sharing how you've overcome the remapping/flycheck issue?

I did some digging in the issue linked by @LefterisJP (#64 (comment)) but not confident enough in my emacs-lisp/spacemacs to fix it myself (.. maybe this is my opportunity to learn :) ). Also hoping maybe it goes away when I switch from hh to foundry..

@hrkrshnn
Copy link
Member

hrkrshnn commented Apr 1, 2022

@wminshew I don't use the flycheck part, unfortunately. But the general idea is to provide the project specific node_modules. Even that wouldn't work for things like hardhat's console.log. The best solution would be to let hardhat compile this and collect the errors from there. Also, an LSP plugin might make this obsolete. Feel free to reach out on hrkrshnn#3040 in discord if you have more questions or maybe want to build any of these!

@wminshew
Copy link

wminshew commented Apr 1, 2022

@hrkrshnn awesome, friend req sent (will | 0xSplits#1737). Yeah that's basically how I've been handling it to date -- just ignore flycheck & use prettier & solc. Would be great if lsp support fixes this.. otherwise have been torn between getting more involved in emacs-lisp / spacemacs (or maybe doom would be easier to customize) or gasp switching to vscode :( Was leaning the latter but at least knowing there are a few other active emacs-solidity users gives me some new inspiration to remain

@landakram
Copy link
Contributor

landakram commented Apr 1, 2022

@wminshew apologies for the radio silence here. I'd be really happy to help debug if I can, definitely want it to be working. Discord name is landakram#4502

Two cents on LSP: it would be awesome. I'm using lsp-mode for typescript and it's great. When I looked into this, I saw that the built in solc lsp server is only available on 0.8.0, so not sure if prior versions could be supported (which some projects are stuck on).

@landakram
Copy link
Contributor

Posted this in a related issue, but curious if this .dir-locals.el solution (#64 (comment)) works for folks

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

5 participants