-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
LSP to resolve custom include paths (e.g. Hardhat) #12994
Conversation
ah right thanks! Dappfile is what I remembered, but this time, I in fact meant a framework that introduced a file that is now also supported by another one. I am talking vaguely because I forgot the names. ;-( I might look into Dappfile though. |
f34e3a3
to
a5e581e
Compare
@cameel if we can't come up with something immediately, what do you think about adding a CLI option, such as |
Oh, you meant |
This comment was marked as outdated.
This comment was marked as outdated.
I can do that. thanks. But I am still hoping for some kind of auto-configuration, where users do not need to do too much. Suppose you are working in more than one project, and they all do not necessarily share the same include paths. I think we could auto-detect at least the well known frameworks and adjust the include paths accordingly (on top of manually added ones, if added). What do you think, @cameel ? |
238692d
to
0a4acc5
Compare
0a4acc5
to
bc1cee2
Compare
bc1cee2
to
fb61dc6
Compare
91283c4
to
1be4464
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the commit with the descrp. [lsp] Fixes sourceUnitNameToUri() path path resolving in relation to ... …include paths being used.
Maybe one path
is enough in the commit message? :P
This comment was marked as resolved.
This comment was marked as resolved.
1be4464
to
bb0688e
Compare
81b2a49
to
bb90328
Compare
95e8ce5
to
c3cbd81
Compare
…s added by default. - Factor out FileRepository's path resolving into own public function. - Fixes sourceUnitNameToUri() path resolving in relation to include paths being used. - Adding an solAssert(). - adds nother test for include-paths (bad include) - Fixes a case on Windows there an ill-formed URI was generated. - Dropping unnecessary if-branch when translating from sourceUnitName to URI.
c3cbd81
to
0b15645
Compare
fab70dc
to
ad15e3f
Compare
55bfa4d
to
209cf59
Compare
209cf59
to
d89008d
Compare
Hi, just had this problem on nvim with newly installed version of Wanted to check if this is released already or not. Edit: Checked and the commit with hash |
Yes, this will go into 0.8.16, which we are releasing tomorrow. |
This PR is WIP, but it will fix #12833 later on.
Big question is, how do we want to tell
solc --lsp
where to look for include paths. I remember there was some project file format that does include that information, but what was that? @cameel, do you remember?Checklist:
tryResolvePath(.)
sourceUnitNameToUri()
by making use of new path resolver.{projectRoot}/node_modules
to include paths (vscode-solidity is doing that too and users are used to it)