Skip to content
This repository was archived by the owner on Jun 13, 2022. It is now read-only.

Show for particular package not working #158

Closed
binaryfunt opened this issue Aug 5, 2019 · 6 comments · Fixed by #159
Closed

Show for particular package not working #158

binaryfunt opened this issue Aug 5, 2019 · 6 comments · Fixed by #159
Labels

Comments

@binaryfunt
Copy link

binaryfunt commented Aug 5, 2019

For some reason, when I have

show: {
  package: "quick-fold"
}

in toolbar.cson, the button doesn't show, even though I have quick-fold installed. This is a package I recently created and published - the development version is only linked in dev mode and I installed the release version the usual way after publishing (and it's not disabled). If I change "quick-fold" it to another, older package I maintain and have a dev version of, the button re-appears.

I don't get any errors/warnings in the console.

@UziTech
Copy link
Collaborator

UziTech commented Aug 5, 2019

try typing atom.packages.isPackageActive("quick-fold") into the console and see what it returns.

@UziTech
Copy link
Collaborator

UziTech commented Aug 5, 2019

It could be that the package is installed but not active. (i.e. no activation command was dispatched)

@UziTech
Copy link
Collaborator

UziTech commented Aug 5, 2019

maybe we should change it to check if the package is loaded instead of active?

@binaryfunt
Copy link
Author

binaryfunt commented Aug 5, 2019

try typing atom.packages.isPackageActive("quick-fold") into the console and see what it returns.

Indeed, returns false. It seems my package doesn't activate until I run the (only) command it has. Is this a problem, generally speaking? It doesn't really affect the behaviour of my package other than there's a bit of latency when I first run the command.

maybe we should change it to check if the package is loaded instead of active?

atom.packages.isPackageLoaded("quick-fold") does return true even before the package is activated.

@UziTech
Copy link
Collaborator

UziTech commented Aug 5, 2019

Is this a problem

No, packages like quick-fold that have a command that needs to run should defer activating until the command is called so they don't affect startup time.

It seems like the "package" condition should return true if it is loaded not just active but I don't know if changing it now would break someones expectation.

@UziTech
Copy link
Collaborator

UziTech commented Aug 5, 2019

🎉 This issue has been resolved in version 2.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants