Skip to content

JS: Typescript 3.9.2#3516

Merged
semmle-qlci merged 3 commits into
github:masterfrom
asger-semmle:js/typescript-3.9.2
May 20, 2020
Merged

JS: Typescript 3.9.2#3516
semmle-qlci merged 3 commits into
github:masterfrom
asger-semmle:js/typescript-3.9.2

Conversation

@asgerf
Copy link
Copy Markdown
Contributor

@asgerf asgerf commented May 19, 2020

Based on the announcement there doesn't seem to be any new features we need to support from our end. Still, I'm running an evaluation to see if anything breaks.

Based on the test output changes, it seems for a call expression foo(), the type of the callee foo has changed when it's a reference to a generic method, which seems innocent enough.

Evaluation of XSS on typescript-full looks fine.

  • I'm not sure where the performance comes from, as I don't think dist-compare measures extraction time, so probably just the usual cloud VM flakiness.
  • We discover a few extra call edges in vscode (see metrics section). I'm guessing this is because the type checker has changed a bit, and vscode is written against TypeScript 3.9's type system.

@asgerf asgerf added JS Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish and removed Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish labels May 19, 2020
@asgerf asgerf marked this pull request as ready for review May 20, 2020 09:51
@asgerf asgerf requested a review from a team as a code owner May 20, 2020 09:51
@esbena
Copy link
Copy Markdown
Contributor

esbena commented May 20, 2020

as I don't think dist-compare measures extraction time, so probably just the usual cloud VM flakiness

Correct, but we do record extraction timing metrics in the database:

/**
* The time taken for the extraction of a file.
* This table contains non-deterministic content.
*
* The sum of the `time` column for each (`file`, `timerKind`) pair
* is the total time taken for extraction of `file`. The `extractionPhase`
* column provides a granular view of the extraction time of the file.
*/
extraction_time(
int file : @file ref,
// see `com.semmle.js.extractor.ExtractionMetrics.ExtractionPhase`.
int extractionPhase: int ref,
// 0 for the elapsed CPU time in nanoseconds, 1 for the elapsed wallclock time in nanoseconds
int timerKind: int ref,
float time: float ref
)
/**
* Non-timing related data for the extraction of a single file.
* This table contains non-deterministic content.
*/
extraction_data(
int file : @file ref,
// the absolute path to the cache file
varchar(900) cacheFile: string ref,
boolean fromCache: boolean ref,
int length: int ref
)

@asgerf
Copy link
Copy Markdown
Contributor Author

asgerf commented May 20, 2020

Correct, but we do record extraction timing metrics in the database:

I tried adding a metric query for that once and unfortunately the result was unusable, presumably because of the TRAP cache biasing the result in favor of the second run. JS-Differences measures it more directly, however, so we can see the effects in tonight's run.

@semmle-qlci semmle-qlci merged commit c15d22d into github:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants