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

Coffeescript formatting broken #168

Closed
alkama opened this issue Dec 30, 2014 · 5 comments
Closed

Coffeescript formatting broken #168

alkama opened this issue Dec 30, 2014 · 5 comments
Assignees
Labels

Comments

@alkama
Copy link

alkama commented Dec 30, 2014

First, lets say all versions are up to date, both for atom and atom-beautify.

Here is a strange behavior I see:

  • When trying to beautify a CoffeeScript file, I get a undefined is not a function message in the "Atom Beautify Error Messages" MessagePanelView.

I tried to debug it and it fails here: https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/coffeescript-beautify.coffee#L11

It made me think the dependant module was probably wrongly installed, and indeed something gets messed !

Here are some details:

  • When looking at the atom-beautify/node_modules/coffee-formatter folder (so after a successful apm install) I see that structure:
README.md
node_modules/
package.json

Something is obviously missing there... the library itself !

  • When looking at the atom-beautify/package.json file (which is enriched with caches by the successful apm installation) I see even more puzzling insight:
"_atomModuleCache": {
  "version": 1,
  "dependencies": [
  ...
  {
    "name": "coffee-formatter",
    "version": "0.1.0",
    "path": "node_modules/atom-message-panel/lib/index.js"
  },
  ...

Notice the crazy "path" unfolding to a completely wrong location.

I guess there is something missing in the current state of the "coffee-formatter" plugin.
I saw that it was written in litcoffee, with grunt file to compile to plain javascript. This phase is probably not completed when it's imported by npm (or apm).

Hope it helps !

@Glavin001
Copy link
Owner

Thanks for looking into this! This makes sense now. I was having problems with other installations of Atom Beautify, on Travis CI, but just for Coffeescript. I could not reproduce this. I recently changed it to use npm's library instead of from Github directly and I think I messed up the publishing. I am away right now but will get to this once I am back Wednesday night or Thursday. Thanks again!

@alkama
Copy link
Author

alkama commented Dec 30, 2014

Glad I got useful :) No hurry! Enjoy the new year's eve!

@Glavin001 Glavin001 self-assigned this Dec 31, 2014
@Glavin001 Glavin001 added the bug label Dec 31, 2014
@Glavin001 Glavin001 added this to the My Christmas List milestone Dec 31, 2014
@Glavin001
Copy link
Owner

Found the problem! https://github.com/Glavin001/Coffee-Formatter/blob/master/package.json#L32
It points to the wrong repo URL and also does not properly build from the litcoffee into JS.

@Glavin001 Glavin001 mentioned this issue Jan 1, 2015
8 tasks
@Glavin001
Copy link
Owner

Published to v0.18.0. Happy New Year! 😃

@alkama
Copy link
Author

alkama commented Jan 1, 2015

Thanks :)
Happy new year !
Works fine now! (thought the plug does strange things that should probably be issues on the coffee-formatter itself).

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

2 participants