Skip to content

Move type serialization to emitter#3690

Merged
rbuckton merged 5 commits into
masterfrom
moveTypeSerializationToEmitter
Jul 10, 2015
Merged

Move type serialization to emitter#3690
rbuckton merged 5 commits into
masterfrom
moveTypeSerializationToEmitter

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

@rbuckton rbuckton commented Jul 1, 2015

Moves the logic for decorator metadata type serialization to the emitter.

This follows #3380, and also fixes #3663.

@PatrickJS
Copy link
Copy Markdown

👍 can you guys update beta with this fix?

@DanielRosenwasser
Copy link
Copy Markdown
Member

@gdi2290 1.5 is basically stabilizing and not taking anything that's not extremely high priority. This will be going into 1.6.

@PatrickJS
Copy link
Copy Markdown

we found a workaround @DanielRosenwasser so no worries

Comment thread src/compiler/checker.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i would just have htis as ignoreErrors ? undefined : message

@SnareChops
Copy link
Copy Markdown

I would say that this is very high priority and believe that it should go into 1.5. This is a critical bug that breaks any application using the reflection metadata api (yes experimental) and ES6 style exports. For example:

export default class FriendsService {
  names: Array<string>;
  constructor() {
    this.names = ["Alice", "Aarav", "Martín", "Shannon", "Ariana", "Kai"];
  }
}
import FriendsService from './FriendsService';
@Component({
  ...
  appInjector: [FriendsService]
})
class DisplayComponent {
  myName: string;
  names: Array<string>;
  constructor(friendsService: FriendsService) {
    this.myName = 'Alice';
    this.names = friendsService.names;
  }
}

This example is taken directly from angular but I moved the two classes into separate files and used the ES6 import and export statements.

See #3663 for another example

In this case I would simply try to remove the type annotation on the constructor parameter, but that is required by Angular.... So either way it's broken. Therefore I make the argument that this is a critical bug and should be included in 1.5

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jul 9, 2015

@SnareChops sorry for the delay, it has been a relatively tricky change to get it. we will get you a build to unblock you asap. as for the release vehicle, i do not think 1.5 is an option. but we are working on getting a nightly release in place, so should have an "official" release with the fix soon.

rbuckton added a commit that referenced this pull request Jul 10, 2015
@rbuckton rbuckton merged commit a78421f into master Jul 10, 2015
@rbuckton rbuckton deleted the moveTypeSerializationToEmitter branch July 10, 2015 21:46
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decorators and SystemJS

7 participants