From:  "Fitzgerald, Nick" <nfitzgerald@mozilla.com>
Date:  31 Jul 2013 03:27:36 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Re: Proposal: forbid duplicates in "names" and "sources"

NNTP-Posting-Host:  63.245.216.66

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 
duplicate entry.

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.
> Thoughts?
>
> More info: https://github.com/mozilla/source-map/pull/72
> _______________________________________________
> dev-js-sourcemap mailing list
> dev-js-sourcemap@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-js-sourcemap