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

Intellisense stuck on loading after trying to index absolute import #39326

Closed
Bluefitdev opened this issue Jun 22, 2020 · 19 comments · Fixed by #42428
Closed

Intellisense stuck on loading after trying to index absolute import #39326

Bluefitdev opened this issue Jun 22, 2020 · 19 comments · Fixed by #42428
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Needs More Info The issue still hasn't been fully clarified Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@Bluefitdev
Copy link

  • VSCode Version:
Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z (5 days ago)
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0
  • OS Version: OSX 10.15.5 (19F101)

Steps to Reproduce:

  1. My js config:
{
    "compilerOptions": {
        "baseUrl": "./src"
    },
    "include": [
        "src"
    ]
}

Bootstrapped with Create react app. Try to import {} from "app/..." goes loading. Afterwards intellisense won't work for 1-2 minutes until it starts working again in the code.

Screen Shot 2020-06-23 at 9 51 14 am

Does this issue occur when all extensions are disabled?: Yes

Same thing goes on, if i try to index some files from the import. intellisense stays on loading on the code for 1-2 mins. Its pretty annoying when I need to code fast so sometimes when it loads i moved back to vim :(

Can anyone help please?

Screen Shot 2020-06-23 at 9 55 34 am

Screen Shot 2020-06-23 at 9 55 48 am

@mjbvz
Copy link
Contributor

mjbvz commented Jun 23, 2020

Can you share the project that causes this?

@Bluefitdev
Copy link
Author

Sorry its a private repo from my company...

But here's the dependencies if that helps, bootstrapped with CRA

{
    "name": "fuse-react-app",
    "version": "4.1.5",
    "private": true,
    "homepage": "https://dev.slt3.com.au",
    "dependencies": {
        "@date-io/core": "1.3.9",
        "@date-io/date-fns": "1.3.13",
        "@date-io/moment": "1.3.11",
        "@formatjs/intl-pluralrules": "^1.3.5",
        "@material-ui/core": "4.9.10",
        "@material-ui/icons": "4.9.1",
        "@material-ui/lab": "4.0.0-alpha.49",
        "@material-ui/pickers": "3.2.10",
        "antd": "^4.3.4",
        "auth0-lock": "11.23.0",
        "autosuggest-highlight": "3.1.1",
        "axios": "0.19.2",
        "axios-mock-adapter": "1.18.1",
        "chart.js": "2.9.3",
        "clsx": "1.1.0",
        "cross-fetch": "3.0.4",
        "date-fns": "2.11.1",
        "dayjs": "^1.8.28",
        "firebase": "7.14.0",
        "formik": "^2.1.4",
        "formsy-react": "2.0.2",
        "google-map-react": "1.1.7",
        "history": "4.10.1",
        "i18next": "19.4.2",
        "isomorphic-fetch": "2.2.1",
        "jsonwebtoken": "8.5.1",
        "jss": "10.1.1",
        "jss-plugin-extend": "10.1.1",
        "jss-rtl": "0.3.0",
        "jwt-decode": "2.2.0",
        "keycode": "2.2.0",
        "konva": "^6.0.0",
        "lodash": "4.17.15",
        "marked": "0.8.2",
        "material-table": "1.57.2",
        "material-ui-popup-state": "1.5.4",
        "mobile-detect": "1.4.4",
        "moment": "2.24.0",
        "notistack": "0.9.9",
        "object-path": "^0.11.4",
        "path-to-regexp": "3.2.0",
        "perfect-scrollbar": "1.5.0",
        "prismjs": "1.20.0",
        "prop-types": "15.7.2",
        "qs": "6.9.3",
        "raw-loader": "4.0.1",
        "react": "16.13.1",
        "react-app-polyfill": "1.0.6",
        "react-autosuggest": "10.0.0",
        "react-beautiful-dnd": "13.0.0",
        "react-big-calendar": "0.24.3",
        "react-chartjs-2": "2.9.0",
        "react-dom": "16.13.1",
        "react-draggable": "4.3.1",
        "react-frame-component": "4.1.1",
        "react-i18next": "11.3.4",
        "react-intl": "^3.6.2",
        "react-is": "^16.13.1",
        "react-konva": "^16.13.0-3",
        "react-masonry-css": "1.0.14",
        "react-number-format": "4.4.1",
        "react-popper": "1.3.7",
        "react-redux": "7.2.0",
        "react-router": "5.1.2",
        "react-router-config": "5.1.1",
        "react-router-dom": "5.1.2",
        "react-scripts": "3.4.1",
        "react-select": "3.1.0",
        "react-signature-canvas": "^1.0.3",
        "react-spring": "8.0.27",
        "react-swipeable-views": "0.13.9",
        "react-swipeable-views-utils": "0.13.9",
        "react-table": "7.0.4",
        "react-text-mask": "5.4.3",
        "react-virtualized": "9.21.2",
        "react-window": "1.8.5",
        "redux": "4.0.5",
        "redux-persist": "^6.0.0",
        "redux-saga": "^1.1.3",
        "redux-thunk": "2.3.0",
        "styled-components": "5.1.0",
        "typeface-muli": "1.1.3",
        "velocity-animate": "1.5.2",
        "velocity-react": "1.4.3",
        "yup": "^0.29.1"
    },
    "resolutions": {
        "react": "16.13.1",
        "react-dom": "16.13.1",
        "date-arithmetic": "3.1.0",
        "chalk": "2.4.2"
    },
    "devDependencies": {
        "@babel/core": "7.9.0",
        "@babel/node": "7.8.7",
        "@babel/preset-env": "7.9.5",
        "@yarnpkg/pnpify": "^2.0.0-rc.20",
        "babel-eslint": "10.1.0",
        "cross-env": "7.0.2",
        "eslint": "6.8.0",
        "eslint-config-airbnb": "18.1.0",
        "eslint-config-prettier": "^6.11.0",
        "eslint-import-resolver-node": "^0.3.3",
        "eslint-plugin-import": "^2.20.1",
        "eslint-plugin-jsx-a11y": "^6.2.3",
        "eslint-plugin-prettier": "^3.1.3",
        "eslint-plugin-react": "^7.19.0",
        "eslint-plugin-react-hooks": "2.5.0",
        "js-beautify": "1.11.0",
        "node-sass": "^4.13.0",
        "prettier": "^2.0.4",
        "prettier-eslint": "^9.0.1",
        "promise": "8.1.0",
        "purgecss": "1.4.2",
        "source-map-explorer": "2.4.2",
        "tailwindcss": "1.2.0",
        "tailwindcss-dir": "4.0.0"
    },
    "scripts": {
        "start": "yarn run tailwind && react-scripts start",
        "build": "yarn run tailwind && yarn run purge-tailwind && cross-env GENERATE_SOURCEMAP=false react-scripts build",
        "tailwind": "tailwind build ./src/styles/tailwind-config.css -c ./tailwind.config.js -o ./src/styles/tailwind.css",
        "purge-tailwind": "node ./purge-tailwindcss.js",
        "test": "react-scripts test --env=node",
        "eject": "react-scripts eject",
        "build-docs": "find ./src/app/main/documentation/material-ui-components \\( -name '*.ts' -o -name '*.tsx' \\) -type f -delete && babel-node --presets @babel/preset-env src/app/main/documentation/material-ui-components/build.js",
        "analyze": "yarn run tailwind && yarn run purge-tailwind && react-scripts build && source-map-explorer 'build/static/js/*.js' --html analyze-result.html",
        "pnpify-sdk": "yarn pnpify --sdk",
        "lint": "eslint"
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version",
            "ie 11"
        ]
    }
}

@Bluefitdev
Copy link
Author

Also my eslintrc if that affects it? Although it happens even when I disabled extensions so I doubt that the eslint is having effect..

module.exports = {
    env: {
        browser: true,
        es6: true,
        node: true
    },
    parser: "babel-eslint",
    extends: [
        "plugin:react/recommended",
        "airbnb",
        "prettier",
        "prettier/react",
        "plugin:prettier/recommended"
    ],
    globals: {
        Atomics: "readonly",
        SharedArrayBuffer: "readonly"
    },
    parserOptions: {
        ecmaFeatures: {
            jsx: true
        },
        ecmaVersion: 2018,
        sourceType: "module"
    },
    plugins: ["react", "jsx-a11y", "import", "prettier"],
    rules: {
        "prettier/prettier": "error",
        "react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
        "no-console": "off",
        "no-use-before-define": "off",
        "react/destructuring-assignment": "off",
        "react/jsx-props-no-spreading": "off",
        "react/no-danger": "off",
        "react/require-default-props": "off",
        "react/default-props-match-prop-types": "off",
        "react/no-unused-prop-types": "off",
        "import/prefer-default-export": "off",
    },
    settings: {
      'import/resolver': {
        'node': {
          paths: ['src']
        }
      }
    }
};

@mjbvz
Copy link
Contributor

mjbvz commented Jun 23, 2020

Can you create a minimal project that demonstrates the problem?

@Bluefitdev
Copy link
Author

Bluefitdev commented Jun 23, 2020

Hmm its pretty hard to reproduce. I just created a copy project stripping out all of the core files and it works just fine.. but in a big projects it stucks at depth 1-2 of app/components/...loading then it goes loading

But if I stripped all of the core files (which has 5-6 main folders) it actually works just fine. But on the other hand it also works fine on sublime and vim. So i'm not really sure how to reproduce it

Screen Shot 2020-06-23 at 11 14 55 am

@Bluefitdev
Copy link
Author

Hey I think this is the same problem with microsoft/vscode#53541.. I am still having it after coming back right now :/

@mjbvz mjbvz transferred this issue from microsoft/vscode Jun 29, 2020
@mjbvz mjbvz removed their assignment Jun 29, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Jun 29, 2020

Moving upstream for more feedback

To help us investigate, can you please try collecting the TS Server log:

  1. Set "typescript.tsserver.log": "verbose",
  2. Restart VS Code and reproduce the problem
  3. In VS Code, run the TypeScript: Open TS Server log command
  4. This should open a large log file called tsserver.log

This may help us identify why intellisense is so slow

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

@Bluefitdev
Copy link
Author

Bluefitdev commented Jun 29, 2020

Hey I reproduced the problem and have created the server log, it stucks on loading until it finishes indexing the import I guess?

I'm also using absolute import so here's the jsconfig.json:

{
    "compilerOptions": {
        "baseUrl": "./src"
    },
    "include": [
        "src"
    ]
}

Also I'm using another language server in VIM and it works fine. Not sure if that is the one that vscode is using?

but yes it contains some sensitive information and I don't want to risk it for anyone from my company to see that I violate the condition.

Can I share to you in any other ways? Probably on private Gdrive or something else. Please let me know, thanks heaps!

@mjbvz
Copy link
Contributor

mjbvz commented Jun 29, 2020

You can share them with: matb at microsoft. Google drive or email works fine

@Bluefitdev
Copy link
Author

Emailed you mate.. Try to see if you received the invite

Thanks

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jun 30, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.1.0 milestone Jun 30, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Jul 2, 2020

Can you try sending the file directly. I don't know what google docs is doing but it doesn't seem to let me download the file:

Screen Shot 2020-07-01 at 6 09 28 PM

@Bluefitdev
Copy link
Author

Hmm that's odd,

No worries, just sent you the email. Its 11mb log file from dev at bluefit email

@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Dec 11, 2020
@sheetalkamat
Copy link
Member

@Bluefitdev can you please try this with typescript@next. Does this still repro. If yes can you please share the latest logs. if you want you can email them to me at shkamat at microsoft dot com. Thanks

@sheetalkamat sheetalkamat added the Needs More Info The issue still hasn't been fully clarified label Jan 6, 2021
@robertwt7
Copy link

robertwt7 commented Jan 8, 2021

Yes this is still repro... I can email you the logs previously that I emailed to mjbvz

Sent you email from dev at bluefit com au

Still persist even from my windows pc (both mac and windows)

@sheetalkamat
Copy link
Member

@robertwt7 we will need logs with typescript@next so we are looking at the latest things. i

@robertwt7
Copy link

So if i try to repro with the latest vscode, it should use the typescript@next lvm automatically right?

I'll try to produce new log later

@Bluefitdev
Copy link
Author

@sheetalkamat I just sent you with the version typescript: 4.1.2 in the log with latest vscode. Please double check

Thanks

@sheetalkamat
Copy link
Member

@Bluefitdev can you please try out build at #42428 (comment) to see how its working out. Please send the tsserver report with that build if things have not improved. Thanks.

@Bluefitdev
Copy link
Author

Bluefitdev commented Jan 21, 2021

I can confirm that this work. I got the intellisense almost instantly. Happy to go back to vscode!

Thanks

will be waiting for the next release with vscode :)

sheetalkamat added a commit that referenced this issue Jan 22, 2021
…r the project (#42428)

* Update and add test when typings dont change because of import name

* Update project scheduling only when typings are set

* Schedule update graph only if typings change
Fixes #39326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Needs More Info The issue still hasn't been fully clarified Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
6 participants