Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

No outline available #90

Open
mcanepa opened this issue Dec 19, 2017 · 29 comments
Open

No outline available #90

mcanepa opened this issue Dec 19, 2017 · 29 comments

Comments

@mcanepa
Copy link

mcanepa commented Dec 19, 2017

I'm using atom 1.23.1 and have php-ide 0.7.4 installed

What is happening to me is that sometimes the outline doesn't work. I get this message:

No outline available. PHP files do not currently support outlines. Install and IDE package first.

But obviously the package is installed. Disabling it and re enabling it does not work. I have to uninstall, close atom, open atom and install again.

I think this usually happens when I update the atom-ide-ui package but I'm not sure.

@rsese
Copy link

rsese commented Dec 19, 2017

Hmmm so you have atom-ide-ui and ide-php installed but when you open the outline view Atom tells you that you need to install an IDE package? Are there any errors in devtools console 1?

And what operating system are you running?

@mcanepa
Copy link
Author

mcanepa commented Dec 19, 2017

As soon as I get the error again I'll post the console log

Right now this what is in the console:

<embedded>:122211 IntersectionObserver.observe(target): target element is not a descendant of root.
TreeView @ <embedded>:122211
<embedded>:119467
spell-check:en-us Can't load en_US: Cannot find dictionary for en_US.
nuclicons.ttf Failed to load resource: net::ERR_FILE_NOT_FOUND

I'm using windows 10

@mcanepa
Copy link
Author

mcanepa commented Dec 20, 2017

The same thing happened on a different computer running windows 7

I opened in dev mode and this is the log (almost the same as before)

atom

@rsese
Copy link

rsese commented Dec 20, 2017

Hmmm, do you happen to have anti-virus running on both computers? I remember someone mentioning in another issue that their anti-virus was interfering with some IDE functionality.

@mcanepa
Copy link
Author

mcanepa commented Dec 20, 2017

On W7 I have avira, and nothing on W10 besides the default security like windows defender

@damieng
Copy link
Contributor

damieng commented Dec 20, 2017

Can you turn on debugging with atom.config.set('core.debugLSP', true) and restart atom? You should get more detailed error messages in the dev tools window about what's going on.

@rsese
Copy link

rsese commented Dec 20, 2017

The same thing happened on a different computer running windows 7

So this was after a package update as well?

Can you also enable debugging by running this in devtools console and restarting Atom?

atom.config.set('core.debugLSP', true)

Then share the output of what you see when things stop working for you again.

@mcanepa
Copy link
Author

mcanepa commented Dec 21, 2017

does this help? It's the w7 machine...

atom2

@damieng
Copy link
Contributor

damieng commented Dec 21, 2017

Can you try opening a .php file and see what extra messages are emitted?

@mcanepa
Copy link
Author

mcanepa commented Dec 27, 2017

that log was with a file open. Even if I open another file the log does not generate new entries.

@damieng
Copy link
Contributor

damieng commented Dec 27, 2017

Do you have the default language-php enabled? Or have you installed a third-party php grammar syntax?

@mcanepa
Copy link
Author

mcanepa commented Dec 27, 2017

default.

The only packages that I've installed are:
atom-ide-ui
file-icons
ide-css
ide-php
ide-typescript
pinned-tabs

@damieng
Copy link
Contributor

damieng commented Dec 27, 2017

The ide-php package hooks into the 'language-php' grammar activation event and should immediately emit log messages with atom.config.set('core.debugLSP', true) enabled.

If it isn't then I'm at a loss to explain why.

@bvibber
Copy link

bvibber commented Jan 12, 2018

I'm encountering the same under Win10, Atom 1.23.3; atom-ide-ui enabled along with the default language-php package and ide-php, ide-typescript. No visible logging when setting atom.config.set('core.debugLSP', true). No errors other than the ones others are showing (IntersectionObserver warning and failure to load nuclicons.ttf).

Anything else I can do to help test/debug the plugin startup?

@bvibber
Copy link

bvibber commented Jan 12, 2018

Note that handlers for other file types like .js DO spew log stuff, so it's something in the initialization I guess causing it to never initialize in the first place?

@damieng
Copy link
Contributor

damieng commented Jan 12, 2018 via email

@damieng
Copy link
Contributor

damieng commented Jan 12, 2018

It should look something like this (we need to know what's in the blue box)
image

@bvibber
Copy link

bvibber commented Jan 12, 2018

ctrl-; while focused in a text editor does nothing for me -- there is no popup. Same in both PHP (no outline) and JS (has outline).

@bvibber
Copy link

bvibber commented Jan 12, 2018

Ok, if I ctrl+shift+P and search for "scope" and select "Editor: Log Cursor Scope" it pops up:

scopes o doom

@bvibber
Copy link

bvibber commented Jan 12, 2018

So I'm not sure if this is right, but I notice that my ~/.atom/packages/ide-php contains only a "vendor" subdir, with no package.json or node_modules etc:

PS C:\Users\brion\.atom\packages\ide-php> dir


    Directory: C:\Users\brion\.atom\packages\ide-php


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        12/5/2017   2:32 PM                vendor


PS C:\Users\brion\.atom\packages\ide-php> dir .\vendor\


    Directory: C:\Users\brion\.atom\packages\ide-php\vendor


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        12/5/2017   2:32 PM                bin
d-----        12/5/2017   2:32 PM                composer
d-----       11/28/2017   8:24 AM                felixfbecker
d-----       11/28/2017   8:24 AM                jetbrains
d-----       11/28/2017   8:24 AM                justinrainbow
d-----       11/28/2017   8:24 AM                microsoft
d-----       11/28/2017   8:24 AM                netresearch
d-----       11/28/2017   8:24 AM                phpdocumentor
d-----       11/28/2017   8:24 AM                psr
d-----       11/28/2017   8:24 AM                sabre
d-----       11/28/2017   8:24 AM                seld
d-----       11/28/2017   8:24 AM                symfony
d-----       11/28/2017   8:24 AM                webmozart
-a----       11/28/2017   8:24 AM            178 autoload.php

Could there have been a problem with the installation that caused missing files? Or is that expected?

@damieng
Copy link
Contributor

damieng commented Jan 12, 2018

How did you install ide-php?

It should be install via atom's settings > install package or using apm. I'm not sure how it would even appear in the atom packages list if the ide-php folder doesn't contain so much as a packages.json

@bvibber
Copy link

bvibber commented Jan 12, 2018

Via Atom's "install package" UI. After uninstalling and reinstalling it through the UI, suddenly it's working and the files are no longer missing. Yay! :)

Not sure how that broken install or update happened...

@bvibber
Copy link

bvibber commented Jan 12, 2018

Oh interesting. If I run apm deinstall php-ide while Atom is open with a PHP file, it produces the exact situation I saw -- empty ~/.atom/packages/ide-php except for the 'vendor' directory. I suspect this is because Windows won't let you delete files that are in use and the PHP language server is still running, whereas Linux and Mac will happily let you delete things like that.

Could an upgrade while Atom was running have done the same?

PS C:\Users\brion\.atom\packages> apm deinstall ide-php
Uninstalling ide-php failed
Failed to delete ide-php: ENOTEMPTY: directory not empty, rmdir 'C:\Users\brion\.atom\packages\ide-php'

@bvibber
Copy link

bvibber commented Jan 12, 2018

So I tried a few variations just in case there was a super-easy fix with changing working directory:

  • don't set cwd on process launch at all
  • manually chdir() in/away before/after loader setup

Doesn't seem to help, there's still files held open as long as the server's running.

Is there any way to get a notification to the running management JS when either Atom UI or apm CLI is about to update or deinstall a plugin? I can't find any obvious way from googling around, and I suspect it's not supported.

Would it make sense to install the downloaded PHP server outside the package directory, maybe elsewhere under ~/.atom... then the JS code inside Atom could detect when it's necessary to update the vendor bits at runtime, before the server starts on a new run? This would allow Atom's UI or apm CLI to completely wipe/replace the package itself without running into any locked files.

@mcanepa
Copy link
Author

mcanepa commented Jan 25, 2018

This just happened: right now the package was working fine, showing the outline for a php file opened via tree view from an opened project.

But I opened a php file from another project by dragging it from file explorer and dropping it in atom, then the outline fails with this message:

No outline available. This is likely an error with the language package.

No log output.

@rsese
Copy link

rsese commented Jan 25, 2018

But I opened a php file from another project by dragging it from file explorer and dropping it in atom, then the outline fails with this message:

Though I can reproduce this behavior I believe it's expected as explained by Damien here:

atom/atom-languageclient#170 (comment)

Since the file you dragged isn't part of the open project, no language server is started for that file.

If you add the second project as a project folder however, then it should start working.

@jameibumblebee
Copy link

Ok. So I have this same issues, but not just outlines for ide-php but all the ide-* packages. I am pulling my hair out as removing, reinstalling, deleting cache folders, updating to the new Atom beta etc. has no effect. I am on Ubuntu 17.10 x86-64.
screenshot from 2018-03-20 15-33-23

@mcanepa
Copy link
Author

mcanepa commented Mar 20, 2018

If I have a working outline and I update the package, then the outline fail.

I have to uninstall and re-install in order to get the outline working again.

EDIT: I meant uninstall and re-install the package

@jameibumblebee
Copy link

jameibumblebee commented Mar 20, 2018

@mcanepa I will give it a try uninstalling/purging then reinstalling and see if it works, thanks.

EDIT: That worked. Reinstalled Atom then atom-ide-ui then the ide addins.

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

No branches or pull requests

6 participants