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

Avoid adding non-existent project directories #12694

Merged

Conversation

maxbrunsfeld
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld commented Sep 14, 2016

Closes #10297
Depends on atom/service-hub#9

/cc @peterhal @nmote @mostafaeweda

This implements the plan we described in #10297 (comment). This means that Nuclide's atom.directory-provider service hook will be called earlier in Atom's startup process, before project deserialization and notably before Nuclide's activate method is called. It also means that custom Directory instances for which .existsSync() returns false will not be added to the project, so you may need to handle the state where the user has not yet authenticated specially in that method.

Also note that the atom.directory-provider service must be specified in Nuclide's top-level package.json (rather than being registered dynamically) in order to be recognized.

Sorry for requiring you to make these changes, but we really need to fix #10297, which was introduced by changes that we made together in order to accommodate Nuclide in the first place, so it doesn't seem too unreasonable.

@maxbrunsfeld maxbrunsfeld force-pushed the mb-ns-avoid-adding-non-existent-project-directories branch from c5d0c17 to e444076 Compare September 16, 2016 00:37
@nathansobo nathansobo force-pushed the mb-ns-avoid-adding-non-existent-project-directories branch from 212cb0d to 7c7460e Compare September 16, 2016 21:00
@nathansobo nathansobo force-pushed the mb-ns-avoid-adding-non-existent-project-directories branch from 7c7460e to 7bba3e8 Compare September 16, 2016 22:47
@nathansobo
Copy link
Contributor

Still having a rough time on Travis. I tried changing reload to wait for the entire Application to load and got it to pass once with a focused test. But now it seems to be failing again. We'll have to pick it back up next week.

@maxbrunsfeld
Copy link
Contributor Author

OK, finally all 🍏. Gonna re-run the travis and appveyor builds one time extra, just to be sure.

@maxbrunsfeld maxbrunsfeld merged commit 1ad6a0f into master Sep 21, 2016
@maxbrunsfeld maxbrunsfeld deleted the mb-ns-avoid-adding-non-existent-project-directories branch September 21, 2016 20:24
@nathansobo
Copy link
Contributor

✨✨✨

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.

Opening files that use atom:// URIs create fake folders
2 participants