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

Angular CLI doesn't detect changes/references in files used by importing 'index.ts' in angular and don't recompiling project #13975

Closed
zwiras opened this issue Mar 25, 2019 · 1 comment · Fixed by #13977
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@zwiras
Copy link

zwiras commented Mar 25, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

No

Description

In AppComponent the IPerson1 interface is imported by index. Probably visual studio doesn't detect references to the file and doesn't recompile the project when changing and saving the file. The interface "IPerson2" is imported directly and recompile works.

🔬 Minimal Reproduction

  1. Create Angular project
  2. Add new folder "person"
  3. Add file iperson1.ts to "person" folder
export interface IPerson1 {
  name: string;
  age: number;
}
  1. Add file IPerson2 to "person" folder
export interface iperson2.ts {
  name: string;
  age: number;
}
  1. Add ile index.ts to "person" folder
export * from './iperson';
export * from './iperson2';
  1. Add this code to AppComponent:
import { IPerson1 } from './person';
import { IPerson2 } from './person/iperson2';
  person: IPerson1 = {
    age: 20,
    name: 'Karl'
  };

  person2: IPerson2 = {
    age: 21,
    name: 'Tomas'
  };
  1. Start project: npm start
  2. Change something in iperson1.ts and save. Project is not recompiled.
  3. Change something in iperson2.ts and save. Project is recompiled.

vscode2

🌍 Your Environment


Angular CLI: 7.3.3
Node: 10.15.1
OS: win32 x64
Angular: 7.2.6
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.3
@angular-devkit/build-angular     0.13.3
@angular-devkit/build-optimizer   0.13.3
@angular-devkit/build-webpack     0.13.3
@angular-devkit/core              7.3.3
@angular-devkit/schematics        7.3.3
@angular/cli                      7.3.3
@ngtools/webpack                  7.3.3
@schematics/angular               7.3.3
@schematics/update                0.13.3
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.29.0

Anything else relevant?

  • VSCode Version: 1.31.1
  • OS Version: Windows_NT x64 10.0.17134
@ngbot ngbot bot added this to the needsTriage milestone Mar 25, 2019
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Mar 25, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Mar 25, 2019
mgechev pushed a commit that referenced this issue Mar 29, 2019
mgechev pushed a commit that referenced this issue Mar 29, 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 Sep 9, 2019
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants