GithubHelp home page GithubHelp logo

atom-haxe's People

Contributors

boozook avatar djpale avatar jeremyfa avatar kevinresol avatar keymaster- avatar ruby0x1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-haxe's Issues

Autocomplete fails to produce completion, "go to definition" fails and the Linter fails (all related)

I finally tracked this one down and got a hack in place for now. The main gist of this is that when the autocomplete server tries to compile the project to get completions, go to definition or lint the project it fails with:

Type not found: LuxeApp

This happens with all the test and sample projects included with Luxe. Note also that flow builds them just fine. I can only guess this happens due to the replacement tags in the LuxeApp class but I really dont have enough experience with all this to say for sure.

I was able to hack around it by first doing a web build (which gets a LuxeApp class with the replacement tags removed) and then adding the path to the build directory for all haxe compiler calls.

In the haxe-call.js file, I modified the haxe method to have the extra search path:

args.push( '-cp' );
args.push( 'bin/web.build/haxe' );

Note that this is obviously not a proper fix. I don't know what a proper fix would be for this but I figured I would detail the exact error and what fixes it (finding the LuxeApp class).

linting; implement linting

Port from @jeremyfa coffeescript.

Should be implemented in lib/linting/ only, in the same minimal/clean layout as completion.
Commands register in lib/haxe.js, and implemented in the sub folder.

Package spawning process: 'haxe' could not be spawned

Steps to reproduce:

  1. Open Atom Application (OSX)

Expected Result:

  • Atom starts up normally with haxe support

Actual Result:

  • Atom starts up with haxe highlighting (at the least), but triggers error message: " 'haxe' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process. "
  • haxe is installed and in my path

Installed Atom Packages (All packages)

  • flow (0.5.3)
  • haxe (0.8.10)
  • language-haxe (0.3.1)
  • linter (1.11.3)

Other Versions:

  • Atom: 1.4.3 (same error occurs on Atom 1.5.0-beta3)
  • haxe: Haxe Compiler 3.2.1
  • haxelib: Haxe Library Manager 3.2.0-rc.3
  • flow: 1.0.0-alpha.1

Uncaught TypeError: Cannot read property 'getRootScopeDescriptor' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.188.0
System: Mac OS X 10.10.2
Thrown From: haxe package, v0.6.0

Stack Trace

Uncaught TypeError: Cannot read property 'getRootScopeDescriptor' of undefined

At /Users/adrienjonquet/.atom/packages/haxe/lib/haxe.js:148

TypeError: Cannot read property 'getRootScopeDescriptor' of undefined
  at Object.module.exports.build (/Users/adrienjonquet/.atom/packages/haxe/lib/haxe.js:148:27)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:242:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)

Commands

     -3:40.5 haxe:build (atom-text-editor.editor.is-focused)
  7x -3:35.9 core:close (atom-text-editor.editor.is-focused)
  6x -3:27.6 symbols-view:toggle-file-symbols (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:29.7 settings-view:open (atom-pane.pane.active)
  6x -1:09.4 core:backspace (atom-text-editor.editor.mini)
     -0:00.5 haxe:build (ul.list-inline.tab-bar.inset-panel)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "monokai"
    ]
  },
  "haxe": {}
}

Installed Packages

# User
autocomplete-haxe, v0.2.0
autocomplete-plus, v2.7.0
haxe, v0.6.0
language-haxe, v0.2.1
language-ocaml, v1.1.0
language-opa-ocaml, v0.2.0
language-scala, v1.1.0
linter, v0.12.0
monokai, v0.13.0
pretty-json, v0.3.2

# Dev
No dev packages

how to run openfl code

hwdy,

this may be simple. but is there a way this can run openfl code at all from within atom?
not seen anything too much on this, except people saying to just do it in console

thanks

Autocomplete-plus doesn't work with atom-haxe;

As the title suggests, when the haxe plugin is activated autocomplete-plus doesn't work properly, i.e. it doesn't suggest words while I'm typing, but if I disable haxe, autocomplete-plus works properly.

I have the same problem in linux and mac, even with a fresh installation.

By the way, when I restart the haxe completition server, the debug log shows the following output:

haxe / completition / server / starting `haxe `on `6112`
haxe / completition / server / Error: Couldn't wait on 127.0.0.1:6112

haxe / completition / server / process exit 1

switch, if, if else etc - become null with package

the have package is great, but, it kills off things such as say, switch statments, for loops, if statements etc.

finding say openfl stuff is fine, but the actual language for other things dissapear

toplevel completion

haxe supports toplevel completion (i think its 3.2+, but still), you just do --display Main.hx@42@toplevel and it returns a list of local vars, fields, imports, etc.

this is really important completion feature, and I'd like to see it in atom-haxe.

one thing to note: currently if we autocomplete inside function call parens, it shows call tips, but actually, i think it should show toplevel completion, and show calltips using some other keybinding (or just show both)

active provider/consumer state

The following is true:

  • packages are global (one haxe install)
  • packages are singular (one haxe instance)

This means that there should only be one active completion provider end point active at any time, and activating a second consumer would switch exclusively to that one. i.e two consumers can't easily share the same provider.

This also solves the problem of multiple consumers on the provider, overriding each others state on startup. The provider will remember the last active consumer, and ignore any other's. consumers should remember whether they were active and only try to register once they are re-activated.

To put this in concrete:

  • flow file -> set as active flow file (consumer=flow)
  • hxml file -> set as active hxml file (consumer=haxe)

There can only be one consumer active, and haxe plugin will remember only that one. consumer will remember whether it thought it was active, for user workflow, but haxe plugin will ignore it otherwise.

Potentially in future it might be worth revisiting but I don't think this will impact workflow in short term.

signature parsing fail

class Main {
    static function f(a:Int, ?b:String->Void, ?c:Float) {}

    static function main() {
        Main.
    }
}

hxml files; cwd and right click

When setting a hxml file from the right click menu, it's not possible to specify it's cwd directly yet so it uses the same folder as the hxml itself.

  • allow hxml_cwd for hxml_file setting
  • make context menu inside hxml file work too

HaxeLinter.Linter is deprecated.

AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/atom-community/linter/wiki/Migrating-to-the-new-API

HaxeLinter.Linter (/Users/lepton/.atom/packages/linter/lib/linter.coffee:60:4)
new HaxeLinter (/Users/lepton/.atom/packages/haxe/lib/linting/linter.js:12:38)
Object.lint (/Users/lepton/.atom/packages/linter/lib/legacy.coffee:61:21)
<unknown> (/Users/lepton/.atom/packages/linter/lib/editor-linter.coffee:69:25)
currentLinter (/Users/lepton/.atom/packages/linter/lib/editor-linter.coffee:68:19)
<unknown> (/Users/lepton/.atom/packages/linter/lib/editor-linter.coffee:82:22)

Feature request: auto class import

Reference the functionality in FD:

  • Type the class name directly and press ctrl+shift+1, the class will be imported automagically. If there are more than one class of the same name, allow user to choose.

capture1

  • Autocomplete + autoimport whenever a class is expected (e.g. var a:| or function():|).

capture2

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.7
System: Mac OS X 10.10.5
Thrown From: haxe package, v0.8.7

Stack Trace

Uncaught Error: spawn EACCES

At child_process.js:1145

Error: spawn EACCES
  at exports._errnoException (util.js:734:11)
  at ChildProcess.spawn (child_process.js:1145:11)
  at exports.spawn (child_process.js:977:9)
  at Object.module.exports.reset (/Users/cpg/.atom/packages/haxe/lib/completion/server.js:41:24)

Commands

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "one-dark-syntax"
    ]
  },
  "haxe": {
    "haxe_path": "/usr/lib/Haxe",
    "haxelib_path": "/usr/lib/Haxe/lib",
    "debug_logging": true
  }
}

Installed Packages

# User
atom-beautify, v0.28.11
atom-material-ui, v0.5.21
flow, v0.4.2
haxe, v0.8.7
language-actionscript3, v0.3.0
language-haxe, v0.3.0
lime, v0.3.1
linter, v1.4.2

# Dev
No dev packages

Plugin dysfunctional when project.hxml uses "--next"

First of all, I am not sure if this is a functionality issue of this plugin or the requirement one "language-haxe", so please tell me if this is in the wrong place ;)

Most functions of the plugin (except building) are exceptionally slow or won't function at all when the project.hxml does multiple builds using "--next".

Now, I know that the underlying problem here might be the haxe executable itself, which causes problems with this.
However, since this problem is known since forever and not fixed in haxe yet, I'd suggest a workaround in the plugin.

Would it be possible to not send the whole project.hxml to the executable for auto-completion, but instead something else, like the part before the first "--next" or something like it?
I think that for most project that would yield correct results, anyway. And would definitely be preferrable to the current state (= not working at all).

It is really uncomfortable having to comment/uncomment stuff in the project.hxml all the time just to get autocompletion working ;)

Auto-completion happens on ; at end of line

Hi,

I've noticed auto-completion happens after typing the semi-colon (;) at the end of a line/statement.

I realise the user could in theory start typing another statement at that point, but in practice it does not seem very useful to me. In fact I find it quite a hindrance, as it causes me to have to dismiss the pop-up at the end of almost every line.

Perhaps an option in the Settings could let the user specify a list of characters not to auto-complete after?

Thanks!

Haxe linter should be updated to the most recent API

(This error report was generated by Atom. :) )
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API

Object.activate (/Users/Daniel/.atom/packages/linter/lib/main.coffee:57:8)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:240:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:221:30)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:213:14)
PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:452:21)

some errors messages are misleading

when running thorugh some AS3 tutorials. there have been error messages. but they seem backwards
one such line as an example is this

private var _ySpeed:Int;
_ySpeed = 0.05;

then when i run the code it pops up with this message:
Source/Fruit.hx:21: characters 4-18 : Float should be Int
realistically it should be the other way around like this:
Source/Fruit.hx:21: characters 4-18 : Int should be Float

The "Requirements" section inside readme.md should explict "Haxe" as one of the requirements

It's not clear that having Haxe is a requirement for this package to work.
Installing this package without this requirement will result on Atom displaying warnings/errors.
Even though it's acceptable to assume that Haxe developers have Haxe installed on their machines, it shouldn't be a "hidden dependence" for this package.

Also, at least for my specific case, I don't have Haxe installed. For now, since Im learning the language, Im using Vagrant/VMs with Haxe.

Failed to load the haxe package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.18
System: MUMLA
Thrown From: haxe package, v0.8.7

Stack Trace

Failed to load the haxe package

At Cannot find module 'atom-message-panel'

Error: Cannot find module 'atom-message-panel'
  at Module._resolveFilename (module.js:334:15)
  at Function.Module._resolveFilename (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\module-cache.js:383:52)
  at Function.Module._load (module.js:284:25)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\Mümla\.atom\packages\haxe\lib\utils\log.js:3:25)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .js] (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\Mümla\.atom\packages\haxe\lib\haxe-state.js:5:13)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .js] (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\Mümla\.atom\packages\haxe\lib\completion\query.js:7:15)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .js] (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\Mümla\.atom\packages\haxe\lib\haxe.js:4:20)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .js] (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Package.module.exports.Package.requireMainModule (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package.js:761:34)
  at C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package.js:192:28
  at Package.module.exports.Package.measure (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package.js:169:15)
  at Package.module.exports.Package.load (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package.js:183:12)
  at PackageManager.module.exports.PackageManager.loadPackage (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package-manager.js:405:14)
  at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\package-manager.js:485:30)
  at C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\node_modules\settings-view\lib\package-manager.js:371:29
  at exit (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\node_modules\settings-view\lib\package-manager.js:60:16)
  at triggerExitCallback (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\buffered-process.js:213:47)
  at ChildProcess.<anonymous> (C:\Users\Mümla\AppData\Local\atom\app-1.0.18\resources\app.asar\src\buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -2:07.7.0 application:open (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Config

{}

Installed Packages

# User
haxe, v0.8.7

# Dev
No dev packages

implement build command

will handle hxml "natively" to the plugin:

consumers

  • consumers will set a flag if they are a building consumer
  • if consumer is active and building, an event will be triggered
    • if not building, hxml build will run on active state
    • allow consumer flag for no building state at all
  • consumers can pass additional scopes to check for
  • details of the build are up to the consumer

Uncaught TypeError: Cannot read property 'path' of null

I can regularly reproduce an an unhandled error by doing the following:

  1. Open a new file
  2. Set syntax to haxe3
  3. Try to type a // comment in the otherwise empty file.

The following error is thrown after the first /:

Atom Version: 1.0.2
System: Mac OS X 10.10.4
Thrown From: haxe package, v0.8.1

Stack Trace

Uncaught TypeError: Cannot read property 'path' of null

At /Users/michaelmartin/.atom/packages/haxe/lib/completion/provider.js:52

TypeError: Cannot read property 'path' of null
  at Object.module.exports.getSuggestions (/Users/michaelmartin/.atom/packages/haxe/lib/completion/provider.js:52:43)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:255:56
  at Array.forEach (native)
  at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:234:17)
  at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
  at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:221:19)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61

Commands

     -6:33.2.0 editor:indent (atom-text-editor.editor.is-focused)
     -6:32.8.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -6:13.7.0 core:move-up (atom-text-editor.editor.is-focused.autocomplete-active)
     -6:13.6.0 core:move-left (atom-text-editor.editor.is-focused)
     -6:13.5.0 linter:set-bubble-transparent (atom-text-editor.editor.is-focused)
  6x -6:13.3.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -6:11.8.0 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -6:04.9.0 core:move-down (atom-text-editor.editor.is-focused)
     -6:04.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -6:04.1.0 core:select-up (atom-text-editor.editor.is-focused)
     -6:03.9.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
     -6:03.6.0 core:delete (atom-text-editor.editor.is-focused)
     -0:08.5.0 application:new-file (atom-text-editor.editor.is-focused)
     -0:06.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:04.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.8.0 set-syntax:Haxe3 (atom-text-editor.editor)

Config

{
  "core": {
    "ignoredNames": [
      "node_modules"
    ],
    "projectHome": "/Users/michaelmartin/Projects",
    "themes": [
      "one-dark-ui",
      "monokai"
    ],
    "disabledPackages": [
      "docblockr",
      "vim-mode"
    ]
  },
  "haxe": {}
}

Installed Packages

# User
Stylus, v1.0.0
atom-pair, v1.1.6
emmet, v2.3.12
haxe, v0.8.1
highlight-selected, v0.10.1
language-haxe, v0.3.0
language-jade, v0.5.1
linter, v1.2.3
monokai, v0.14.0
pretty-json, v0.4.1
set-syntax, v0.3.0
tasks, v2.2.0
trailing-spaces, v0.3.2

# Dev
tasks, v2.1.0

When atom-flow is enabled, atom-haxe cannot spawn 'haxelib'

I am getting this error when I have atom-flow enabled

screenshot 2015-10-31 20 13 32

I've tried setting the haxelib location in atom-haxe settings to multiple locations including '/usr/local/bin/', '/usr/local/bin/haxelib' and even the location I have the libraries 'Users/jonathonyule/dev/haxelib'.

Any help or points in the right direction would help a lot

build; cancel build needed

  • keymap (Ctrl-c on mac, ctrl-break on linux/windows by default).
  • menu item
  • consecutive builds
  • logs from another instance

Not an issue, but an enhancement to the autocomplete UI

Demo of changes here: https://vid.me/BndG

Update provider.js file here:
https://gist.github.com/prime31/1e251e204d2e57507999

Changes included:

  • add description when available
  • add type icons (via suggestion.type). Currently logs unhandled item.kind via console.log in case I missed any.
  • move type to leftLabel of the suggestion.name for non-methods (keep it to right for methods since they can get pretty long)

Feel free to use the changes or not. Just figured I would post them in case others find them useful.

Flicker in project tree when completion is invoked

By default files for completion server are saved with . prefix. When completion query is invoked file is shown in project tree view for a split second. If you change prefix to ._ file will be ignored and will not show up in the tree. By default Atom ignores vcs folders, .ds_store, thumbs.db and files matching ._* mask.

I've changed it at [https://github.com/snowkit/atom-haxe/blob/master/lib/completion/provider.js#L320] in my local copy, but there might be other changes required.

parsing; arg parsing issue

With:
public static function loadTexture( _id:String, ?_onload:Texture->Void, ?_silent:Bool=false )

Some arg34 etc is inserted, but only 3 args exist on the results from completion, 4 are shown.

screenshot 2015-03-17 14 16 08

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.