rails-assets icon indicating copy to clipboard operation
rails-assets copied to clipboard

Namespacing introduced package duplication

Open xire28 opened this issue 8 years ago • 4 comments

There seems to be two naming conventions for components:

  • The one used for dependencies without namespace : rails-assets-BOWER_PACKAGE_NAME
  • The normal one with namespace : rails-assets-USERNAME--BOWER_PACKAGE_NAME

So if you add a package as a dependency and then add it on his own, will get two separated package for one repository:

Using a real example, I currently have the two following gems:

gem 'rails-assets-behavior-google-map-marker-ujs'
gem 'rails-assets-xire28--behavior-google-map-marker-ujs'

xire28 avatar Apr 01 '16 12:04 xire28

@joshjordan and @hut8, wouldn't this kinda help tenex/rails-assets#44 ?

jnylen avatar Apr 07 '16 07:04 jnylen

@jnylen these are not forks - the two gems refer to the same repo.

@xire28 I see the issue, but do not understand the sequence of events that you believe caused it. Can you show me an example that will produce this state, or tell me the steps to reproduce with my own package?

joshjordan avatar Apr 07 '16 12:04 joshjordan

Reproducting the issue is simple, you only need two packages (A and B) and have A be a dependency of B.

Then if you add the B package using rails-assets, the following gems are created: rails-assets-USERNAME--B rails-assets-A

After if you add the A package on his own, this gem is created: rails-assets-USERNAME--A

In the end, you end up with three gems with a duplication for the package A: rails-assets-USERNAME--B rails-assets-USERNAME--A rails-assets-A

xire28 avatar Apr 07 '16 13:04 xire28

That seems simple to address. Thanks!

On Thu, Apr 7, 2016 at 9:26 AM xire28 [email protected] wrote:

Reproducting the issue is simple, you only need two packages (A and B) and have A be a dependency of B.

Then if you add the B package using rails-assets, the following gems are created: rails-assets-USERNAME--B rails-assets-A

After if you add the A package on his own, this gem is created: rails-assets-USERNAME--A

In the end, you end up with three gems with a duplication for the package A: rails-assets-USERNAME--B rails-assets-USERNAME--A rails-assets-A

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/rails-assets/rails-assets/issues/318#issuecomment-206900287

joshjordan avatar Apr 07 '16 14:04 joshjordan