Skip to content

fix(ng-update): better detection for workspace project in v9 hammer migration #18525

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

Conversation

devversion
Copy link
Member

Currently the v9 HammerJS migration determines the workspace project by
consulting the ts.Program that has been constructed. This logic is not
guaranteed to work because a TypeScript program doesn't necessarily need
to contain any "root" file names. This means that we cannot reliably
determine the workspace project from the ts.Program and we will throw
an error that no project could be found.

We can improve this logic by simply using the workspace project that is
associated with the originating tsconfig file. This was previously not
possible, but 411d048 enabled us to pass through the workspace project.

Fixes #18504.

@devversion devversion added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent pr: merge safe target: patch This PR is targeted for the next patch release labels Feb 17, 2020
@devversion devversion requested a review from jelbourn as a code owner February 17, 2020 13:47
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 17, 2020
…igration

Currently the v9 HammerJS migration determines the workspace project by
consulting the `ts.Program` that has been constructed. This logic is not
guaranteed to work because a TypeScript program doesn't necessarily need
to contain any "root" file names. This means that we cannot reliably
determine the workspace project from the `ts.Program` and we will throw
an error that no project could be found.

We can improve this logic by simply using the workspace project that is
associated with the originating tsconfig file. This was previously not
possible, but 411d048 enabled us to
pass through the workspace project.

Fixes angular#18504.
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Feb 18, 2020
@jelbourn jelbourn merged commit c0c9f4a into angular:master Feb 18, 2020
jelbourn pushed a commit that referenced this pull request Feb 18, 2020
…igration (#18525)

Currently the v9 HammerJS migration determines the workspace project by
consulting the `ts.Program` that has been constructed. This logic is not
guaranteed to work because a TypeScript program doesn't necessarily need
to contain any "root" file names. This means that we cannot reliably
determine the workspace project from the `ts.Program` and we will throw
an error that no project could be found.

We can improve this logic by simply using the workspace project that is
associated with the originating tsconfig file. This was previously not
possible, but 411d048 enabled us to
pass through the workspace project.

Fixes #18504.

(cherry picked from commit c0c9f4a)
@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 Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng-update: hammerjs v9 migration fails if project tsconfig does not specify explicit root file names
3 participants