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

Output in build panel + Sublime build execution #54

Closed
wants to merge 5 commits into from

Conversation

eirki
Copy link

@eirki eirki commented Nov 30, 2018

As mentioned in #53, these changes add support for printing the output in Sublime's output panel. They also include .sublime-build files, so that SublimeHermes can be executed using ctrl+b (after having selected it as build system using ctrl+shift+b).

One change I am not certain about is the .sublime-settings file. I've changed the inline_output bool to variable called output_style, which can be set to default, inline or panel. Since this would invalidate the inline_output setting in existing user setting files, it might not be a good idea? I'm happy to try to implement any suggestions you have.

@ngr-t
Copy link
Collaborator

ngr-t commented Dec 3, 2018

Thank you for creating PR!
Great work, basically looks fine.

One point:
Hermes can work with programming languages other than Python (i. e. Julia, R, etc).
Therefore I don't think it's good to limit the scope of build system to Python. Could you fix that?

One change I am not certain about is the .sublime-settings file. I've changed the inline_output bool to > variable called output_style, which can be set to default, inline or panel. Since this would invalidate the inline_output setting in existing user setting files, it might not be a good idea? I'm happy to try to implement any suggestions you have.

This is OK. There is also need to disable output in editor (#52), I think about changing the option about this. Let's adopt yours.

@eirki
Copy link
Author

eirki commented Dec 3, 2018

Hermes can work with programming languages other than Python (i. e. Julia, R, etc).
Therefore I don't think it's good to limit the scope of build system to Python. Could you fix that?

Hm, good point! I could remove the selector line from the .sublime-build files, (https://github.com/ngr-t/SublimeHermes/pull/54/files#diff-9a06d0d8562ba3e5c65f0da6f835997dR2) but that would enable the build systems for every language which I think would be quite intrusive.

I could also change the selector to include specific languages, like Julia and R? I can see from the list of Jupyter kernels that there are a lot of languages that can run in Jupyter, but maybe we could pick the language that are most commonly used in Jupyter - like Julia, R and Python?

@ngr-t
Copy link
Collaborator

ngr-t commented Dec 8, 2018

Hmm. I think that it's sufficient if the build system does not run on the view without connection to Jupyter kernels.

@ngr-t
Copy link
Collaborator

ngr-t commented Jan 10, 2019

Sorry for leaving this PR for a while.

I want to merge this but still thinks it is good to not limit the scope by syntax, otherwise enable the build command iff the active view is connected to a Jupyter kernel through Hermes. We can do it by implementing is_enabled() method on HermesExecuteBlockBuild and HermesExecuteCellBuild. The build command is shown when users are conscious about connecting to Jupyter kernel through Hermes, therefore I think it is not so intrusive. The build system selector should be shown if users have more preferable build system.
I want to know if there are problematic use cases.

I can do some work if you agree to this direction.

@eirki
Copy link
Author

eirki commented Jan 16, 2019

No problem, I don't have as much free time to spend on this as I'd like, so there is no hurry.

I had not thought of using the is_enabled() method. However, are you sure it would work? I think that whether or not the build system appears in the Build Systems list is controlled by the selector line in the .build-system files, while the is_enabled() and is_visible() methods control whether or not the commands appear in the Command Palette.

I have tried experimenting with removing the selector line, and providing is_enabled() and is_visible() methods, but the only result I get is that the build systems always appear in the build systems list, no matter what syntax is activated. If you are able to make it work, then I think it would be a very good solution!

@ngr-t
Copy link
Collaborator

ngr-t commented Jan 18, 2019

OK, then I'm going to take over your working branch and try to do what I said above. Thanks.

@pykong
Copy link
Collaborator

pykong commented Feb 29, 2020

@eirki Thanks for your effort into this PR.
This project is now under new maintainers.
As the codebase is undergoing significant changes right now, it is unlikely we will merge this PR.
However, we will check what we might eventually salvage from it.

Closing.

@pykong pykong closed this Feb 29, 2020
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

Successfully merging this pull request may close these issues.

3 participants