settings-view
settings-view copied to clipboard
Unfamiliar directories loaded as packages in /dev/packages
Prerequisites
- [x] Put an X between the brackets on this line if you have done all of the following
- ~~Reproduced the problem in Safe Mode~~
N/A: Bug specific to dev-mode - Followed all applicable steps in the debugging guide
- Checked the FAQs on the message board for common solutions
- Checked that your issue isn't already filed
- ~~Checked that there is not already an Atom package that provides the described functionality~~
N/A: Not an enhancement/feature
- ~~Reproduced the problem in Safe Mode~~
Description
Subdirectories within ~/.atom/dev/packages
are being interpreted as packages, even when required files like package.json
are missing:
![Figure 1](https://cloud.githubusercontent.com/assets/2346707/24707081/9d829998-1a55-11e7-9853-984b8d9ba037.png)
![Figure 2](https://cloud.githubusercontent.com/assets/2346707/24707125/c9c4f0aa-1a55-11e7-8c72-1473b248f539.png)
Contents of ~/.atom/dev/packages/u/
are only symlinked project folders:
TMCG -> ~/Labs/TMCG
archive-view -> ~/Forks/Atom/ArchiveView
find-and-replace -> ~/Forks/Atom/FindAndReplace
fuzzy-finder -> ~/Forks/Atom/FuzzyFinder
grammar-selector -> ~/Forks/Atom/GrammarSelector
language-coffee-script -> ~/Forks/Atom/CSON
language-css -> ~/Forks/Atom/CSS
language-javascript -> ~/Forks/Atom/JS
language-less -> ~/Forks/Atom/Less
language-make -> ~/Forks/Atom/Make
language-xml -> ~/Forks/Atom/XML
tabs -> ~/Forks/Atom/Tabs
tree-view -> ~/Forks/Atom/TreeView
Steps to Reproduce
- Create a folder inside your
~/.atom/dev/
directory - Name it anything except
packages
. - Start Atom in dev-mode
- Open
settings-view
, and click the Packages tab - Scroll to the bottom of the list
Expected behaviour:
I shouldn't see undefined
anywhere in the packages list. Not until somebody publishes something sick with that name, at least.
Actual behaviour:
I have undefined
chilling at the bottom of the installed packages list.
Reproduces how often:
100% more often than I'd like.
Versions
settings-view
: 0.247.0, bundled copy (e.g., it's not been dev-linked)
atom --version
output:
- Atom: 1.15.0
- Electron: 1.3.13
- Chrome: 52.0.2743.82
- Node: 6.5.0
apm --version
output:
- apm: 1.15.3
- npm: 3.10.5
- Node: 4.4.5 x64
- Python: 2.7.13
- Git: 2.12.2
Additional Information / Background
I know how weird those screenshots look, so I'd better supply some background on why there's a folder named u
in my ~/.atom/dev/packages
directory...
I wrote a shell-script which bundles numerous Atom-specific tasks I run from command-line. The task in question "toggles" all dev-linked packages by simply renaming ~/.atom/dev/packages
to ~/.atom/dev/u
instead.
I was investigating file-icons/atom#580
and disabled my dev-linked forks so I could reproduce the reported error. Note my copy of tree-view
is using atom/tree-view#1009
, so any bugs related to code-tampering are missed while I'm working... hence why I frequently need to unlink/relink 5 packages at once.
I also noticed while writing this that reactivating a package moves unfamiliar folders back inside ~/.atom/dev/packages/
directory. Which is to say, ~/.atom/dev/packages/u
should be located at ~/.atom/dev/u
instead. Don't think that should be happening, either...
EDIT: I also noticed that Atom's load-time sank to HELL when it was trying to load u
as a package. I'm guessing it was going through each subdirectory and loading each contained file as a package resource. Nothing else was coming up in Timecop, so the lag was puzzling until now.