-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Variables in single/double quotes. #5
Labels
closed-not-planned
Closed as we don't intend to take action on the reported issue
Comments
This comment was originally written by jat@google.com Dart already has raw strings: @"This $foo isn't interpolated". Added WontFix label. |
This was referenced Jun 3, 2015
Closed
This was referenced Jun 3, 2015
copybara-service bot
pushed a commit
that referenced
this issue
Oct 22, 2024
See: b/374689139. https://dart-review.googlesource.com/c/sdk/+/390941 is blocking an SDK roll. Root cause: ``` Action threw an exception: type 'ConstructorMember' is not a subtype of type 'ConstructorFragment' in type cast #0 InterfaceTypeImpl.constructors2.<anonymous closure> (package:analyzer/src/dart/element/type.dart:569) #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:435) #2 ListIterator.moveNext (dart:_internal/iterable.dart:364) #3 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189) #4 new _GrowableList.of (dart:core-patch/growable_array.dart:150) #5 new List.of (dart:core-patch/array_patch.dart:39) #6 ListIterable.toList (dart:_internal/iterable.dart:224) #7 InterfaceTypeImpl.constructors2 (package:analyzer/src/dart/element/type.dart:570) #8 _Visitor._hasConstConstructorInvocation (package:linter/src/rules/prefer_const_constructors_in_immutables.dart:110) #9 _Visitor.visitConstructorDeclaration (package:linter/src/rules/prefer_const_constructors_in_immutables.dart:58) ``` To verify the fix locally: ``` solo_test_X() async { await assertNoErrorsInCode(r''' class A<T> {} '''); var A = findElement.class_('A').instantiate( typeArguments: [intType], nullabilitySuffix: NullabilitySuffix.none, ); A.constructors2; } ``` Bug: b/374689139 Change-Id: I70034d938d840dc0c3939db27e7116164e4617e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391483 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com>
antonbashir
added a commit
to antonbashir/dart
that referenced
this issue
Nov 21, 2024
Closed
copybara-service bot
pushed a commit
that referenced
this issue
Feb 12, 2025
…terrupted Thread interrupts can be disabled after thread interrupter decided to interrupt a thread but before thread actually receives and handles a signal. This may cause a data race accessing a Sample between profiler which initializes and adds a Sample and the main thread using Profiler::sample_block_buffer() in the profiler unit tests. This is a possible fix for the following benign TSAN error: WARNING: ThreadSanitizer: data race (pid=5824) Write of size 4 at 0x7f53e8e53a98 by thread T6: #0 dart::Sample::set_thread_task(dart::Thread::TaskKind) out/ReleaseTSANX64/../../runtime/vm/profiler.h:325:12 (run_vm_tests+0x292cab2) #1 dart::SetupSample(dart::Thread*, bool, unsigned long) out/ReleaseTSANX64/../../runtime/vm/profiler.cc:1226:11 (run_vm_tests+0x292cab2) #2 dart::Profiler::SampleThread(dart::Thread*, dart::InterruptedThreadState const&) out/ReleaseTSANX64/../../runtime/vm/profiler.cc:1381:7 (run_vm_tests+0x292cab2) #3 dart::ThreadInterrupterLinux::ThreadInterruptSignalHandler(int, siginfo_t*, void*) out/ReleaseTSANX64/../../runtime/vm/thread_interrupter_linux.cc:44:5 (run_vm_tests+0x2a064b0) #4 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int, __sanitizer::__sanitizer_siginfo*, void*) ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:2122:5 (run_vm_tests+0x1fc057f) #5 dart::Mutex::Unlock() out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:367:16 (run_vm_tests+0x2924b89) Previous read of size 4 at 0x7f53e8e53a98 by main thread: #0 dart::Sample::head_sample() const out/ReleaseTSANX64/../../runtime/vm/profiler.h:350:59 (run_vm_tests+0x22c70e7) #1 dart::SampleBuffer::VisitSamples(dart::SampleVisitor*) out/ReleaseTSANX64/../../runtime/vm/profiler.h:589:20 (run_vm_tests+0x22c70e7) #2 dart::SampleBlockBuffer::VisitSamples(dart::SampleVisitor*) out/ReleaseTSANX64/../../runtime/vm/profiler.h:752:18 (run_vm_tests+0x22c70e7) #3 dart::Dart_TestHelperProfiler_GetSourceReport(dart::Thread*) out/ReleaseTSANX64/../../runtime/vm/profiler_test.cc:2241:26 (run_vm_tests+0x22c70e7) #4 dart::Dart_TestProfiler_GetSourceReport() out/ReleaseTSANX64/../../runtime/vm/profiler_test.cc:2206:1 (run_vm_tests+0x22c70e7) #5 dart::TestCase::Run() out/ReleaseTSANX64/../../runtime/bin/run_vm_tests.cc:53:3 (run_vm_tests+0x203fe6c) --- Re-run this test: python3 tools/test.py -n vm-tsan-linux-release-x64 vm/cc/Profiler_GetSourceReport Also, this change is a possible fix for #44089. TEST=ci Change-Id: I8ad87c340580325cbd6e22b5f068e1e33b0a7d46 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409460 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
copybara-service bot
pushed a commit
that referenced
this issue
Feb 21, 2025
This test has a few independent calls to asyncExpectThrows which uses asyncStart/asyncEnd. However, multiple top-level asyncStart/asyncEnd are not allowed, which causes the following flaky error: ``` Unhandled exception: Exception: Fatal: asyncStart() was called even though we are done with testing.. This is most likely a bug in your test. #0 asyncStart (package:expect/async_helper.dart:53) #1 asyncExpectThrows (package:expect/async_helper.dart:140) #2 testMalformedAuthenticateHeaderWithAuthHandler.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/tests/standalone/io/http_auth_digest_test.dart:345) #3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:951) #4 Future._propagateToListeners (dart:async/future_impl.dart:980) #5 Future._completeWithValue (dart:async/future_impl.dart:723) #6 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:807) #7 _microtaskLoop (dart:async/schedule_microtask.dart:40) #8 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49) #9 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:128) #10 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:195) --- Re-run this test: python3 tools/test.py -n vm-aot-ubsan-linux-release-x64 standalone/io/http_auth_digest_test ``` This change attempts to fix this by adding a top-level asyncStart/asyncEnd and also asyncStart/asyncEnd to the server start/shutdown to enclose each test case into asyncStart/asyncEnd and avoid printing "unittest-suite-success" marker before all test cases are finished. TEST=standalone/io/http_auth_digest_test Change-Id: I950e7c6c09f5c2144da874ab3be3cd3a130d3790 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411086 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This issue was closed.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
This issue was originally filed by craig...@craigfrancis.co.uk
Can we use the PHP view that single quotes don't contain variables, but double quotes do... this may help the parser in speed, but more importantly it means the programmer doesn't have to check for and escape variables in single quoted strings.
The text was updated successfully, but these errors were encountered: