Coder Social home page Coder Social logo

atom-format-lua's People

Contributors

gitter-badger avatar mingjunyang avatar ryanplusplus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

atom-format-lua's Issues

Uncaught TypeError: Cannot read property 'length' of null

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.7
System: Microsoft Windows 8.1 Pro
Thrown From: atom-format-lua package, v0.0.5

Stack Trace

Uncaught TypeError: Cannot read property 'length' of null

At C:\Users\Benjamin\.atom\packages\atom-format-lua\lib\atom-format-lua.coffee:41

TypeError: Cannot read property 'length' of null
  at Object.module.exports.AtomFormatLua.format (C:\Users\Benjamin\.atom\packages\atom-format-lua\lib\atom-format-lua.coffee:41:28)
  at atom-workspace.subscriptions.add.atom.commands.add.atom-format-lua:format (C:\Users\Benjamin\.atom\packages\atom-format-lua\lib\atom-format-lua.coffee:12:94)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:156:19)
  at [object Object].jQuery.fn.trigger (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\space-pen-extensions.js:64:23)
  at EventEmitter.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\window-event-handler.js:75:67)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:169:7)
  at EventEmitter.ipc.sendSync (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\atom.asar\renderer\api\lib\ipc.js:21:31)
  at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\atom.asar\renderer\api\lib\remote.js:110:29)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\context-menu-manager.js:170:31)
  at HTMLDocument.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\window-event-handler.js:150:33)
  at HTMLDocument.handler (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\src\space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
  at HTMLDocument.elemData.handle (C:\Users\Benjamin\AppData\Local\atom\app-1.0.7\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "spell-check",
      "highlight-css-color",
      "white-cursor",
      "feedback",
      "welcome",
      "auto-indent",
      "linter-luacheck",
      "atom-beautify",
      "build"
    ],
    "autoHideMenuBar": true,
    "excludeVcsIgnoredPaths": false
  }
}

Installed Packages

# User
atom-format-lua, v0.0.5
auto-detect-indentation, v0.4.2
autocomplete-paths, v1.0.2
autocomplete-php, v0.3.7
autocomplete-sass, v0.1.0
css-color-underline, v1.0.1
file-icons, v1.6.9
fold-functions, v0.3.1
indent-guide-improved, v1.4.2
indentation-indicator, v0.6.0
keyboard-localization, v1.4.8
language-blade, v0.15.0
language-gitignore, v0.2.0
language-lua, v0.9.4
laravel, v0.7.0
less-than-slash, v0.8.0
line-ending-selector, v0.0.5
linter, v1.4.3
linter-lua, v1.0.0
linter-lua-findglobals, v1.0.0
linter-php, v1.0.3
minimap, v4.13.2
one-dark-syntax, v1.1.0
one-dark-ui, v1.0.3
open-recent, v2.3.0
tabs-to-spaces, v0.11.1
trailing-spaces, v0.3.2

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'getGrammar' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.8.0
System: Mac OS X 10.11.3
Thrown From: atom-format-lua package, v0.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'getGrammar' of undefined

At /Users/cbf/.atom/packages/atom-format-lua/lib/atom-format-lua.js:33

TypeError: Cannot read property 'getGrammar' of undefined
    at format (/Users/cbf/.atom/packages/atom-format-lua/lib/atom-format-lua.js:33:15)
    at atom-workspace.atomFormatLuaFormat (/Users/cbf/.atom/packages/atom-format-lua/lib/atom-format-lua.js:14:13)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/cbf/Documents/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Users/cbf/Documents/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Users/cbf/Documents/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Users/cbf/Documents/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1100:28)
    at EventEmitter.outerCallback (/Users/cbf/Documents/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:327:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

     -9:58.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  3x -3:12.5.0 atom-format-lua:format (div.panels)

Config

{}

Installed Packages

# User
atom-format-lua, v0.1.1
language-lua, v0.9.4

# Dev
No dev packages

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the atom-format-lua package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

  • TextEditor.save

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Please let me know if you have any questions, I'd be happy to help!

Uncaught TypeError: Bad argument

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11
System: Mac OS X 10.10.5
Thrown From: atom-format-lua package, v0.0.5

Stack Trace

Uncaught TypeError: Bad argument

At child_process.js:1119

TypeError: Bad argument
  at TypeError (native)
  at ChildProcess.spawn (child_process.js:1119:26)
  at Object.exports.spawn (child_process.js:977:9)
  at Object.module.exports.AtomFormatLua.format (/Users/Leo/.atom/packages/atom-format-lua/lib/atom-format-lua.coffee:54:24)
  at atom-workspace.subscriptions.add.atom.commands.add.atom-format-lua:format (/Users/Leo/.atom/packages/atom-format-lua/lib/atom-format-lua.coffee:12:94)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -9:43.5.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -9:42.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -9:33.8.0 core:save (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -6:03.4.0 command-palette:toggle (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -5:58.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -5:58.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -5:58.4.0 atom-beautify:beautify-editor (atom-text-editor.editor.vim-mode.insert-mode)
     -5:51.7.0 core:copy (atom-notification.warning.icon.icon-alert.native-key-bindings.has-detail.has-close)
     -1:51.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.1.0 atom-format-lua:format (atom-text-editor.editor.vim-mode.insert-mode.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "monokai"
    ],
    "disabledPackages": [
      "symbols-view"
    ]
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
atom-beautify, v0.28.12
atom-ctags, v4.2.0
atom-format-lua, v0.0.5
autocomplete-paths, v1.0.2
file-icons, v1.6.9
highlight-selected, v0.10.1
language-lua, v0.9.4
language-protobuf, v0.5.0
linter, v1.5.1
linter-jshint, v1.2.0
linter-lua, v1.0.0
monokai, v0.18.0
symbols-tree-view, v0.10.0
vim-mode, v0.60.0

# Dev
No dev packages

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.5.4
System: Mac OS X 10.11.2
Thrown From: atom-format-lua package, v0.1.1

Stack Trace

Uncaught Error: spawn EACCES

At internal/child_process.js:298

Error: spawn EACCES
    at exports._errnoException (util.js:837:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at Object.exports.spawn (child_process.js:351:9)
    at format (/Users/mustafa/.atom/packages/atom-format-lua/lib/atom-format-lua.js:69:20)
    at atom-workspace.atomFormatLuaFormat (/Users/mustafa/.atom/packages/atom-format-lua/lib/atom-format-lua.js:14:13)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:01.4.0 atom-format-lua:format (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "atom-format-lua": {
    "lua51": "/Users/mustafa/lua-5.3.2"
  }
}

Installed Packages

# User
atom-format-lua, v0.1.1
autocomplete-corona, v1.0.2
color-picker, v2.1.1
file-icons, v1.6.17
highlight-selected, v0.11.2
language-lua, v0.9.4
minimap, v4.19.0
open-recent, v5.0.0
terminal-plus, v0.14.5

# Dev
No dev packages

Uncaught Error: Can't save a buffer with no file

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.25.0 x64
Electron: 1.7.11
OS: Unknown Windows version
Thrown From: atom-format-lua package 0.1.5

Stack Trace

Uncaught Error: Can't save a buffer with no file

At C:\Users\jiang\AppData\Local\atom\app-1.25.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:1305

Error: Can't save a buffer with no file
    at TextBuffer.module.exports.TextBuffer.saveTo (~/AppData/Local/atom/app-1.25.0/resources/app/node_modules/text-buffer/lib/text-buffer.js:1305:21)
    at TextBuffer.module.exports.TextBuffer.save (~/AppData/Local/atom/app-1.25.0/resources/app/node_modules/text-buffer/lib/text-buffer.js:1289:25)
    at TextEditor.save (~/AppData/Local/atom/app-1.25.0/resources/app/src/text-editor.js:1148:38)
    at format (/packages/atom-format-lua/lib/atom-format-lua.js:44:12)
    at HTMLElement.atomFormatLuaFormat (/packages/atom-format-lua/lib/atom-format-lua.js:15:13)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.25.0/resources/app/src/command-registry.js:384:49)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.25.0/resources/app/src/command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.25.0/resources/app/src/atom-environment.js:1343:25)
    at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.25.0/resources/app/src/application-delegate.js:339:53)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:197:7)

Commands

     -1:14.8.0 grammar-selector:show (atom-text-editor.editor.is-focused)
     -0:51.2.0 intentions:highlight (input.hidden-input)
     -0:51 core:paste (input.hidden-input)
  2x -0:47.2.0 core:backspace (input.hidden-input)
     -0:41.1.0 core:copy (span.syntax--comment.syntax--line.syntax--double-dash.syntax--lua)
     -0:23 intentions:highlight (input.hidden-input)
     -0:22.8.0 core:paste (input.hidden-input)
     -0:20.8.0 core:select-all (span.syntax--keyword.syntax--control.syntax--lua)
     -0:20.4.0 intentions:highlight (input.hidden-input)
     -0:20 core:paste (input.hidden-input)
  2x -0:17.6.0 core:backspace (input.hidden-input)
  3x -0:15.6.0 editor:newline (input.hidden-input)
     -0:06.9.0 atom-format-lua:format (input.hidden-input)

Non-Core Packages

active-syntax 0.4.0 
atom-format-lua 0.1.5 
autocomplete-python 1.10.5 
base16-atelierdune-dark-syntax 2.0.3 
base16-atelierlakeside-dark-theme-syntax 0.3.0 
busy-signal 1.4.3 
city-lights-syntax 1.1.8 
color-picker 2.2.5 
emmet 2.4.3 
emp-debugger 0.11.2 
funkcions-syntax-theme 1.3.0 
intentions 1.1.5 
jackhammer-syntax 1.1.0 
javyus-x 3.0.0 
kary-foundation-dark 4.0.0 
language-lua 0.9.11 
linter 2.2.0 
linter-lua 1.0.4 
linter-ui-default 1.7.1 
material 2.2.0 
minimap 4.29.8 
paraiso-dark 2.0.2 
paraiso-light 2.0.2 
platformio-ide-terminal 2.8.1 
python-debugger 0.2.0 
script 3.17.3 
seti-ui 1.10.0 
simplified-chinese-menu 5.3.5 
SkriptDark-Syntax 2.1.2 
snytax 0.1.2 
sync-settings 0.8.5 
trappist-one-syntax 0.3.0 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.