Skip to content

refactor(@angular/cli): update Intellij/Webstorm settings #16214

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

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

ahasall
Copy link
Contributor

@ahasall ahasall commented Nov 18, 2019

Intellij and Webstorm unfortunately don't the use the exact same
configuration system. For example, Intellij treats every project as
JAVA_MODULE but Webstorm doesn't recognize the JAVA_MODULE.
Therefore, I think that the modules.xml and iml should be left
out from version control.

refs #16152

@ahasall
Copy link
Contributor Author

ahasall commented Nov 18, 2019

The following files should also be discussed:

  • .idea/compiler.xml
  • .idea/encodings.xml
  • .idea/inspectionProfiles

cc @dgp1130

@ahasall ahasall force-pushed the webstorm-setup branch 2 times, most recently from 58907dd to 899b34d Compare November 18, 2019 12:16
@ahasall ahasall changed the title refactor(@angular/cli): update Intellij/Webstorm setting refactor(@angular/cli): update Intellij/Webstorm settings Nov 18, 2019
@dgp1130
Copy link
Collaborator

dgp1130 commented Nov 18, 2019

Thanks for bringing up your experience with WebStorm. I wasn't aware projects were structured differently between the two platforms.

I tried checking out your commit and opening it in IntelliJ Ultimate, however, it doesn't load the project, likely because the *.iml file is missing. It seems that JetBrains' recommendation is to include *.iml files, so I would assume WebStorm would work with that. What actually is the behavior in WebStorm when the *.iml file is present?

Regarding the extra files you mentioned:

  • ./idea/compiler.xml - This only seems to affect Java projects as far as I can tell. Does this have any effect for Node projects? If not, I'm inclined to just .gitignore it.
  • ./idea/encodings.xml - I think this just specifies encodings for particular files. I don't think there are any files in the repo which require special encoding that IntelliJ couldn't figure out on its own. I figure we can either .gitignore it, or include one which just default to UTF-8.
  • ./idea/inspectionProfiles/ - I don't think we have a highly specified style guide for this repo, so I don't think we can really make intelligent decisions on which inspections to enable/disable. There might be some inspections which obviously don't work and could be turned off here, but otherwise I think I'd rather leave this up to the user to configure at their leisure. I believe IntelliJ already supports custom profiles here external to the project, so I don't think we need to do much here.

@ahasall
Copy link
Contributor Author

ahasall commented Nov 19, 2019

I was having the following warning every time I open the project:

Unknown Module Type
Cannot determine module type ("JAVA_MODULE") for the following module:"angular-cli"
The module will be treated as a Unknown module.

WebStorm doesn't know the module type JAVA_MODULE. It uses the module type WEB_MODULE which seems to work well with Intellij.

I updated the PR, could you please try again?

@dgp1130
Copy link
Collaborator

dgp1130 commented Nov 19, 2019

Tried again, and this configuration seems to work for IntelliJ Ultimate. Agreed that Web Module is more appropriate than Java Module.

LGTM, pending update to your commit message as we're no longer removing the *.iml file.

@dgp1130 dgp1130 self-requested a review November 19, 2019 20:12
Intellij and Webstorm unfortunately don't the use the exact same
configuration system. For example, Intellij treats every project as
`JAVA_MODULE` but Webstorm doesn't recognize the `JAVA_MODULE`.
Let's use `WEB_MODULE` as it's recognized by both IDEs.

refs angular#16152
@ahasall
Copy link
Contributor Author

ahasall commented Nov 19, 2019

Yes! Just amended the commit message

@dgp1130 dgp1130 added the target: major This PR is targeted for the next major release label Nov 19, 2019
@dgp1130 dgp1130 merged commit 5185c66 into angular:master Nov 19, 2019
@dgp1130
Copy link
Collaborator

dgp1130 commented Nov 19, 2019

Thanks for catching this problem and sending the fix!

@ahasall
Copy link
Contributor Author

ahasall commented Nov 19, 2019

It's my pleasure!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants