-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues in the section 12.1 of the specification #1774
Comments
Added Area-Language, Triaged labels. |
This comment was originally written by rodion...@unipro.ru I assume it means library name. |
This comment was originally written by rodion...@unipro.ru the above comment was about point 2, which is unchanged in 0.08 draft |
Added this to the M1 milestone. |
The 0.9 draft addresses these points.
|
This comment was originally written by rodion...@unipro.ru there's still ambiguity in the spec: Seems to imply that it's ok to have name conflicts between imported namespace and script's own namespace and in case of identical names one just shadows the other. |
There is no ambiguity in the spec. It odes not seem to imply that imports may conflict with the library and the library takes precedence - it just says so. The implementation is behind and teher is a bug filed against it. |
This comment was originally written by rodion...@unipro.ru Got it. Another question regarding point 2 now: |
This comment was originally written by rodion...@unipro.ru Also, the requirement that URI must be a compile-time constant and not involve string interpolation have been removed. Please clarify the situation. |
This comment was originally written by rodion...@unipro.ru Is the following a typo? last assertion of the subchapter 12.2 |
This comment was originally written by rodion...@unipro.ru Regarding spec v0.10 Is one of these statements in 12.2 redundant or am I reading it wrong? "It is a compile-time error if a name N is introduced into the import names- "It is a compile-time error to import into a library two or more namespaces |
…_stack_trace, source_maps, see, stack_trace, test, webdev bazel_worker (https://github.com/dart-lang/bazel_worker/compare/9710de6..75a947f): 75a947f 2022-10-18 Nate Bosch Prepare to publish (#63) collection (https://github.com/dart-lang/collection/compare/ca45fc4..efd709f): efd709f 2022-10-18 Kevin Moore Fix doc comment references among other new lints (#253) markdown (https://github.com/dart-lang/markdown/compare/d72ae07..93d0eee): 93d0eee 2022-10-14 Kevin Moore Misc package cleanup, mostly lints (#468) 16781b6 2022-10-14 Kevin Moore CI: update actions, add dependabot (#469) pub_semver (https://github.com/dart-lang/pub_semver/compare/7671359..28159b8): 28159b8 2022-10-14 Devon Carew prep for publishing (#73) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/72dbf21..8d8078f): 8d8078f 2022-10-18 Devon Carew update ci; prep for publishing (#30) source_maps (https://github.com/dart-lang/source_maps/compare/e93565b..c7e8963): c7e8963 2022-10-18 Devon Carew adjust the min sdk we test against (#68) 4f0b1e2 2022-10-18 Devon Carew update ci; prep for publishing (#67) sse (https://github.com/dart-lang/sse/compare/00084c4..283568d): 283568d 2022-10-14 Devon Carew update ci; prep for publishing (#64) stack_trace (https://github.com/dart-lang/stack_trace/compare/9697e4c..dce0013): dce0013 2022-10-18 Kevin Moore fix changelog link test (https://github.com/dart-lang/test/compare/58beb14..f704d5a): f704d5af 2022-10-17 godofredoc Add scorecard badge to test repo. (#1774) webdev (https://github.com/dart-lang/webdev/compare/69aac60..5343edb): 5343edb 2022-10-17 Elliott Brooks (she/her) Migrate more files to null-safety (#1758) ce498c2 2022-10-14 Elliott Brooks (she/her) Migrate `configuration.dart` and `shared.dart` to null-safety (#1757) Change-Id: I8859b1abc22f630c2136a69b0ad5a836691b9dbd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264881 Auto-Submit: Devon Carew <devoncarew@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com>
…t, test_process, webdev Revisions updated by `dart tools/rev_sdk_deps.dart`. browser_launcher (https://github.com/dart-lang/browser_launcher/compare/981ca88..5fa0bd6): 5fa0bd6 2022-11-01 Kevin Moore Update lints, require Dart 2.17, add dependabot (#34) dartdoc (https://github.com/dart-lang/dartdoc/compare/3273437..179ada0): 179ada02 2022-11-02 Sam Rawlins Change _HashableChildLibraryElementVisitor to be a RecursiveElementVisitor (#3242) a6e7d908 2022-11-02 Sam Rawlins Make Inheritable.isOverride late final non-nullable (#3235) c4f52cf9 2022-11-02 Sam Rawlins Test records support in typedefs (#3239) f74e129f 2022-11-02 Sam Rawlins Make Accessor.documentationComment late final non-nullable (#3240) ad50bfbc 2022-10-31 dependabot[bot] Bump github/codeql-action from 2.1.28 to 2.1.29 (#3238) http (https://github.com/dart-lang/http/compare/738a55b..6339026): 6339026 2022-11-02 Brian Quinlan Make timeout and cache controllable per-request. (#815) 51dbca2 2022-10-31 Brian Quinlan Add a streaming request example. (#813) mime (https://github.com/dart-lang/mime/compare/bf041aa..d80f4d0): d80f4d0 2022-11-02 Liu YuanYuan Add .avif to extension map (#70) 3a6b14e 2022-11-01 dependabot[bot] Bump actions/checkout from 3.0.2 to 3.1.0 (#72) string_scanner (https://github.com/dart-lang/string_scanner/compare/10435a4..4a5cbc5): 4a5cbc5 2022-10-31 Kevin Moore Make code in readme consistent with example (#49) test (https://github.com/dart-lang/test/compare/b82fc0b..173a36f): 173a36f2 2022-11-01 Jacob MacDonald prep packages to publish (#1780) fd8e2b68 2022-10-31 Devon Carew fix an issue with the github reporter (#1779) test_process (https://github.com/dart-lang/test_process/compare/068f9f8..1774aa7): 1774aa7 2022-11-01 dependabot[bot] Bump actions/checkout from 3.0.2 to 3.1.0 (#36) webdev (https://github.com/dart-lang/webdev/compare/c350055..069b870): 069b870 2022-11-01 Elliott Brooks (she/her) Prepare webdev for release to v.2.7.12 (#1775) cb06447 2022-11-01 Elliott Brooks (she/her) Prep DWDS for release (#1774) daa154d 2022-11-01 Elliott Brooks (she/her) Reset MV3 extension to nice starting point (#1773) 98a6142 2022-11-01 Jakub Vrána Remove // ignore: unsafe_html. (#1759) 939e285 2022-10-31 Elliott Brooks (she/her) Update documentation for Webdev release process (#1771) 0428ffb 2022-10-31 Elliott Brooks (she/her) Update package:file to latest version (#1770) Change-Id: I5020d718f6c009bca4f9b5e69232dc425b9d3409 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267761 Commit-Queue: Kevin Moore <kevmoo@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was originally filed by ms...@unipro.ru
At the same time the spec states that "It is a compile-time error if the value of s2 [prefix] is not a valid identifier."
So the directive #import(s, prefix: “”) is wrong since "" is not a valid identifier.
It is not clear what is the "name" "defined" by a library.
Conflicting top-level names are prohibited earlier in this chapter, so in this case this rule looks like a duplicate of the previous rule:
"It is a compile-time error if a name N is introduced into the library scope of a library A, and either: ... "
This question is inspired by the issue Importing core library with a prefix does not remove the names from the global namespace #939.
libraryDefinition:
scriptTag? libraryName import* include* resource* topLevelDefinition*
;
So the program composed according to this production could be imported fine since it must contain a libraryName.
But the script definition in section 12.3 contains only optional libraryName and it is not clear is it fine or not to import the script without libraryName.
The only hint is given as a non-normative text: "Named scripts are composable: they can be used as libraries by other scripts and libraries."
The text was updated successfully, but these errors were encountered: