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

refactor(compiler-cli): move the expression expression type checker #16562

Merged
merged 1 commit into from
May 9, 2017

Conversation

chuckjaz
Copy link
Contributor

@chuckjaz chuckjaz commented May 4, 2017

The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.

What kind of change does this PR introduce? (check one with "x")

[x] Refactoring (no functional changes, no api changes)

What is the current behavior? (You can also link to an open issue here)

The template type checker is part of the language service.

What is the new behavior?

The template type checker is part of the compiler cli.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No


export interface ExpressionDiagnosticsContext { event?: boolean; }

export enum DiagnosticKind {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider moving this out of this file as it seems more general than the scope of this file.

return result;
}

export function getExpressionScope(
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, never mind.

export {DiagnosticTemplateInfo, ExpressionDiagnostic, getExpressionDiagnostics, getExpressionScope, getTemplateExpressionDiagnostics} from './src/diagnostics/expression_diagnostics';
export {AstType, ExpressionDiagnosticsContext, TypeDiagnostic} from './src/diagnostics/expression_type';
export {BuiltinType, DeclarationKind, Definition, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable} from './src/diagnostics/symbols';
export {getClassFromStaticSymbol, getClassMembers, getClassMembersFromDeclaration, getPipesTable, getSymbolQuery} from './src/diagnostics/typescript_symbols';
Copy link
Contributor

Choose a reason for hiding this comment

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

These exports are only used for tests, right? Consider using a deep import in the tests then.
This way it is clearer which methods are supposed to be used (e.g. by the language service) and which ones are just helpers.

import {getExpressionDiagnostics, getExpressionScope} from './expressions';
import {HtmlAstPath} from './html_path';
import {NullTemplateVisitor, TemplateAstChildVisitor, TemplateAstPath} from './template_path';
import {getExpressionDiagnostics} from './expressions';
Copy link
Contributor

Choose a reason for hiding this comment

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

This also exists in the compiler-cli now, did you forget to delete it from the language service?

@chuckjaz chuckjaz force-pushed the move-expression-diagnostics branch 3 times, most recently from a1cc5c9 to 0dbda8a Compare May 9, 2017 16:34
The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
@chuckjaz chuckjaz force-pushed the move-expression-diagnostics branch from 0dbda8a to 1b6a93d Compare May 9, 2017 16:49
@chuckjaz chuckjaz added the action: merge The PR is ready for merge by the caretaker label May 9, 2017
@jasonaden jasonaden merged commit bb0902c into angular:master May 9, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
…ngular#16562)

The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
…ngular#16562)

The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
@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 Sep 11, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants