Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alan-agius4
Copy link
Contributor

  • Fix several compilation errors
  • Update @microsoft/api-extractor to be compatible with TypeScript 3.9

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@angular angular deleted a comment from googlebot Apr 29, 2020
@AndrewKushnir AndrewKushnir added the area: packaging Issues related to Angular's creation of npm packages label Apr 29, 2020
@ngbot ngbot bot added this to the needsTriage milestone Apr 29, 2020
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done, so that we don't have a breaking change. Because in TS 3.9 T extends any behaviour changed

function foo<T extends any>(arg: T) {
    arg.spfjgerijghoied; // no error!
}

function foo<T extends any>(arg: T) {
    arg.spfjgerijghoied;
    //  ~~~~~~~~~~~~~~~
    // Property 'spfjgerijghoied' does not exist on type 'T'.
}

T extends any is more or less the same as T extends unknown

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Apr 30, 2020

There seems to be 2 main pending failure points.

NGCC

LS

  • Found the root cause and will laise with @kyliau.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels May 4, 2020
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels May 5, 2020
alan-agius4 and others added 6 commits May 5, 2020 09:13
Version 7.7.12 generates aliases for objects named the same as global symbols which breaks ts-api-guardian since it doesn't support aliases.

See: microsoft/rushstack#1830
- Fix several compilation errors
- Update @microsoft/api-extractor to be compatible with TypeScript 3.9
The `NodeJSFileSystem.isCaseSensitive()` method was computing
completely the opposite value for its result.

Also the `NgtscCompilerHost.getCanonicalFileName()` method was
not actually calling `useCaseSensitiveFileNames()` so it was always
assuming that the filenames were case sensitive and not actually
canonicalizing them. Instead just returning the original.

Once these two bugs were fixed, a number of issues with the rest of the
handling of case-insensitive files in compiler-cli and tests were uncovered.

This commit also fixes these issues. Here are some further notes:

The TS compiler canonicalizes filenames internally for lookups etc. So
if we are also doing file lookups we need to use the same canonicalized
forms. This is achieved by injecting the `ts.CompilerHost` where needed
and calling `getCanonicalFileName()`. For example, when computing the
`rootDirs` in the `LogicalFileSystem`.

Some tests were checking that particular source files were being exposed
by comparing the `ts.SourceFile.fileName` property with some non-canonical
filename. In some cases this would fail. Instead these comparisons are
achieved by directly comparing the SourceFile objects, if known, or getting
the SourceFile object from a non-canonical filename from the program, by
calling `program.getSourceFile(nonCanonicalFileName)`.

The `MockFileSystemWindows` class was not considering lower case drive names
when computing if a path is rooted (i.e. absolute).

The `NodeJSFileSystem.isCaseSensitive()` method was relying upon its `exists()`
method. But this itself relies upon the `isCaseSensitive()` to determine
if a file exists. So there was an infinite recursion. This is solved by
actually using the underlying real `fs.existsSync` to compute whether the
file system is case sensitive.
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels May 5, 2020
@alan-agius4
Copy link
Contributor Author

Closing in favour of #36989

@alan-agius4 alan-agius4 deleted the typescript-3_9 branch May 12, 2020 13:16
@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 Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: packaging Issues related to Angular's creation of npm packages cla: no
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants