rokucommunity / ropm

A package manager for the Roku platform.
MIT License
34 stars 6 forks source link

why do we remove `-` character in folder names? #6

Closed georgejecook closed 4 years ago

georgejecook commented 4 years ago

what is wrong with rooibos-roku? it becomes rooibosroku all my projects use kebab case for folder names, why are we enforcing this strange convention?

TwitchBronBron commented 4 years ago

because the sanitized ropm package name will be the same name as the prefix used for your functions and component names (when I get that part written...). You can't have a roku function called rooibos-roku_runTests(). So we have to remove the dash, or change it to an underscore.

georgejecook commented 4 years ago

This is going to effect a lot of folks.

In my case: Someone camped on rooibos's name (literally took their 3 month old, unused test framework and renamed it to rooibos and created an npm package :(), so I now have to call the package rooibos-roku. I suspect that will be common.

pain points I can see:

  1. The roku modules folder is not the name of the package, which isn't what I'd expect, being an npm user
  2. I want my users to be calling rooibos_runtests, not rooibosroku_runTests - so now I'm going to have to update all my docs to tell them how to change their local namespace overrides (when that feature exists)
  3. I don't think everyone is going to get the names they want for their packages - it's going to be pretty ugly having rokuSomePackage_func, somePackageRoku_func all over the place. I think this is going to be a common issue.

My view is that the package authors should be able to specify the default namespace for their packages

TwitchBronBron commented 4 years ago

@georgejecook We had a discussion offline about this, and we have come to an agreement that this is an acceptable approach. I'm closing this issue.

Users will have the ability to rename packages, but due to the npm alias residing in user-land, and us not knowing the user's intentions when having packages define their own names, unfortunately this means that users will need to be the ones to rename packages.