Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Issue 2371743002: Make it a compile-time error if a library has `part "uri";` twice for the same uri. (Closed)

Created:
4 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
4 years, 2 months ago
Reviewers:
floitsch, eernst, siva
CC:
reviews_dartlang.org, Brian Wilkerson
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make it a compile-time error if a library has `part "uri";` twice for the same uri. If the part declaration is non-empty, it will always cause a compile-time error anyway due to duplicate declarations in the library scope. This just makes it explicit that it's an error in all cases, and avoids the special case of the empty part file being silently accepted until you put something in it. R=eernst@google.com Committed: https://github.com/dart-lang/sdk/commit/cc6d93b57c697e2afc86431e5b580dc2c1ae89a7

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M docs/language/dartLangSpec.tex View 1 chunk +3 lines, -0 lines 2 comments Download

Messages

Total messages: 9 (3 generated)
Lasse Reichstein Nielsen
4 years, 2 months ago (2016-09-26 12:18:36 UTC) #2
eernst
LGTM, with a comment that considers whether we should worry about "normalizing" the URIs before ...
4 years, 2 months ago (2016-09-26 14:26:37 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/2371743002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/2371743002/diff/1/docs/language/dartLangSpec.tex#newcode6947 docs/language/dartLangSpec.tex:6947: I considered something similar. Since I wrote the current ...
4 years, 2 months ago (2016-09-26 16:40:57 UTC) #4
Lasse Reichstein Nielsen
Committed patchset #1 (id:1) manually as cc6d93b57c697e2afc86431e5b580dc2c1ae89a7 (presubmit successful).
4 years, 2 months ago (2016-10-05 09:12:29 UTC) #6
siva
This just seems to add to the parsing cost of having to maintain a list ...
4 years, 2 months ago (2016-10-06 19:35:28 UTC) #8
Lasse Reichstein Nielsen
4 years, 2 months ago (2016-10-07 06:48:55 UTC) #9
Message was sent while issue was closed.
On 2016/10/06 19:35:28, siva wrote:
> This just seems to add to the parsing cost of having to maintain a list of
> 'part' URIs seen and checking against this list without any apparent benefit.
> 
> We were already reporting duplicate class, field or function errors when a
part
> 'uri' is specified.

I wouldn't worry about this in the VM for now.
At some point you will have the Kernel reject the program before it's even
passed to the VM, and until then, any non-empty part that's part'ed more than
once will still be rejected due to the duplicate declarations.

Powered by Google App Engine
This is Rietveld 408576698