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

Rewrite in JS #41

Merged
merged 15 commits into from
Apr 2, 2017
Merged

Rewrite in JS #41

merged 15 commits into from
Apr 2, 2017

Conversation

steelbrain
Copy link

As discussed, contains a rewritten package with Linter v2 support general bugfixes and Flow/ESLint with Circle CI configuration

@TeroFrondelius
Copy link
Collaborator

Some problem with the package activation:

[Package-Deps] Unable to install linter:2.0.0 , Error: Request for package information failed: Not Found
TypeError: _atomLinter.CompositeDisposable is not a constructor
    at Object.activate (/home/tero/.atom/packages/linter-julia/lib/index.js:19:19)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:191:19)
    at /usr/share/atom/resources/app.asar/src/package.js:164:32
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:94:15)
    at /usr/share/atom/resources/app.asar/src/package.js:157:26
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:154:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:550:34)
    at /usr/share/atom/resources/app.asar/src/package-manager.js:531:29
    at Config.module.exports.Config.transactAsync (/usr/share/atom/resources/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/usr/share/atom/resources/app.asar/src/package-manager.js:526:19)
    at PackageManager.module.exports.PackageManager.activate (/usr/share/atom/resources/app.asar/src/package-manager.js:508:46)
    at /usr/share/atom/resources/app.asar/src/atom-environment.js:831:28
jquery.js:3256 Uncaught (in promise) Object {readyState: 4, responseText: "Error: Please enter a valid URL to shorten", status: 400, statusText: "error"}

@steelbrain
Copy link
Author

Taken care of, can you please try again?

@TeroFrondelius
Copy link
Collaborator

Sorry, I was busy earlier. Still the error with installation remains:

/home/tero/.atom/packages/linter-julia/node_modules/atom-package-deps/lib/view.js:69 [Package-Deps] Unable to install linter:2.0.0 , Error: Request for package information failed: Not Foundcomplete @ /home/tero/.atom/packages/linter-julia/node_modules/atom-package-deps/lib/view.js:69

@steelbrain
Copy link
Author

That is purely a network or ISP interception issue. Can you try manually installing the Linter v2? That error should not affect the end users of this package in any way

@TeroFrondelius
Copy link
Collaborator

I ran: Press Ctrl - Shift - P: Update Package Dependencies: Update and after the restart the installer start installing dependencies. Now I'm debugging why the lintserver doesn't want start.

lib/server.js Outdated
export async function getPipePath(): Promise<{ subscription: CompositeDisposable, path: string }> {
const subscription = new CompositeDisposable()
let path = await new Promise(function(resolve, reject) {
tmp.file(function(error, tempPath, fd, cleanupCallback) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess tmp.file creates a temporary file. Unfortunately this won't work, because the lintserver() wants to create the file and cannot, if the file already exists:

julia> a = "/tmp/tmp-17077g9zhwjrfaehc.tmp"
"/tmp/tmp-17077g9zhwjrfaehc.tmp"

shell> ls $a
ls: cannot access /tmp/tmp-17077g9zhwjrfaehc.tmp: No such file or directory

shell> touch $a

shell> ls $a
/tmp/tmp-17077g9zhwjrfaehc.tmp

julia> lintserver(a,"standard-linter-v2")
ERROR: ArgumentError: could not listen on path /tmp/tmp-17077g9zhwjrfaehc.tmp
 in listen(::String) at ./stream.jl:944
 in lintserver(::String, ::String) at /home/tero/.julia/v0.5/Lint/src/Lint.jl:468

shell> rm $a

julia> lintserver(a,"standard-linter-v2")
Server running on port/pipe /tmp/tmp-17077g9zhwjrfaehc.tmp ...
^CServer closed

shell> ls $a
ls: cannot access /tmp/tmp-17077g9zhwjrfaehc.tmp: No such file or directory

It looks that if lintserver closes properly it will clean the temporary file as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged, didn't know that. Working on a fix

@steelbrain steelbrain changed the title [WIP] Rewrite in JS Rewrite in JS Apr 2, 2017
@TeroFrondelius TeroFrondelius merged commit 4c92de0 into AtomLinter:master Apr 2, 2017
@TeroFrondelius
Copy link
Collaborator

Really nice work.

@steelbrain steelbrain deleted the steelbrain/rewrite-in-js branch April 3, 2017 03:04
Arcanemagus added a commit that referenced this pull request Feb 19, 2019
This was switched in #41, but no reasoning was given. Since it appears 
the server handles this we should re-enable it.

Fixes #48.
Arcanemagus added a commit that referenced this pull request Feb 19, 2019
This was switched in #41, but no reasoning was given. Since it appears 
the server handles this we should re-enable it.

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

Successfully merging this pull request may close these issues.

2 participants