ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
360 stars 86 forks source link

Fix "not under rootDir" issue in webpack #1352

Closed TamiTakamiya closed 3 months ago

TamiTakamiya commented 3 months ago

After #1346 is merged, we started seeing errors like folowing during yarn webpack:

ERROR in /Users/runner/work/vscode-ansible/vscode-ansible/packages/ansible-language-server/tsconfig.json
  /Users/runner/work/vscode-ansible/vscode-ansible/packages/ansible-language-server/tsconfig.json
  [tsl] ERROR
        TS6059: File '/Users/runner/work/vscode-ansible/vscode-ansible/src/features/utils/syntaxHighlighter.ts' is not under 'rootDir' '/Users/runner/work/vscode-ansible/vscode-ansible/packages/ansible-language-server'. 'rootDir' is expected to contain all source files.
    The file is in the program because:
      Root file specified for compilation

The error message suggests the tsconfig.json for ALS is used for compiling non-ALS file. This PR is for specifying a correct tsconfig.json file for each source file by looking at file path.

(added) In addition to the change in webpack.config.ts, one UI test case was updated to increase a wait time for page transition in order to resolve an issue on Linux.