Skip to content

builds fail when installing through package control #13

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

Closed
eballeste opened this issue Feb 20, 2018 · 12 comments
Closed

builds fail when installing through package control #13

eballeste opened this issue Feb 20, 2018 · 12 comments
Labels

Comments

@eballeste
Copy link

eballeste commented Feb 20, 2018

Building JS Custom.sublime-syntax.yaml-macros... (Packages/JSCustom/src/JS Custom.sublime-syntax.yaml-macros)

Error in macro execution.
  in "<file>", line 4, column 1

Error in macro execution.
  in "<file>", line 5, column 5

Traceback (most recent call last):
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/src/engine.py", line 68, in multi_constructor
    return apply_transformation(loader, node, macros[suffix])
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/src/engine.py", line 58, in apply_transformation
    return apply(transform, args)
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/src/util.py", line 18, in apply
    return fn(args)
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/lib/include.py", line 12, in include_resource
    file_path, file_contents = get_st_resource(resource)
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/src/sublime_resources.py", line 139, in get_st_resource
    installation_path = get_st_installation_folder()
  File "~/Sublime Text 3/Packages/yaml_macros_engine/st3/yamlmacros/src/sublime_resources.py", line 135, in get_st_installation_folder
    return path.dirname(exe)
  File "./python3.3/posixpath.py", line 151, in dirname
AttributeError: 'NoneType' object has no attribute 'rfind'

(file paths edited, replaced with ~)

same error on both builds

@Thom1729
Copy link
Owner

Thom1729 commented Feb 20, 2018

What platform are you on? Does restarting Sublime and running "JS Custom: Rebuild Syntaxes" fix the problem?

@eballeste
Copy link
Author

@Thom1729 get the same result when restarting sublime and running "Rebuild Syntaxes"

Sublime 3 on macOS Sierra

@Thom1729
Copy link
Owner

I'm not quite sure what's going on there, but I've released v1.0.7, which should resolve it. (It might take an hour or so for Package Control to pick it up.) Please let me know if this does not fix the problem!

@eballeste
Copy link
Author

I'll try EOD today and let you know, thanks!

@Thom1729
Copy link
Owner

@eballeste Any luck?

@eballeste
Copy link
Author

eballeste commented Feb 21, 2018

so it's weird, i installed the package again and it didn't throw any errors, however when i check the available syntaxes with js-custom, i only see these two options:
screen shot 2018-02-21 at 1 47 47 pm
screen shot 2018-02-21 at 1 48 07 pm

I rebuilt the syntaxes with no errors:

Building JS Custom.sublime-syntax.yaml-macros... (Packages/JSCustom/src/JS Custom.sublime-syntax.yaml-macros)
Compiled to Default.sublime-syntax. (~/Sublime Text 3/Packages/User/JS Custom/Syntaxes/Default.sublime-syntax)
[Succeeded in 1.36 seconds.]

Building JS Custom.sublime-syntax.yaml-macros... (Packages/JSCustom/src/JS Custom.sublime-syntax.yaml-macros)
Compiled to React.sublime-syntax. (~/Sublime Text 3/Packages/User/JS Custom/Syntaxes/React.sublime-syntax)
[Succeeded in 0.64 seconds.]

However, I still see the same two options (Styled Components)

@Thom1729
Copy link
Owner

Your JS Custom syntaxes are listed under User. Because they are dynamically compiled, the actual syntax definitions are stored in Packages/User/JS Custom/Syntaxes. As far as I know, there is no way for JS Custom to change the behavior of this menu.

The Styled Components syntax only exists to support the new styled_components configuration option. It should not be visible in the menu. I've just released v1.0.8, which should correct this.

@Thom1729 Thom1729 added the bug label Mar 4, 2018
@neutraali
Copy link

Was hoping to get better Flow -syntax highlighting compared to babel-sublime but no dice so far. I'm getting this same type of error when trying install the package via Package Control:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 1036, in run_
    return self.run()
  File "/home/neutraali/.config/sublime-text-3/Installed Packages/JSCustom.sublime-package/build_js_custom_syntaxes.py", line 99, in run
  File "/home/neutraali/.config/sublime-text-3/Packages/sublime_lib/st3/sublime_lib/output_panel.py", line 28, in __init__
    raise ValueError('Output panel "%s" does not exist.' % name)
ValueError: Output panel "YAMLMacros" does not exist.

... The final line points to the "YAMLMacros" -package that happened to be available via Package Control so I tried installing it, but that didn't work (as might be expected). I'm using SublimeText 3.1.1. In addition to JSCustom (and Package Control) I'm using the following packages:

  • Dockerfile Syntax Highlighting
  • LESS
  • SFTP
  • SublimeLinter
    • SublimeLinter-eslint
    • SublimeLinter-flow

@Thom1729
Copy link
Owner

My bad! 1.0.16 uses the OutputPanel from sublime_lib, but I wasn't constructing it correctly. As a result, it would break if the panel didn't already exist. Because it existed in my session, I did not notice the error.

1.0.17 is out with a fix. It should be available through Package Control within an hour or so.

@neutraali
Copy link

neutraali commented May 29, 2018

Thanks @Thom1729 - It's working 👍

However I don't think my personal situation got any better - Arrow functions and/or stuff inside angle brackets will still cause syntax highlighting to go haywire. An example:

_handleClick = (event: React.SyntheticEvent<HTMLButtonElement>): void => { . . . }

^ From this line onward the highlighting will malfunction. This is the subject matter of different issue tho. 😸

@Thom1729
Copy link
Owner

This is issue #29. I've just released version 1.0.18, which handles simple return type declarations.

@string-areeb
Copy link

The build is failing and throwing this error - build() missing 1 required positional argument: 'error_highlighter'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants