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

files.associations is breaking PHP features and probably affecting other languages too #7791

Closed
joazvsoares opened this issue May 11, 2020 · 8 comments · Fixed by #7805
Closed
Assignees
Labels
bug bugs found in the application php issues related to the php language

Comments

@joazvsoares
Copy link

joazvsoares commented May 11, 2020

Bug Description:

During my tests I have found that when I add file.associations to the settings.json file, the PHP language features are gone and the syntax highlighting stops working, the association with other extensions (.inc) to the PHP language doesn't work too.

Steps to Reproduce:

  1. test using one of the following approaches:
    • theia-php:latest:
      • docker pull theiaide/theia-php
      • docker run -it --init -p 3000:3000 theiaide/theia-php
    • use this repo and include the following extensions:
"vscode-builtin-php": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/php-1.39.1-prel.vsix",
"vscode-builtin-php-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/php-language-features-1.39.1-prel.vsix",
"vscode-php-intellisense": "https://github.com/felixfbecker/vscode-php-intellisense/releases/download/v2.3.5/php-intellisense.vsix",
"vscode-php-debug": "https://github.com/felixfbecker/vscode-php-debug/releases/download/v1.13.0/php-debug.vsix"
  1. open a php project or file (notice that syntax-highlighting works correctly)
  2. add the following file.associations preference (save):
{
  "files.associations": {
    "*.php": "php",
    "*.gitignore": "php"
  }
}
  1. reload the application and re-open the php file, the syntax-highlighting stops working

Additional Information

Working without file.associations:
image

Not working with file.associations:
image

@vince-fugnitto
Copy link
Member

vince-fugnitto commented May 11, 2020

I attempted to reproduce the problem in this repo by including the extensions
(taken from theia-php):

"vscode-builtin-php": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/php-1.39.1-prel.vsix",
"vscode-builtin-php-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/php-language-features-1.39.1-prel.vsix",
"vscode-php-intellisense": "https://github.com/felixfbecker/vscode-php-intellisense/releases/download/v2.3.5/php-intellisense.vsix",
"vscode-php-debug": "https://github.com/felixfbecker/vscode-php-debug/releases/download/v1.13.0/php-debug.vsix"

I was unable to reproduce the problem, and adding associations to php also worked correctly:

{
  "files.associations": {
    "*.php": "php",
    "*.gitignore": "php"
  }
}

I'll need to verify if the behavior in the image is also consistent.

Screen Shot 2020-05-11 at 12 31 18 PM

@vince-fugnitto vince-fugnitto added 🤔 needs more info issues that require more info from the author php issues related to the php language labels May 11, 2020
@vince-fugnitto
Copy link
Member

@joazvsoares I am unable to reproduce the issue on the docker image theia-php as well.

@joazvsoares
Copy link
Author

joazvsoares commented May 11, 2020

@vince-fugnitto it only stops working for me after I change the preferences and reload the page, could you try that?

@vince-fugnitto
Copy link
Member

vince-fugnitto commented May 11, 2020

@vince-fugnitto it only stops working for me after I changed the preferences and reloaded the page, could you try that?

I see the issue now (after reloading), I'll update the issue to be a bit clearer :)

@joazvsoares
Copy link
Author

Sorry, I should have mentioned that step in the description! Thank you!

@vince-fugnitto vince-fugnitto added bug bugs found in the application and removed 🤔 needs more info issues that require more info from the author labels May 11, 2020
@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label May 12, 2020
@joazvsoares
Copy link
Author

Hi @akosyakov @vince-fugnitto
I can try to help on this one if I get some hints on what could be causing the issue, is there any guess?

@akosyakov
Copy link
Member

trying to investigate...

@vince-fugnitto btw why we don't have vscode-builtin-php by default in our example applications, we should have as much as possible, do you know whether we excluded something else?

@akosyakov
Copy link
Member

I think it is caused by #5017, i.e. on reload:

I will send a PR. It is a bit tricky since we have to trigger internal Monaco event.

akosyakov added a commit that referenced this issue May 13, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov removed the help wanted issues meant to be picked up, require help label May 13, 2020
@akosyakov akosyakov self-assigned this May 13, 2020
akosyakov added a commit that referenced this issue May 14, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
RomanNikitenko pushed a commit that referenced this issue May 14, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application php issues related to the php language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants