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

Make ModuleSpecifier a type alias, not wrapper struct #9531

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

ry
Copy link
Member

@ry ry commented Feb 17, 2021

No description provided.

@ry ry requested a review from bartlomieju February 17, 2021 17:10
.map(ModuleSpecifier)
.map_err(ModuleResolutionError::InvalidUrl)
}
pub type ModuleSpecifier = Url;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main change.

Copy link
Member

Choose a reason for hiding this comment

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

If you don't want to have ModuleSpecifier being a wrapper for Url what's the point of having this alias at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can maybe remove it later, but one could argue the semantic difference is valuable.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Just want to reiterate that I'm not a fan of this change

.map(ModuleSpecifier)
.map_err(ModuleResolutionError::InvalidUrl)
}
pub type ModuleSpecifier = Url;
Copy link
Member

Choose a reason for hiding this comment

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

If you don't want to have ModuleSpecifier being a wrapper for Url what's the point of having this alias at all?

core/module_specifier.rs Outdated Show resolved Hide resolved
@ry ry merged commit c7dabc9 into denoland:master Feb 17, 2021
@ry ry deleted the module_specifier branch February 17, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants