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

Typo in diagnostic template info #32662

Closed
cRAN-cg opened this issue Sep 13, 2019 · 5 comments
Closed

Typo in diagnostic template info #32662

cRAN-cg opened this issue Sep 13, 2019 · 5 comments
Labels
area: compiler Issues related to `ngc`, Angular's template compiler
Milestone

Comments

@cRAN-cg
Copy link
Contributor

cRAN-cg commented Sep 13, 2019

🐞 bug report

Affected Package

The issue is caused by package @angular/compiler-cli

Is this a regression?

No

Description

When a variable is not defined in a template context the diagnostic offset span pushes the error as

The template context does not defined a member called
instead it should be
The template context does not define a member called

🔥 Exception or Error


The template context does not defined a member called

🌍 Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.0.0-beta.15
Node: 10.16.0
OS: darwin x64
Angular: undefined
... 

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-beta.15
@angular-devkit/build-optimizer   0.800.0-beta.15
@angular-devkit/core              8.0.0-beta.15
@angular-devkit/schematics        8.0.0-beta.15
@angular/bazel                    0.0.0
@angular/cli                      8.0.0-beta.15
@schematics/angular               8.0.0-beta.15
@schematics/update                0.800.0-beta.15
rxjs                              6.4.0
typescript                        3.5.3
webpack                           1.12.9

Anything else relevant?

@cRAN-cg
Copy link
Contributor Author

cRAN-cg commented Sep 13, 2019

I would like to work on it.

@cRAN-cg cRAN-cg closed this as completed Sep 13, 2019
@cRAN-cg cRAN-cg reopened this Sep 13, 2019
@cRAN-cg
Copy link
Contributor Author

cRAN-cg commented Sep 13, 2019

Sorry for the closing it.

@gkalpak gkalpak added the area: compiler Issues related to `ngc`, Angular's template compiler label Sep 13, 2019
@ngbot ngbot bot added this to the needsTriage milestone Sep 13, 2019
@gkalpak
Copy link
Member

gkalpak commented Sep 13, 2019

Good catch, @cRAN-cg 👍
Feel free to go ahead and submit a pull request 😉

@cRAN-cg
Copy link
Contributor Author

cRAN-cg commented Sep 13, 2019

@gkalpak While going through the tests of language-service I found that the error message for implicit context reference


    describe('in ngIf', () => {
      function expectError(locationMarker: string, message: string) {
        expectSemanticError('app/ng-if-cases.ts', locationMarker, message);
      }
      it('should report an implicit context reference', () => {
        expectError(
            'implicit', 'The template context does not defined a member called \'unknown\'');
      });
    });

is different than that defined in the compiler-cli


if (ast.value === '$implicit') {
          this.reportError(
              'The template context does not have an implicit value', spanOf(ast.sourceSpan));
        }

I was wondering if you could advise me on the same too.

cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 15, 2019
test(language-service): fix typo in diagnostic template info.

Fixes angular#32662
cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 15, 2019
test(language-service): fix typo in diagnostic template info.

Fixes angular#32662
cRAN-cg added a commit to cRAN-cg/angular that referenced this issue Sep 16, 2019
@kara kara closed this as completed in f6d6667 Sep 16, 2019
@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 Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants