Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

JS error and rebuilds triggered #76

Closed
FredrikNoren opened this issue Sep 14, 2016 · 7 comments
Closed

JS error and rebuilds triggered #76

FredrikNoren opened this issue Sep 14, 2016 · 7 comments
Labels

Comments

@FredrikNoren
Copy link

Hi,

I'm not sure why this happens, but for some of my repositories linter-rust triggers a complete rebuild, and then crashes with the following error:

SyntaxError: Unexpected number
    at Object.parse (native)
    at LinterRust.parseJSON (/Users/noren/.atom/packages/linter-rust/lib/linter-rust.coffee:79:24)
    at LinterRust.parseJSON (/Users/noren/.atom/packages/linter-rust/lib/linter-rust.coffee:1:1)
    at exit (/Users/noren/.atom/packages/linter-rust/lib/linter-rust.coffee:54:25)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:215:47)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:222:18
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:100:18)
    at emitOne (events.js:95:20)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:477:12)

The rebuild also crashes so if I run cargo run after this it needs to build the whole project from scratch.

The only "special" things about these repos that I can think of is that they have a .cargo/config with a bunch of linking statements:

[target.x86_64-pc-windows-gnu.assimp]
rustc-link-search = ["../../pixelport_deps/assimp/v3.2/x86_64-pc-windows-gnu"]
rustc-link-lib = ["assimp", "stdc++"]

Versions

  • rustc 1.13.0-nightly (497d67d70 2016-09-01)
  • linter-rust 0.5.6
  • atom 1.10.2
@White-Oak
Copy link
Member

White-Oak commented Sep 14, 2016

Thanks for the issue! Can you please run Atom in dev mode and check if there is something interesting about rustc output (it will appear in popups)? I would really appreciate that.

And if you can't, an example of such crate would be really helpful.

@FredrikNoren
Copy link
Author

Looks like it starts building it from scratch as soon as I hit save, even though it's been previously built with cargo run.

screen shot 2016-09-14 at 11 21 53 am

@FredrikNoren
Copy link
Author

Is there a way to see what cargo command is run?

@FredrikNoren
Copy link
Author

Failed with this:

screen shot 2016-09-14 at 11 24 47 am

@FredrikNoren
Copy link
Author

Ok, so after restarting it and then saving again it compiled fine. But then when I run cargo run, it starts building from scratch again, so I'm guessing some kind of flag is being passed that make cargo feel like it hasn't been built in the same mode?

@White-Oak
Copy link
Member

@FredrikNoren If by saying cargo run you mean running cargo in terminal, then, yes, rebuilding the whole project is definitely something I've noticed. There is #77 for this, I'm gonna look into this later. But your error looks like there is "incorrect" JSON somewhere in a stream of errors from rustc or something like that. That would be really nice to find and understand why is this happening.

@FredrikNoren
Copy link
Author

@White-Oak Ok, I made some progress. I noticed that my atom install still looked old, even though it was the latest version, and got suspicious, so I cleaned it out completely and re-installed it. Now everything works fine. So guessing this was probably something that got weird with my local config. Thanks for the help though!

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

No branches or pull requests

3 participants