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

Linter errors #139

Closed
ompadu opened this issue Jan 11, 2021 · 7 comments
Closed

Linter errors #139

ompadu opened this issue Jan 11, 2021 · 7 comments

Comments

@ompadu
Copy link

ompadu commented Jan 11, 2021

Is there a way to make the linter happy by importing a dummy package or something when opening .bfg files in an ide?

@jimporter
Copy link
Owner

Unfortunately, no not really. I think the answer here is to add an LSP configuration for bfg scripts, but that's complicated and I don't fully understand how it works. There's also #136 and #135 for this issue.

@ompadu
Copy link
Author

ompadu commented Jan 11, 2021

Oh, it's okay. Thank you for the answer :)

@ompadu ompadu closed this as completed Jan 11, 2021
@jimporter
Copy link
Owner

I filed #140 to track the LSP implementation. I'd like to get something working for it for 0.7, but I haven't been able to find much information out there on how you'd make a "derived" LSP language; all I really need is a way to say "this file is in Python syntax with these extra builtin symbols", but that seems to be nontrivial (or at least no one else has tried to do this, so there's no documentation on how to do it).

@ompadu
Copy link
Author

ompadu commented Jan 13, 2021

Maybe forking an existing python LSP, and adding the bfg stuff to it?

@jimporter
Copy link
Owner

Yeah, that's about what I'm thinking. Maybe there are even some hooks in one or another Python LSP implementation that I could use...

@ompadu
Copy link
Author

ompadu commented Jan 13, 2021

Wouldn't it have been easier to just have bfg9000 be a ordinary python module, that we could just import in the build script and run it with python? What are the advantages of doing it like this?

@jimporter
Copy link
Owner

The main advantage is that the .bfg script evaluation is only one phase of all the work necessary to generate the Makefiles for an actual build. While it's easy enough to do stuff before the .bfg script when it's just a module, it's not easy to do stuff after it.

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

2 participants