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

Syntax: Redeclaration of symbol '…'. #16

Open
MARTIMM opened this issue Oct 27, 2022 · 5 comments
Open

Syntax: Redeclaration of symbol '…'. #16

MARTIMM opened this issue Oct 27, 2022 · 5 comments

Comments

@MARTIMM
Copy link

MARTIMM commented Oct 27, 2022

I get these messages from the syntax check while there is no duplication of the particular symbol. In this case, it trips over the line

unit class QA::Gui::InputWidget:auth<github:MARTIMM>;

It has the same problems with other modules in the same project when using unit. I've tried to rephrase this declaration

class QA::Gui::InputWidget:auth<github:MARTIMM> does QA::Gui::Frame {

having a different error

Syntax: QA::Gui::Frame is not composable, so QA::Gui::InputWidget cannot compose it

This class was declared like a class instead of a role. However, the error was still there after the change.

Note also that raku didn't have any trouble compiling the code.

@rawleyfowler
Copy link

I think this is caused by the LSP seeing this module already installed, so it's in scope, this makes the LSP useless for module development.

@bscan
Copy link
Owner

bscan commented Feb 25, 2023

Ah, that's unfortunate. The LSP is still a work in progress, and I'd love some help if anyone is interested. Additional parsing modes for modules could make sense, or at least updates that allow this to work for modules too. I believe the overall architecture is good, and the key here is iterating on the technique for syntax checking and extracting the errors and warnings (surprisingly difficult).

@rawleyfowler
Copy link

I'm currently running a fork of this project that skips looking up modules, besides that it's fairly complete.

@bscan
Copy link
Owner

bscan commented Feb 25, 2023

@rawleyfowler, that's great. I'd love a pull request if you're interested. I'm also more than happy to answer any questions about the project or review any code. Thanks!

@rawleyfowler
Copy link

@bscan I will see if I can get a better solution and I will try to PR this weekend.

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