To expand (and re-iterate what Tobias said in the pr):
1. We want the source map format to be small
2. The reason names were pulled out of the mappings themselves and into
the `names` array was because of (1)
3. Allowing duplicate names in the `names` array is incompatible with
(1) because the array gets larger than it needs to be with every
4. Given (1) and (3), we should change the spec to dis-allow duplicate
names in the `names` array.
The same arguments apply to the `sources` array.
(Aside: we will probably need to fix the issue in mozilla/source-map
anyways for backwards compatibility)
On 7/30/13 11:17 AM, Evan Wallace wrote:
> Mozilla's source map implementation assumes the "names" array contains
> unique names, but this is not in the spec and the TypeScript compiler
> sometimes generates duplicate names. This prevents some TypeScript source
> maps from being read by Mozilla's source map library. One way to fix this
> is to require that "names" (and "sources") only contain unique strings.
> More info: https://github.com/mozilla/source-map/pull/72
> dev-js-sourcemap mailing list