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

Report E2BIG spawn E2BIG #22

Closed
PetrPrazak opened this issue Nov 25, 2020 · 12 comments
Closed

Report E2BIG spawn E2BIG #22

PetrPrazak opened this issue Nov 25, 2020 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@PetrPrazak
Copy link

PetrPrazak commented Nov 25, 2020

Error: spawn E2BIG
	at ChildProcess.spawn (internal/child_process.js:394:11)
	at spawn (child_process.js:549:9)
	at Object.execFile (child_process.js:233:17)
	at Object.module.<computed> [as execFile] (electron/js2c/asar.js:163:31)
	at /Users/prazak/.vscode/extensions/vknabel.vscode-swiftlint-1.2.4/out/lint.js:154:38
	at new Promise (<anonymous>)
	at execSwiftlint (/Users/prazak/.vscode/extensions/vknabel.vscode-swiftlint-1.2.4/out/lint.js:153:12)
	at Object.<anonymous> (/Users/prazak/.vscode/extensions/vknabel.vscode-swiftlint-1.2.4/out/lint.js:59:38)
	at Generator.next (<anonymous>)
	at fulfilled (/Users/prazak/.vscode/extensions/vknabel.vscode-swiftlint-1.2.4/out/lint.js:5:58)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)
os: darwin

URL decoded contents by @vknabel

@vknabel
Copy link
Owner

vknabel commented Dec 5, 2020

@PetrPrazak Thanks for the report!

Do you have any special setup?
Is the project where this error occurred open source, so I can reproduce the issue under the same circumstances?
Can you provide the path (or the length of it) to your repo?
Do you have any extension specific config? What does your swiftlint config look like?
Does it only happen in specific files? If yes: which one?

If you wonder regarding the weird questions: This might be related to long file paths and large projects.

@vknabel vknabel added the bug Something isn't working label Dec 5, 2020
@vknabel vknabel self-assigned this Dec 5, 2020
@PetrPrazak
Copy link
Author

Hi,
The project is unfortunately private.
The path is not really long: /Users/prazak/dev/ring/ring-ios
The problem happens right after installing the extension.
the config file

@vknabel
Copy link
Owner

vknabel commented Dec 5, 2020

Thanks a lot @PetrPrazak.

Ist your project or file especially large?

@PetrPrazak
Copy link
Author

The project is quite large (depending how you define large).
The files are of reasonable length.

@vknabel
Copy link
Owner

vknabel commented Dec 5, 2020

I just released an update. Unsure if it already fixes your issue, but could you have try?

@PetrPrazak
Copy link
Author

Sure.
This time the error is different.

Error: Command failed: /usr/local/bin/swiftlint --quiet --reporter json --config /Users/prazak/dev/ring/ring-ios/.swiftlint.yml
Found a configuration for 'class_delegate_protocol' rule, but it is disabled on 'disabled_rules'.
No lintable files found at paths: ''

	at ChildProcess.exithandler (child_process.js:304:12)
	at ChildProcess.emit (events.js:223:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:223:5)
	at Pipe.<anonymous> (net.js:664:12)
os: darwin

@vknabel
Copy link
Owner

vknabel commented Dec 5, 2020

Thanks. What happens if you run the failing command yourself?

$ /usr/local/bin/swiftlint --quiet --reporter json --config /Users/prazak/dev/ring/ring-ios/.swiftlint.yml

@PetrPrazak
Copy link
Author

That command prints the warning about the disabled rules and then it runs the scan on the whole tree and after a while it dumps the json with the warnings.
But if I add a parameter --path then it checks just that file:

$ /usr/local/bin/swiftlint --quiet --reporter json --config /Users/prazak/dev/ring/ring-ios/.swiftlint.yml --path ring/Dummy.swift
Found a configuration for 'class_delegate_protocol' rule, but it is disabled on 'disabled_rules'.
[

]

Or

$ /usr/local/bin/swiftlint --quiet --reporter json --config /Users/prazak/dev/ring/ring-ios/.swiftlint.yml --path ring/Ring/Entities/MoreInfoEntity.swift
Found a configuration for 'class_delegate_protocol' rule, but it is disabled on 'disabled_rules'.
[
  {
    "character" : 4,
    "file" : "\/Users\/prazak\/dev\/ring\/ring-ios\/ring\/Ring\/Entities\/MoreInfoEntity.swift",
    "line" : 48,
    "reason" : "TODOs should be resolved (xxx...).",
    "rule_id" : "todo",
    "severity" : "Warning",
    "type" : "Todo"
  },
  {
    "character" : 4,
    "file" : "\/Users\/prazak\/dev\/ring\/ring-ios\/ring\/Ring\/Entities\/MoreInfoEntity.swift",
    "line" : 66,
    "reason" : "TODOs should be resolved (xxx...).",
    "rule_id" : "todo",
    "severity" : "Warning",
    "type" : "Todo"
  }
]

@vknabel
Copy link
Owner

vknabel commented Dec 10, 2020

Thanks for the details. They really help a lot.

If you wish, you can test wether the yet unreleased beta build 1.2.7-beta.0 works for you. Though it has not been tested enough to be released. So you'd have to install it manually.

@PetrPrazak
Copy link
Author

Seems to be working 👍
One thought, though: You shouldn't by default run the swiftlint process on the whole tree, just on the opened file. The full scan should be available on demand.
Or is it possible to set it this way now?

@vknabel
Copy link
Owner

vknabel commented Dec 11, 2020

Great to hear!

Thanks for your suggestion. I created a new issue for it #25

@vknabel vknabel added this to In progress in VS Code Extensions Dec 11, 2020
@vknabel vknabel moved this from In progress to Needs more Testing in VS Code Extensions Dec 12, 2020
@vknabel
Copy link
Owner

vknabel commented Dec 20, 2020

Good news: 1.2.7 is now officially released!

@vknabel vknabel closed this as completed Dec 20, 2020
VS Code Extensions automation moved this from Needs more Testing to Done Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants