Skip to content

Resolve only relative references tree in the project (in syntax only mode) #39477

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

Closed
wants to merge 2 commits into from

Conversation

sheetalkamat
Copy link
Member

This resolves and follows all relative module references instead of just in open files

@sheetalkamat
Copy link
Member Author

@DanielRosenwasser The relative reference resolutions are also dependent on rootDirs option in config file. I am wondering if we should create inferred configured project that only reads options from config file and not file list so we give more accurate result.. Thoughts?

@sheetalkamat sheetalkamat force-pushed the syntaxOnlyRelativeResolutions branch from 41b2362 to 5387cde Compare July 7, 2020 21:22
@sheetalkamat
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 7, 2020

Heya @sheetalkamat, I've started to run the tarball bundle task on this PR at 5387cde. You can monitor the build here.

@DanielRosenwasser
Copy link
Member

I'm not quite as concerned with rootDirs, but maybe that's a bias of not having seen it nearly as much. If we're willing to read the tsconfig.json, then we probably also want to respect path mappings from the paths field too.

@DanielRosenwasser
Copy link
Member

By the way, what's the difference between this and #39476?

@DanielRosenwasser
Copy link
Member

Oh, is the idea that you would load up the entire project except for non-relative modules (e.g. node_modules imports)? From a gut feel, I don't think that that's desirable. I think a lot of codebases are large enough from their own size and we really want to minimize program construction time.

@sheetalkamat
Copy link
Member Author

Thats correct.. It constructs relative reference tree and ignores node_module imports.
The other one just resolves only in open file (only relative references)

@sheetalkamat
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 7, 2020

Heya @sheetalkamat, I've started to run the tarball bundle task on this PR at 37d270f. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @sheetalkamat, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/79104/artifacts?artifactName=tgz&fileId=11930698DC3312C59AF49D30296B7784B5F0BAA312D949B81C2C9A5C62932C9702&fileName=/typescript-4.0.0-insiders.20200707.tgz"
    }
}

and then running npm install.

@typescript-bot
Copy link
Collaborator

Hey @sheetalkamat, something went wrong when looking for the build artifact. (You can check the log here).

@sheetalkamat
Copy link
Member Author

Closing this since we definitely dont want whole tree.

@sheetalkamat sheetalkamat deleted the syntaxOnlyRelativeResolutions branch July 16, 2020 19:33
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants