3 ms·
> Next, move the major version to part of the name of a package. "Rails 5.1.4" becomes "Rails-5 (1, 4)". And what if a random person decided to register the pa
by littlestymaar 9y ago
> Next, move the major version to part of the name of a package. "Rails 5.1.4" becomes "Rails-5 (1, 4)".
And what if a random person decided to register the package named "Rails-6" ? This system is way too prone to malicious package name squatting.
- troymc 9y agoI guess you could just skip over Rails-6 and go from Rails-5 to Rails-7. Windows 8 went straight to Windows 10. The idea is that backwards incompatibility should cause a name change, so really any untaken name would do, e.g. Rails-McTavish, Rails-Ocelot, Rails-馄, Rails-0x389, Rails-3.14159, ...
- TAForObvReasons 9y ago> Windows 8 went straight to Windows 10. The alleged reason for skipping windows 9: many software packages were checking for older Windows versions (namely 95/98) by checking if the Windows version string starts with "Windows 9" https://www.reddit.com/r/technology/comments/2hwlrk/new_windows_version_will_be_called_windows_10/ckwq83x/ https://www.reddit.com/r/technology/comments/2hwlrk/new_wind...
- half-kh-hacker 9y agoSo what you're saying is that 'Windows 9' as a viable name was, in a sense, taken?
- gruez 9y ago>https://www.reddit.com/r/technology/comments/2hwlrk/new_wind.. https://www.reddit.com/r/technology/comments/2hwlrk/new_wind.... source: msft employee who isn't even close to the windows team. that explanation ignores the fact that windows spoofs the windows version number for all applications by default (defaults to 8.1 i think), unless you have a special entry in your application manifest. so old applications will still work by default. not to mention that windows has compatibility shims to deal with this exact issue.
- grzm 9y agoYou're right: this type of thing could be an issue. This is one of the motivations for package naming in the spirit of Java: Packages are prefixed so such collisions don't happen. Not all module systems have this type of namespacing, or at least take advantage of it.
- coldtea 9y ago>It's unclear to me if this is due to a failure of communication on the part of the original authors of Go, or if there's a deeper justification for go dep that I'm missing. If you know, set me straight in the comments below. Sounds like an extremely trivial thing to solve technically. Make all name-X belong to the same account -- that is, treat "name" as the unique identifier that binds a package name to an account. So nobody but those that have registered name-1, name-2 etc can register name-66. That's like 2 lines of code.
- lloeki 9y agoSolution that’s like 0 lines of code: namespacing. This way there’s e.g rails/rails-5 and rails/arel-3, or whatever. And if the project foo/name-41 gets abandoned it can recover at bar/name-42. Note that rails is (officially) hell bent on not using semver at all as significant breakage happens even at minor versions.