Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix case-sensitive deps not resolving #85

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

Closed
wants to merge 5 commits into from
Closed

fix case-sensitive deps not resolving #85

wants to merge 5 commits into from

Conversation

tetsuo
Copy link
Contributor

@tetsuo tetsuo commented Nov 25, 2014

Scripts#lookup starts by lowercasing the target name before doing its job but this causes some trouble if you need to require a file name with some mixed case letters in it.

The trouble is that this doesn't resolve to anything:

require('repo/FileName')

Now, one way of working around this problem is to lowercase everything first, which in fact what builder is doing right now and most certainly doesn't bring the desired outcome from the developer's perspective. And it doesn't work either, because resolver.js doesn't know that.

A better option is to lowercase only user and repo fragments (this patch)

Since we know user and repo are case insensitive, and must be case insensitive; we can safely translate the reference to lowercase and keep the rest untouched.

@tetsuo
Copy link
Contributor Author

tetsuo commented Nov 25, 2014

Yeah sure. I know using lowercase letters is the preferred way, and to me enforcing this rule is no problem at all. But this fix doesn't break anything, passes all the tests. Making some mixed-case minded people happy will do no harm to the current ecosystem.

Besides, think of a situation where you want to support both browserify and component builds. Browserify works absolutely fine with mixed-case letters, but component doesn't. And now if you are stuck with a giant lib that has some crazy letters in it, you will most probably drop the component support rather than forking up this beast and maintain component compatibility.

As I said, this will do no harm and actually make some good.

@timaschew
Copy link
Member

okay, good point, thanks. Have no time this week, but I will check it next week

@tetsuo
Copy link
Contributor Author

tetsuo commented Nov 26, 2014

👍

@tetsuo
Copy link
Contributor Author

tetsuo commented Nov 27, 2014

@timaschew Fixing another issue (infamously @Raynos bug

* - people like @raynos will want to be able to do require('component/lib') or something but F that!
) right now.

Please do not merge this, not yet, even if you intend to :) I'll send another request

@timaschew
Copy link
Member

Please do not merge this, not yet, even if you intend to :) I'll send another request

So this can be closed?

@tetsuo
Copy link
Contributor Author

tetsuo commented Dec 6, 2014

@timaschew have you seen this one? #86

@tetsuo
Copy link
Contributor Author

tetsuo commented Dec 6, 2014

if #86 is ok i'll merge this with that one

@tetsuo tetsuo mentioned this pull request Dec 7, 2014
@tetsuo
Copy link
Contributor Author

tetsuo commented Dec 7, 2014

Closing this. See #87

@tetsuo tetsuo closed this Dec 7, 2014
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.