-
Notifications
You must be signed in to change notification settings - Fork 3
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
Opening any LsL script causes error. #6
Comments
@shadoskill This is due to a breaking change within SublimeLinter 4. I'm currently reviewing whether or not the preprocessor linting is possible at all. For now, as a temporary workaround you can force usage of SublimeLinter 3. I know this answer isn't great, sadly my days are limited to 24h as well. |
any pointers how to get this resolved? Compare code: https://github.com/XenHat/SublimeLinter-contrib-lslint/blob/6674409/linter.py |
We have our documentation here: http://www.sublimelinter.com/en/stable/linter_attributes.html. There are probably a bunch of things that need to happen with that plugin. There has been an extensive beta period with a lot of communication earlier this year, and we did reach out to most plugins about the breaking changes. I guess you kinda missed that window. I'm not sure what you and @ XenHat already tried, or what's unclear... or are you looking for someone to rewrite the plugin for you? |
@braver Using v4 we cannot define |
Yeah, that's not really something I would recommend doing. SublimeLinter shouldn't be the only way you can run a linter, it's merely a front-end. There's lots of ways to make stuff easier for end users, but you shouldn't ship linter executables with a SublimeLinter plugin. You'll notice every other plugin comes with an explanation on how to install the executable.
Why, what does it do? If it does what I think it does, that won't work. If you take what's in the buffer, transform it via a preprocessor, and then send it to the linter, how do you take that feedback from the linter and relate it to what's in the buffer? Sublime and the linter will both contain different code and SublimeLinter will not be able to reliably present the feedback from the linter to the user. I guess now I understand some of what is going on in |
|
That's just not proper python, @buildersbrewery. None of these methods are actually
|
Other than that the plugin probably works with our deprecation layers. Shipping binaries is totally ok. SublimeLinter doesn't really care. |
Meaning it will probably break again in the future? ;) I'm not saying SublimeLinter cares about much of what you're doing here, but this thing seems a bit convoluted compared to the capacity to maintain it all. Yes the platform allows you to override methods, but you then have to be able to keep up with changes that might break your overrides. If you can simplify what you're trying to do here, you'll have an easier time with it. ❤️ @kaste for the actual helpful details. I'm really no help at all here 😉 |
@kaste Thanks for the input, I believe I fixed everything now. |
👍 Since For searching a binary really use import shutil
def which(self, executable):
enhanced_path = os.pathsep.join([
os.environ.get('PATH', ''),
os.path.join(sublime.packages_path(), 'LSL', sublime.platform().strip()),
os.path.join(sublime.packages_path(), 'LSL', 'bin', 'lslint', sublime.platform().strip()),
os.path.join(sublime.packages_path(), 'LSL', 'bin', 'mcpp', sublime.platform().strip()),
# etc ...
])
return shutil.which(executable, path=enhanced_path) |
@kaste for: def which(self, executable):
enhanced_path = os.pathsep.join(
os.environ.get('PATH', ''),
os.path.join(
sublime.packages_path(),
PKG_NAME,
'bin',
'lslint',
sublime.platform() if sublime.platform() in ['linux', 'osx']\
else 'windows' if platform.release() == 'XP'\
else 'windows' + platform.architecture()[0][:-3]
)
)
return shutil.which(executable, path=enhanced_path) I receive a switching |
My SublimeLinter will call it once with 'lslint' and you can call it like |
Maybe |
@kaste thanks for the valuable feedback. Quick note: You had a small typo as it was |
@shadoskill I'll try to push an update later today. |
fixed in v4 |
Actual behavior
Traceback
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: