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

spawn E2BIG when linting #38

Closed
drakecaiman opened this issue Nov 19, 2015 · 5 comments
Closed

spawn E2BIG when linting #38

drakecaiman opened this issue Nov 19, 2015 · 5 comments

Comments

@drakecaiman
Copy link

I am getting spawn E2BIG errors when saving .java files in Atom.

It might have something to do with the number of files in the project folder, as open a window including only a single folder from the project does not produce the error.

Steps

  • Make changes to an open .java file
  • Save file

Expected:

Atom updates linter display without error

Actual:

No linting, following error displayed:

screen shot 2015-11-19 at 1 55 28 pm

#### Setup:

Atom 1.2.3
Mac OS X 10.11.1

@steelbrain
Copy link
Contributor

If I had to guess, you have specified an invalid executable path in the configuration

@drakecaiman
Copy link
Author

The package settings (javaExecutablePath)? Without changing the path setting (on default), it seems to work fine with a smaller Tree View (seven folders deep, 200 files), but not when the tree view's root is one directory up (~5,000 files).

@noseglid
Copy link
Contributor

I've seen the same issue. E2BIG is a unix error where the executed command is too long. That includes the classpath set from the .classpath file, all the java files found by traversing the tree and adding them.

I managed to get it to work by reducing my classpath to an acceptable length, but that's just gonna work for so long. A change in the linter plugin is needed where stuff to javac is passed in a different way.

@florianb
Copy link
Contributor

This problem may likely be avoided, by moving the classpath-argument to the option-parameter (options.env.CLASSPATH) of the executing command.

@florianb
Copy link
Contributor

In favor of #58 i'm closing this issue for now. :godmode:

noseglid added a commit to noseglid/linter-javac that referenced this issue May 27, 2016
There are multiple problems with the previous approach of
scanning the current project and including each and every
file to linter javac.

  * It takes a long time since every source java file in
    the current project is recompiled with every save.
  * The command line may become "too long" (see AtomLinter#38)
  * It consumes a lot of computer resources (CPU, memory etc)

These problems increase with the number of source files.

Using sourcepath will let javac find the required sourcefiles
by itself, greatly reducing the number of source files it needs
to recompile. This is one of the things we need to make in order
to resolve AtomLinter#98.

It is still not optimal. Javac does not include any caching of the
files it compiles, so saving the same file twice (without editing it)
will recompile it twice as well as any java file referenced by it.

In this commit I also:
  * Added ordering to the config variables (I really wanted
    the sourcepath option to be next to the classpath option).
  * Moved all `if (@verboseLogging)` to the `@_log` method
  * Some spacing and cleanup
florianb pushed a commit that referenced this issue Jun 8, 2016
There are multiple problems with the previous approach of
scanning the current project and including each and every
file to linter javac.

  * It takes a long time since every source java file in
    the current project is recompiled with every save.
  * The command line may become "too long" (see #38)
  * It consumes a lot of computer resources (CPU, memory etc)

These problems increase with the number of source files.

Using sourcepath will let javac find the required sourcefiles
by itself, greatly reducing the number of source files it needs
to recompile. This is one of the things we need to make in order
to resolve #98.

It is still not optimal. Javac does not include any caching of the
files it compiles, so saving the same file twice (without editing it)
will recompile it twice as well as any java file referenced by it.

In this commit I also:
  * Added ordering to the config variables (I really wanted
    the sourcepath option to be next to the classpath option).
  * Moved all `if (@verboseLogging)` to the `@_log` method
  * Some spacing and cleanup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants