We agreed today that the metadata we produce for a single project should contain only relative paths, because we do not need to reference symbols that originated in a different node package.
This is a smell because we are about to change our package names, and the string 'angular2' does not appear anymore, however the metadata ought to remain unchanged (because the .d.ts files will not be affected)
https://raw.githubusercontent.com/angular/angular/builds-js/src/common/forms/directives/ng_control_name.metadata.json
Is an example of two problems:
- there is a
module in the top-level __symbolic definition, this duplicates information available in the file's path, and differs from .d.ts files, which do not declare their own module name. PROPOSAL: remove module from the schema (https://github.com/angular/angular/blob/master/tools/metadata/src/schema.ts#L5 )
- references to other angular code should be relative, not absolute names starting with 'angular2'. PROPOSAL: simply use the path.relative function in nodejs to relativize the path of a module from the containing file, whole metadata we are gathering.
cc @tbosch @chuckjaz
We agreed today that the metadata we produce for a single project should contain only relative paths, because we do not need to reference symbols that originated in a different node package.
This is a smell because we are about to change our package names, and the string 'angular2' does not appear anymore, however the metadata ought to remain unchanged (because the .d.ts files will not be affected)
https://raw.githubusercontent.com/angular/angular/builds-js/src/common/forms/directives/ng_control_name.metadata.json
Is an example of two problems:
modulein the top-level__symbolicdefinition, this duplicates information available in the file's path, and differs from.d.tsfiles, which do not declare their own module name. PROPOSAL: remove module from the schema (https://github.com/angular/angular/blob/master/tools/metadata/src/schema.ts#L5 )cc @tbosch @chuckjaz