Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(239)

Issue 7789051: Wrap the newest version of 'source-map'. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by usrbincc
Modified:
13 years, 2 months ago
CC:
traceur-compiler-reviews_googlegroups.com
Base URL:
https://code.google.com/p/traceur-compiler/@master
Visibility:
Public.

Description

Wrap the newest version of 'source-map'. - Add 'source-map' to package.json BUG=https://code.google.com/p/traceur-compiler/issues/detail?id=222 TEST=None

Patch Set 1 #

Total comments: 3

Patch Set 2 : Resolve dependency order automatically. #

Total comments: 3

Patch Set 3 : Use Patch Set 1 as a base. Code review fixes and minor tweaks. #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -29 lines) Patch
M Makefile View 1 chunk +1 line, -1 line 0 comments Download
M package.json View 1 chunk +2 lines, -1 line 0 comments Download
M src/outputgeneration/SourceMapIntegration.js-template.js View 1 2 1 chunk +44 lines, -27 lines 10 comments Download

Messages

Total messages: 7
usrbincc
Note: This is more of an RFC at this point, because we should really fix ...
13 years, 2 months ago (2013-03-23 21:21:51 UTC) #1
arv
I prefer the simpler approach in patch set 1. I don't want us to go ...
13 years, 2 months ago (2013-03-24 14:42:11 UTC) #2
usrbincc
Switched back to the simpler implementation of Patch Set 1. ---- I sent a pull ...
13 years, 2 months ago (2013-03-24 19:17:36 UTC) #3
arv
LGTM I'll take care of my comments before submitting https://codereview.appspot.com/7789051/diff/2001/Makefile File Makefile (left): https://codereview.appspot.com/7789051/diff/2001/Makefile#oldcode11 Makefile:11: ...
13 years, 2 months ago (2013-03-25 13:51:04 UTC) #4
arv
Committed as 2070a8aeb6406db06b847c0e7fca6934504dc4fa Please take a look at the changes I made. 1. Fixed the ...
13 years, 2 months ago (2013-03-25 14:05:36 UTC) #5
usrbincc
> 2. Only export SourceMapGenerator, SourceMapConsumer, SourceNode That's probably the right thing to do. Cleaner-looking ...
13 years, 2 months ago (2013-03-25 17:57:06 UTC) #6
arv
13 years, 2 months ago (2013-03-25 18:45:23 UTC) #7
My personal preference is 80 or 100 line length but allow exceptions.
The problem with exceptions is that it is hard for a computer to know
when it is reasonable.

I like short variables when the context is very limited or if the
context is not important. The WebKit coding style is to name variables
in such a way that there is no need for any comment describing it
which I think is a good advice.

On Mon, Mar 25, 2013 at 1:57 PM,  <usrbincc@yahoo.com> wrote:
>> 2. Only export SourceMapGenerator, SourceMapConsumer, SourceNode
>
>
> That's probably the right thing to do. Cleaner-looking too. Upon
> reflection, I can always require() directly if I want to test something
> quick.
>
>
>
>
> https://codereview.appspot.com/7789051/diff/2001/Makefile
> File Makefile (left):
>
> https://codereview.appspot.com/7789051/diff/2001/Makefile#oldcode11
> Makefile:11: TFLAGS = --strict-semicolons --
> On 2013/03/25 13:51:05, arv-chromium wrote:
>>
>> On 2013/03/23 21:21:51, usrbincc wrote:
>> > The newest version of source-map (0.1.16 currently) has some missing
>> > semicolons, so I've temporarily taken out this flag in order to
>
> allow
>>
>> > the build to complete successfully.
>
>
>> I think we will continue to run into this as long as we include third
>
> party
>>
>> code.
>
>
> I plan on submitting a "nolint" patch in the near future, so this
> '--strict-semicolons' removal should only be a temporary thing.
>
>
>
https://codereview.appspot.com/7789051/diff/7001/src/outputgeneration/SourceM...
> File src/outputgeneration/SourceMapIntegration.js-template.js (right):
>
>
https://codereview.appspot.com/7789051/diff/7001/src/outputgeneration/SourceM...
> src/outputgeneration/SourceMapIntegration.js-template.js:22: * @return
> {function(function(require, exports, module))} a 'define' function
>>
>> Those should be the type names...
>
>
> Oops. That's the trouble with a mentally-simulated type language. Coding
> is so much easier with computer support.
>
>
>
https://codereview.appspot.com/7789051/diff/7001/src/outputgeneration/SourceM...
> src/outputgeneration/SourceMapIntegration.js-template.js:59:
> mapping['./source-map-generator'].SourceMapGenerator;
>>
>> Working in WebKit code has made me believe that there are cases where
>
> line
>>
>> limits are stupid. Import and exports seems like those.
>
>
> I think that's one area that's harder to apply the Google JS style guide
> to (understandable considering JS doesn't have modules). I recently
> added some exceptions to my pre-commit hook to optionally ignore module-
> related lines.
>
> I like having some sort of line limit, since that allows you to edit two
> (or even three) files simultaneously in a side-by-side format.
>
> The TypeScript coding style has no line limits, which works well most of
> the time, since most lines don't go over 100, or even 90 for that
> matter. The super-long lines (200+) in certain files are kind of
> annoying, though. Anything that wraps is annoying, really.
>
>   #--cut--
>   ## run in TypeScript working dir
>   find src -name \*.ts | xargs \
>     awk  'function fmt(l,n) {
>             if (length(l)>n)
>               return substr(l,1,n)"\n"fmt(substr(l,n+1),n);
>             return l;
>           }
>           BEGIN{ll=0;f=""}
>           length($0)>ll{ll=length($0);f=FILENAME;l=$0}
>           END{print ll,f,"\n"fmt(l,70)}'
>   ## output; this file is a long-line festival.
>   411 src/services/formatting/rules.ts
>               this.SpaceAfterCertainKeywords = new Rule(RuleDescriptor.c
>   reate4(Shared.TokenRange.FromTokens([AuthorTokenKind.atkVar, AuthorTok
>   enKind.atkThrow, AuthorTokenKind.atkNew, AuthorTokenKind.atkDelete, Au
>   thorTokenKind.atkReturn, AuthorTokenKind.atkVoid, AuthorTokenKind.atkT
>   ypeof]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperati
>   onContext(Rules.IsSameLineTokenContext), RuleAction.Space));
>   #--cut--
>
> With the identifier names that I gravitate to, I usually have no problem
> fitting into 80 cols, but when thingsStartCamelCasing you quickly run
> out of space on the right. A line length that can fit 5 to 7 average
> length identifiers (including all the supporting keywords and tokens --
> I'm looking at you, Mr. public static final crazyLongTypeName!) seems
> about right.
>
>   Average identifier length for a given code base, obviously, since that
>   varies with coding style.
>
>
>> We could also do m instead of mapping ;-)
>
>
> I didn't think you'd actually do it! But after seeing 2070a8aeb6406db0,
> I see that you've awakened to the charm of single chars. One line
> squeaked by with one char of leeway. Well played. Fitting under line
> length can feel like golf (wait, horseshoes? chicken?), almost.
>
> https://codereview.appspot.com/7789051/



-- 
erik
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b