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

metadata.json contains the name of the current module #8225

Closed
alexeagle opened this issue Apr 26, 2016 · 1 comment
Closed

metadata.json contains the name of the current module #8225

alexeagle opened this issue Apr 26, 2016 · 1 comment
Assignees

Comments

@alexeagle
Copy link
Contributor

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

@alexeagle alexeagle self-assigned this Apr 26, 2016
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users.

Fixes angular#8225
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users.

Fixes angular#8225
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users.

Fixes angular#8225
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users, so the top-level module name is uneeded.
Module names on references are replaced by capturing the import syntax from the module.
This allows readers of the metadata to do the module resolution themselves.

Fixes angular#8225
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users, so the top-level module name is uneeded.
Module names on references are replaced by capturing the import syntax from the module.
This allows readers of the metadata to do the module resolution themselves.

Fixes angular#8225
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users, so the top-level module name is uneeded.
Module names on references are replaced by capturing the import syntax from the module.
This allows readers of the metadata to do the module resolution themselves.

Fixes angular#8225
Fixes angular#8082
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 26, 2016
The filename contains the module name as resolved by users, so the top-level module name is uneeded.
Module names on references are replaced by capturing the import syntax from the module.
This allows readers of the metadata to do the module resolution themselves.

Fixes angular#8225
Fixes angular#8082
alexeagle added a commit to alexeagle/angular that referenced this issue Apr 28, 2016
The filename contains the module name as resolved by users, so the top-level module name is uneeded.
Module names on references are replaced by capturing the import syntax from the module.
This allows readers of the metadata to do the module resolution themselves.

Fixes angular#8225
Fixes angular#8082
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant