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

Add callbacks to fs.unlink(). fixes #525. #530

Closed
wants to merge 2 commits into from

Conversation

VincentGuinaudeau
Copy link

Following the hints provided by @christiaanwesterbeek here, I succesfully implemented a fix for issue #525.

I tried to do it right, and didn't choose the lazy way of just switching to a unlinkSync.

Copy link

@christiaanwesterbeek christiaanwesterbeek left a comment

Choose a reason for hiding this comment

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

Looking good. Seems like the right way to solve it.

@christiaanwesterbeek
Copy link

Is the CI report that says that all checks have failed the reason that this can't get merged?

The merge is very welcome since I can't get the tagged template literal grammar extensions to work on new macs. The unhighlighted sql in template literals is slowing down development.

@VincentGuinaudeau
Copy link
Author

Looking through the report, it looks like the build failed because of something unrelated. I'm gonna try to relaunch the pipeline.

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Jan 15, 2020

Ok, found the culprit. This package used the atom config API in a undocumented way.

It may have worked for a long time, but recent changes in atom probably broke it.

Also @christiaanwesterbeek , There hasn't been any activity on the repository for more than 6 month, so I won't expect this PR to be merge right away even if the CI pipeline gives the greenlight. You may want to consider using my branch directly, or patching the package locally.

@christiaanwesterbeek
Copy link

Thanks! I removed the normal language-babel package and I installed directly from your repo. I hadn't done that before, but it worked. Got sql highlighting again in my template literals. I owe you one!

@Axedyson
Copy link

and I installed directly from your repo.

How did you do that?
I would also like to install it as a package from the github repository

@christiaanwesterbeek
Copy link

christiaanwesterbeek commented Feb 14, 2020

@AndysonDK

First, you uninstall the package language-babel you already have installed.
Second, you go to Atom -> Settings -> Install -> Paste https://github.com/VincentGuinaudeau/language-babel into the search bar where you normally type a package by its name -> Install -> Done.

@Axedyson
Copy link

Axedyson commented Feb 14, 2020

@christiaanwesterbeek

Thanks! But when I pressed the install button this error occurred:

Anmærkning 2020-02-14 090851

Maybe it can't find the package for some reason?

I'm on windows 10 and
I have the latest Atom version installed (1.44.0)

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Feb 14, 2020

@AndysonDK

You could try to use the apm command instead (Atom Package Manager).

Download / Clone my fork somewhere on your computer, then from the command line do a apm link inside the project :

git clone https://github.com/VincentGuinaudeau/language-babel
cd language-babel
apm link

This will create a shortcut in atom's packages folder to the folder you are in.

To check what atom is seeing, you can do a apm links :

$ apm links
/home/user/.atom/dev/packages (0)
└── (no links)
/home/user/.atom/packages (1)
└── language-babel -> /home/user/Repositories/language-babel

If this doesn't work, you can always do it the dirty way and drop the language-babel folder directly into atom's package folder.

In any case, don't forget to reload atom after any modification.

@Axedyson
Copy link

@VincentGuinaudeau

Thanks, using the apm link command worked, but now I'm receiving the following errors:

Anmærkning 2020-02-14 163353

Here is the full stack trace:

Error: Cannot find module 'fuzzaldrin'
at Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
at Module._resolveFilename (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\electron.asar\common\reset-search-paths.js:43:12)
at Function.get_Module._resolveFilename (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:155413)
at Module.require (file:///C:/Users/Anders/AppData/Local/atom/app-1.44.0/resources/app.asar/static/index.js:61:43)
at require (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:146745)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/auto-complete-jsx.coffee:2:19)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/auto-complete-jsx.coffee:1:1)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/auto-complete-jsx.coffee:1:1)
at Module.get_Module._compile (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:147429)
at Object.value [as .coffee] (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:150977)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (file:///C:/Users/Anders/AppData/Local/atom/app-1.44.0/resources/app.asar/static/index.js:72:46)
at require (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:146745)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/main.coffee:2:19)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/main.coffee:1:1)
at Object. (file:///C:/Users/Anders/Desktop/language-babel-master/lib/main.coffee:1:1)
at Module.get_Module._compile (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:147429)
at Object.value [as .coffee] (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:150977)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (file:///C:/Users/Anders/AppData/Local/atom/app-1.44.0/resources/app.asar/static/index.js:72:46)
at require (internal/modules/cjs/helpers.js:20:18)
at customRequire (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:1:734076)
at Package.requireMainModule (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3331586)
at Package.activateNow (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3319570)
at measure (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3319348)
at Package.measure (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3316958)
at activationPromise.activationPromise.Promise (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3319208)
at new Promise ()
at Package.activate (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:3319151)
at PackageManager.activatePackage (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:382452)
at config.transactAsync (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:382068)
at Config.transactAsync (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:331716)
at PackageManager.activatePackages (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:382018)
at PackageManager.activate (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:11:381568)
at t.loadState.then (C:\Users\Anders\AppData\Local\atom\app-1.44.0\resources\app\static<embedded>:1:756241)

The main issue is that I just want to highlight the CSS inside the template literal between the style jsx tags (<style jsx>{` ... `}</style>):

Anmærkning 2020-02-14 164843

@VincentGuinaudeau
Copy link
Author

@AndysonDK a npm install should do the trick.

@Axedyson
Copy link

@VincentGuinaudeau

THANKS!

Had to install a few missing packages but in the end, it worked finally :D

@VincentGuinaudeau
Copy link
Author

Cleaning up my PR backolg, I'm closing this one since the repo is basically dead.

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

Successfully merging this pull request may close these issues.

3 participants