text:
Having trouble moving mails

I am trying to use MailKitSimplified to monitor an inbox, and try to process messages as they appear. Thi is wokring fine and was very easy to implement with MKS. What I want to do is move successfully processed messages to a Processed folder, but I can't seem to work out how to do it. Something like this
var mimeMessages = await imapReceiver.ReadMail
                    .GetMimeMessagesAsync(ct);
                foreach (var msg in mimeMessages)
                {
                    // Some code to parse and do stuff to the message
                    // Now it's parsed and dealt with, moce to Processed (summaries was fetched earlier to xref MessageId and uid)
                    var uid = GetUniueId(summaries, msg.MessageId);
                    if (uid != UniqueId.Invalid)
                    {
                        await imapReceiver.MailFolderClient.MoveToAsync(uid, "INBOX.Processed", ct);
                    }

But the last line always gives me the error
2024-05-15 10:23:56.3770 [ERROR] MailKitSimplified.Receive: mailserver.hostpresto.com alasdair@attar-richardson.com INBOX 10107 not moved to . MailKit.FolderNotOpenException: The folder is not currently open in read-write mode.
   at MailKit.Net.Imap.ImapFolder.CheckState(Boolean open, Boolean rw)
   at MailKit.Net.Imap.ImapFolder.MoveToAsync(IList`1 uids, IMailFolder destination, Boolean doAsync, CancellationToken cancellationToken)
   at MailKit.MailFolder.MoveToAsync(UniqueId uid, IMailFolder destination, CancellationToken cancellationToken)
   at MailKitSimplified.Receiver.Services.MailFolderClient.MoveOrCopyAsync(UniqueId messageUid, IMailFolder source, IMailFolder destination, Boolean move, CancellationToken cancellationToken)

I have tried opening the source and destination folders - but if I do that I open the source (it is open and connected ReadWrite) then the desitnation (open, readwrite) but after opening the destination folder the source is closed. It looks like in the MailKit code it should open the folders as necessary, but it always says 'not currently open in read-write mode', though I don't know which folder it is complaining about. I have also tried passing the opened destination folder to the MKS method which takes a folder, and just calling MoveToAsync on the source (INBOX) folder. Nothing seems to work, I must be doing somehting worng but no idea what.

Not sure why the code is not formatting.. Will try 3 backticks instead of the code button
             var mimeMessages = await imapReceiver.ReadMail
                    .GetMimeMessagesAsync(ct);
                foreach (var msg in mimeMessages)
                {
                    // Parse and process the message
                    // Now it's parsed and dealt with, move to Processed
                    var uid = GetUniueId(summaries, msg.MessageId); // fetched earlier for xref msgId -> uid
                    if (uid != UniqueId.Invalid)
                    {
                        await imapReceiver.MailFolderClient.MoveToAsync(uid, "INBOX.Processed", ct);
                }

PS just adding here in issues as Discussions seems to be empty and not sure where elks to ask for help ...

"INBOX 10107 not moved to ." That means the destination is blank. Try "INBOX/Processed" 🙂

Also there's an easier way of doing this that I forgot to put in the wiki, https://github.com/danzuep/MailKitSimplified/blob/4680ab7afd2edb8468e2bcc692448ca5b1815d84/source/MailKitSimplified.Receiver/Extensions/MessageSummaryExtensions.cs#L392
await msg.MoveToAsync(destinationMailFolder, ct);

I did it this way:
    private async Task SendToArchiveAsync(IMessageSummary messageSummary)
    {
        IMailFolder archiveFolder;

        try
        {
            archiveFolder = await messageSummary.Folder.GetSubfolderAsync(_archiveFolderName);
        }
        catch (FolderNotFoundException)
        {
            archiveFolder = await messageSummary.Folder.CreateAsync(_archiveFolderName, isMessageFolder: true);
        }

        await messageSummary.MoveToAsync(archiveFolder);
    }

Because of it thows exception if you try to find subfolder that not exist.

Thanks for your quick responses. I have to go out to play music now but will try these options first thing tomorrow and let you know if that is working ...

Here's that translated into code (using parts of @Sylar-A's answer):
var destinationFolder = await GetOrCreateSubfolderAsync("INBOX/Processed", null, ct);
foreach (var msg in await imapReceiver.ReadMail.GetMimeMessagesAsync(ct))
{
    // Some code to parse and do stuff to the message
    await msg.MoveToAsync(destinationFolder, ct);
}

    async Task<IMailFolder> GetOrCreateSubfolderAsync(string mailFolderName, IMailFolder? baseFolder = null, CancellationToken cancellationToken = default)
    {
        if (baseFolder == null)
            baseFolder = _imapReceiver.ImapClient.Inbox;
        IMailFolder mailFolder;
        try
        {
            mailFolder = await baseFolder.GetSubfolderAsync(mailFolderName, cancellationToken);
        }
        catch (FolderNotFoundException)
        {
            mailFolder = await baseFolder.CreateAsync(mailFolderName, isMessageFolder: true, cancellationToken);
        }
        return mailFolder;
    }

I'll add that function to MailFolderClient in a future release 🙂

I tried this solution this morning and it works beautifully, thanks for your help @danzuep and @Sylar-A. Incidentally Dan you suggested using folder INBOX/Processed instead of INBOX.Processed but that was what I first tried and I got MailKit.FolderNotFoundException: The requested folder could not be found. the one iwht the dot was in the list of folders returned by imapReceiver.GetMailFolderNamesAsync, so maybe my email provider does things differently. Anyway when i do this for real for the charity I am doing work for it will be on gmail which I suspect will be a whole other bundle of fun.

PS thanks for providing this great library.

Actually looking more closely at your solution I see you are calling MoveToAsync on the MimeMessage rather than the summary - but that does not appear to have that method? At least in the version I am using which seems to be 4.5.0.

Here's the latest version of this library: https://github.com/danzuep/MailKitSimplified/releases
I've fixed my post, getting the folder once is much more efficient than getting it every single time a new email comes in.

PS thanks for providing this great library.

Please star the repository to show your thanks!

authors: Sylar-A alasdair-richardson danzuep

repo: danzuep/MailKitSimplified


text:
Docker processes still running after exited

Expected Behavior
Docker processes must be stopped/killed once darp and app exited successfully
Actual Behavior
Darp and App exited successfully, however docker processes are still running
Steps to Reproduce the Problem
Run samples 1 hello-world and then send terminate signal
terminated signal received: shutting down
== DAPR == time="2019-10-22T21:37:32+11:00" level=info msg="dapr shutting down. Waiting 5 seconds to finish outstanding operations"
== DAPR == time="2019-10-22T21:37:32+11:00" level=info msg="stop command issued. Shutting down all operations"
✅  Exited Dapr successfully
✅  Exited App successfully

docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                      NAMES
9d6616adcd23        daprio/dapr         "./placement"            4 days ago          Up 8 hours          0.0.0.0:50005->50005/tcp   dapr_placement
0a47863f673c        redis               "docker-entrypoint.s…"   4 days ago          Up 8 hours          0.0.0.0:6379->6379/tcp     lucid_black

@sayboras thats not a big, placement and redis containers are started when you do Dapr init. These 2 containers are needed for  local development with Dapr. Redis container is needed for providing state, pub sub capabilities out of box in Dev environment. Placement service container provides distribution of actors.

source: gharchive/issue

authors: amanbha sayboras

repo: dapr/cli

license_type: permissive

license_source: github-api


text:
Logs make it sound like everything is fully running when not

The dapr runtime will wait for the app to listen on the port given in --app-id.  If it does not, this will wait forever:
== DAPR == time="2020-05-24T13:13:57.8317813-06:00" level=info msg="application protocol: http. waiting on port 5000.  This will block until the app is listening on that port."

However this will print afterwards, making it sound like everything is ok:
⚠  Could not update sidecar metadata for cliPID: PUT http://127.0.0.1:3501/v1.0/metadata/cliPID giving up after 5 attempts
✅  You're up and running! Dapr logs will appear here.

These should be clarified.
From #345.

I still got error in the dapr version 0.9.2 java SDK when i follow the doc.
my command is:
dapr run --components-path ./components --app-id someservice --app-port 3000 --dapr-http-port 3005 -- java -jar target/dapr-java-server-exec.jar com.dapr.someservice -p 3001
dapr version:

error:

authors: LMWF ZhangX-Byte


text:
Update to Go 1.17

Describe the feature
Update components-contrib to compile with Go 1.17.
Release Note

RELEASE NOTE:

Open https://github.com/dapr/components-contrib/issues/1261 for replacing deprecated protobuf/ptypes package which causes ci-lint failure.

authors: CrazyHZM taojwmware

repo: dapr/components-contrib


text:
Question: Support for chunked transfer encoding & JSON streaming

In what area(s)?

/area runtime

Does the service to service invocation support Chunked transfer encoding if the other service responds in this format?
Follow up, does it support any JSON streaming  protocols to facilitate large data transfers?

I understand progress is being made and there is partial support.
https://docs.dapr.io/operations/support/support-preview-features/#streaming-for-http-service-invocation
@ItalyPaleAle whats the latest here? Any pertinent changes coming in 1.12? Thanks :)

Yes this should work with 1.12! It should be enabled by default and complete

@ItalyPaleAle does that mean there needs to be a docs change to something like this ?

authors: ItalyPaleAle danielgerlag olitomlinson

repo: dapr/dapr


text:
Mark actors healthy on no app channel or actor entities

Mark actors as always healthy when there is no app channel or their have been
no actor entities (actor types) provided by the application config endpoint.
This is important for enabling actor related APIs such as workflows, which
don't rely on the application implementing actors itself.
Adds integration tests for actor healthz endpoints Most importantly, ensuring
that actors are marked as always healthy when the both the application healthz
endpoint is disabled, and the application reports no actor entities.
Closes #7355

@JoshVanL The IT seem to failing in the specific test that was written in this PR.

Thanks @mukundansundar, it's clear this PR is causing some kind of unexpected side effect somewhere. I'm taking a look

This is a regression because a sidecar that does not host actors can always use actors that are hosted by other instances. If this is the case, this is a hotfix.

source: gharchive/pull-request

authors: JoshVanL artursouza mukundansundar


text:
Add docs for namespaced RBAC mode on K8s

Add docs for functionality added in https://github.com/dapr/dapr/pull/5801.

After examining this further, there's no special docs needed for this outside of the Helm documentation.

repo: dapr/docs


text:
dapr.msi on peut pas le telecharger

What content needs to be created or modified?

Describe the solution you'd like

Where should the new material be placed?

The associated pull request from dapr/dapr, dapr/components-contrib, or other Dapr code repos

Additional context

The Dapr MSI installer is documented here https://docs.dapr.io/getting-started/install-dapr-cli/#install-using-msi-installer and available here https://github.com/dapr/cli/releases

authors: msfussell zaidtidjet


text:
Adding doc on Kubernetes health Probe configuration with Dapr /healthz

Adding document describing /healthz health endpoint in Dapr . Liveness/Readiness in Kubernetes and its configuration in Dapr sidecar container
Issue reference
Closes #475
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[ ] Code compiles correctly
[ ] Created/updated tests
[x] Extended the documentation

I would add a paragraph that explains the health endpoints are not tied to Kubernetes and can be used with any ochestrstor.

I do not agree with the words in this doc. This needs updating

I do not agree with the words in this doc. This needs updating

Lets go through this in sync up, we can revise.

authors: msfussell shalabhms yaron2


text:
Reduce verbosity for Grpc libraries in Java SDK

Expected Behavior
When using GRPC (IT or examples), the output is verbose because it prints DEBUG
Actual Behavior
Only print INFO and above.
Steps to Reproduce the Problem
Run any example or IT that uses Grpc.

Issue resolved now via reducing verbosity. Log level is now INFO for those classes.

repo: dapr/java-sdk


text:
Do you have a change log?

I have and previous version of your plugin 2.1.1. Visual Studio tell me that you have a newer version 2.3.0 but I couldn't find the change log of your project or any release, here in github neither in npmjs.com.
Do you have a changelog ?
It will be nice to see what new I can do with this awesome plugin.

I saw that you start to manage releases.
Nice job @dapriett

repo: dapriett/nativescript-google-maps-sdk

license: mit

license_source: bigquery


text:
Read the docs

This PR makes some updates in tutorial 1 and mainly adds tutorial 2 for NAS parallel benchmarks. gem5 configuration/run scripts used to run NPB with gem5art are part of this PR as well.

This is rebased on the master now!

I also went through and marked all comments as resolved that I could tell were resolved. Feel free to mark others if I missed any.
Could you add a link to this PR in Jira if it doesn't exist already :).

Looking good! Thanks for all of the updates!

Probably should merge this soon :)


text:
Link in README points to V1

Hi,
The link and corresponding download command in the README (https://github.com/darius522/dnr-utils#download) points to V1 version of the dataset.
I used that command to download the old version, and now I have to re-download V2.
Or is there a way to just download the difference between V1 and V2?
Also, is V1 a subset of V2 or are they completely different?
Since the number of extra files is not too large, I am thinking if I should just use V1.

Hi,
Thanks for the inquiry. We tried to update most documentation when we release v2 but it looks like the README was overlooked. Apologies for that. Zenodo does warn you about the existence of a newer version though ;)
v2 is completely different from v1 in terms of its content, you would therefore have the re-download the dataset in its entirety. Depending on the nature of your project, v1 might be fine. But in most case, I would just advise people to use the most up-to-date version, if possible.
-Darius

Ah, I see!
Ok, yeah, I saw this on Zenodo just a while back, but while downloading I used the command in the repository since I was downloading on a server without GUI. I should have checked more closely.
Anyways, I will download the new version.
Have a nice day 🌞

license: MIT


text:
scheduling  pgbadger every day

PostgreSQL 11.5, pgabdger 11.1
Hello,
I want pgbadger to parse log every day between 8 AM and 18 PM.
I write :
perl.exe pgbadger c:/.../log/postgresql-3.log -I --retention 2 -d activite -b "08:00:00" -e "18:00:00" -O c:/.../pgbadger
It returns :

unrecognized signal name "USR2" at pgabdger line 3932.

What doest it mean ?
Thanks

These are the debugging lines. I noticed an out.html in the pgbadger directory instead of the one specified by -O.

I am a bit confused.

Hi,
Normally USR2 signal is not used on Windows operating system but there is still a call that do not respect this exception. Commit d5558c9 might fix it.
Please use latest development code and let me know if the issue with output dir persist.

It sounds good for USR2. Thanks
But I still can't get the log be parsed between 08:00:00 and 18:00:00 :

only index.html is created when I use the task scheduler :
perl.exe pgbadger C:/"Program Files"/PostgreSQL/11/data/log/postgresql-1.log -I --retention 2 -b "08:00:00" -e "18:00:00" -d activite -O C:/ms4w/Apache/site/pgbadger
perl.exe pgbadger C:/"Program Files"/PostgreSQL/11/data/log/postgresql-2.log -I --retention 2 -b 08:00:00" -e "18:00:00" -d activite -O C:/ms4w/Apache/site/pgbadger
...
I test in cmd line, here what I get and nothing is created :

The problem is that pgBadger port to Windows is broken, it still need to be fixed. I don't have time for the moment but this is a high priority for next release.

Fixed in last development code, a new release is coming.

authors: Inrap darold mcunault

repo: darold/pgbadger

license: PostgreSQL


text:
Is AutoMoq should work with asp.net core?

when trying install it i got:
"Package AutoMoq 2.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package AutoMoq 2.0.0 supports: net45 (.NETFramework,Version=v4.5)"

Hmm... I think.
Guess it's time I learn how to port these libraries over. :smile:

Installed dot net core. So long as I can map unity and Moq to this library, this is gonna work.

@arielcloud I started the work to port to core, and it seems that it won't be too difficult.
However, AutoMoq is very dependent on Moq, which doesn't seem to have a working version in core yet.  The copy of core-supporting Moq that I'm using comes from https://www.myget.org/F/aspnetcidev/api/v3/index.json, which is fine for development but can't be released.
I'll get this core version ready to go, but until moq is updated I won't release.

Thanks a lot.
please update here or at #36 once i can use it on core. (also before release). 10x!

@darrencauthon moq is updated :) can u release?

I'll take a look soon, thanks!

You can use Moq with net core, you need in your project.json:
 "dependencies": {
        "NUnit": "3.5.0",
        "dotnet-test-nunit": "3.4.0-beta-3",
        "Moq": "4.6.25-alpha"
    },
    "frameworks": {
        "netcoreapp1.0": {
            "imports": [
                "dotnet54",
                "portable-net45+win8" ,
                "dnxcore50",
                "netcoreapp1.0"
            ],
            "dependencies": {
                "Microsoft.NETCore.App": {
                    "type": "platform",
                    "version": "1.0.1"
                }
            }
        }
    },

Thank you @JPBlancoDB ! :smile:

They are already at 4.6.38-alpha :)

I did see a video on Dot Net Core on Youtube... I think this is going to be easy to do this weekend.
Or did I just doom myself?

@darrencauthon That's it. You promised it over the weekend. Now you just have to! :)

I will give it an honest try! :smile:

I had a wonderful weekend with the kids... I barely touched a computer.
I'm going to do the 24 pull request challenge this December, and this is going to be a big piece of it.  So I will get to this ASAP. :smile:

Any news on this?
Thanks

@darrencauthon Have you progressed on .NET Core port ? It really interest us

I have, in a way. I've gotten tons of help with porting another one of my libraries to Core, and it's shown me another strategy.
It's just a matter of time. The last few months have been pretty hectic for me, as can be noted by my github stats. As soon as I can sit in front of a computer for 2-3 hours, I think I can knock it out.
On Fri, Feb 3, 2017 at 6:53 AM -0600, "Christophe" notifications@github.com wrote:
@darrencauthon Have you progressed on .NET Core port ? It really interest us
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Could you catch up some time to spend on porting the libraries to .Net Core?

Eventually, I'm really sorry... juggling a lot of stuff these days. 🤹♂

+1 for having support for .NET Core

+1 for .Net Core support.    I discovered this package from Mathew Renze's Writing Testable Code course on PluralSight.  Now it is less fun to develop without.

meanwhile u can try autoFixture

I was just checking up on the status of the .NET Core port and saw that @careLearning mentioned my Clean Architecture course. Good to see that it's generating interest in AutoMoq! : )

Not my repo, but I found a "fork" that supports .net standard 2.0: https://github.com/ThomasHenrique2/AutoMoqCore

Thanks, @celluj34. I migrated to AutoMoqCore.

Moq has added Moq.AutoMocker. The method names are different but its basically a drop in replacement and appears to be active.

authors: JPBlancoDB MihaMarkic NicolaasVB arielcloud careLearning cdie celluj34 collinprice darrencauthon farzadmf giggio matthewrenze onlyforkbj

repo: darrencauthon/AutoMoq


text:
System.AccessViolationException When Referenced Variable Missing

I found an issue when compiling from a content string and global variable is not declared.
Here is the invalid scrubbed input string:

$color-primary	:#339999;
$color-secondary	:#000000;
@import "C:\Source Code\svn\DEV\Web\css\scss\styles.scss"

Here is the valid scrubbed input string:

$color-primary	:#339999;
$color-secondary	:#000000;
$logo-path		:'http://localhost/Images/image.jpg';
@import "C:\Source Code\svn\DEV\Web\css\scss\styles.scss"

Here is the code used to execute the string:
using (SassCompiler compiler = new SassCompiler())
{
	CompilationOptions options = new CompilationOptions
	{
		IncludePaths = new List<string> {scssSourceDirectory},
		OutputStyle = OutputStyle.Compressed
	};

	CompilationResult results = compiler.Compile(content, null, null, options);
	css = results.CompiledContent;
}

Here is the exception:
System.AccessViolationException was caught
  HResult=-2147467261
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=LibSassHost.Native-Proxy
  StackTrace:
       at LibSassHost.Native.Helpers.MarshallingHelper.custom_strdup(SByte* value)
       at LibSassHost.Native.Helpers.MarshallingHelper.UnmarshalConstString(SByte* value)
       at LibSassHost.Native.SassNativeCompiler.FillManagedContextError(SassContext context, Sass_Context* ctx)
       at LibSassHost.Native.SassNativeCompiler.Compile(SassDataContext dataContext)
       at LibSassHost.SassCompiler.Compile(String content, String inputPath, String outputPath, CompilationOptions options)...

I just pushed the latest bits to nuget, can you try with those? Not sure where libsasshost namespace is coming from though.

I guess this issue is not related with libsass-net but this one: https://github.com/Taritsyn/LibSassHost

ah ok, closing then.

@joaope and @darrenkopp: Sorry about that guys! I'll post over there.

authors: csteele-gl darrenkopp joaope

repo: darrenkopp/libsass-net


text:
package android.support.v4.content does not exist

Error: "package android.support.* does not exist"
This plugin has old android support dependencies instead of using the new AndroidX equivalent.
Cannot add the plugin.

Which version of this Plugin are you using?  AndroidX support did not work for everybody back when it was first implemented it so I did the following:

For Android X Support please use version >= 2.x.x
For Android Support Library please use version 1.3.x

Which version of this Plugin are you using?  AndroidX support did not work for everybody back when it was first implemented it so I did the following:

For Android X Support please use version >= 2.x.x
For Android Support Library please use version 1.3.x

How can i download zip file for 1.3.0 version?

How can i download zip file for 1.3.0 version?

npm pack com-darryncampbell-cordova-plugin-intent@1.3.0

npm pack com-darryncampbell-cordova-plugin-intent@1.3.0


text:
Add the counter app into the DartPad Samples dropdown

The counter app is a really nice starter application for folks to learn and play with Flutter. Please add it to the list of samples on the new DartPad. For reference, this is the app I am referring to: https://flutterbyexample.com/dissecting-the-counter-app/

@RedBrogdon @johnpryan

@johnpryan Should this be closed?

Yes, this has been added to the samples dropdown.

authors: RedBrogdon johnpryan zoeyfan

repo: dart-lang/dart-pad


text:
Adds a documentation panel

Not yet perfect, but as you can see in the gif, I'm almost out of battery ;)

enabled the markdown now:

looks a bit better, links are also clickable, but I'm not sure how I can get those external links to open in a new tab

Very impressive! It fits in very well with our current UI, and is easily discoverable by users.

@lukechurch What do you think about when to trigger a request for documentation ? It now basicly auto-updates when the user navigates with rrow keys, in the completion popup, or in the editor.

@kasperpeulen I really like the auto-updating on navigation behaviour, I think sending doc requests on nav-keystrokes but not edit keystrokes should be fine.
It's possible we might also want to do something more temporary if you mouse-linger over an element.
It's getting a bit late here, but I'll try and pull this in tomorrow and have a play with it.

(PS, thanks, this is great!)

merging - thanks!

authors: devoncarew kasperpeulen lukechurch


text:
GitHub Sync

This is an automatically generated pull request.

Feel free to squash/merge and delete the branch if you're happy

repo: dart-lang/intl


text:
[infra] Hide TODOs from problems view in VSCode

Neat trick from https://dart-review.googlesource.com/c/sdk/+/338589.

coverage: 92.629%. remained the same
when pulling 1d4f4e5cf08ecfceac06a31c89d29be7fc29db6c on hide-todos
into 1748715993329c2b96fdb01d9b8baed774417d9e on main.

authors: coveralls dcharkes

repo: dart-lang/native


text:
Better "Documentation" link from pub package page

Here's the current link text for documentation:

The link text is always: "pub.dartlang.org/documentation/...". This is not very useful.
Maybe just link the word "Documentation"? Maybe not make bold? Maybe link to "/documentation/"?

@mit-mit

As discussed, let try to pull things up like this:
About
Flutter plugin for displaying inline video with other Flutter widgets on Android and iOS.
Homepage, API Docs

How about moving this to a Tab instead? This is the primary thing I come to the pub site for now, but it always takes me a second to remember where to find it.

I think this is a lot more discoverable and its worth surfacing as a first class item for the package.

Making it tabs has been discussed and postponed for now, because it requires to solve a couple of design problems, a few examples:

What should happen with the dartdoc-specific search? How to integrate it with the site search, filter only on the currently selected package version?

How shall we handle the design of the dartdoc-content, which is assuming to own the entire page? Slapping the tab bar on top of it may be easy, but the header and tabs contain a few dynamic information (analysis score, platform tags, latest versions), and visually seamless integration requires some design work.

Until these happen, we'll have #1194 as an interim solution. However, would you mind to open a new issue with the screenshot? I'd like to have it tracked here too (but the current one will be closed once the PR lands).

What should happen with the dartdoc-specific search? How to integrate it with the site search, filter only on the currently selected package version?

Oh - so I guess this isn't intuitive, but I was actually envisioning this just being a link to the same page that exists today. Not an actual tab. Maybe some extra UI could indicate that while still leaving it in the prominent position at the top?

Something like this?

Yeah, but that doesn't solve the UX-related issue - the inconsistent content flow: the other tabs stay on the same page, showing different content, while this would navigate to a different URL. Furthermore we still need to match the design there to remain consistent.
Again: we want to do it eventually, but not right now.

Yeah, but that doesn't solve the UX-related issue - the inconsistent content flow: the other tabs stay on the same page, showing different content, while this would navigate to a different URL

Ya - I tried to highlight that its not a tab but its hard because the tabs don't have borders or background colors to distinguish them as tabs (if they did this could more much more easily be differentiated). I think they would look a bit better that way anyways but thats just me ;).

Furthermore we still need to match the design there to remain consistent.

I don't think this is an issue as long as its clear its a link and not a tab.

We could also consider pulling it up into the links right below the package name?

The issue for me is it seems to be most similar to the things that are tabs. It just doesn't seem to make sense anywhere else to me personally.

https://github.com/dart-lang/pub-dartlang-dart/issues/1214 makes this a bit more complicated:

we have our generated content,
the package may specify its URL for documentation, which may be (a) 404, (b) a generic homepage, or (c) a dartdoc-generated content.

I think we should display both the pub-generated API docs, and the documentation link.

Putting the pubspec-provided Documentation link after the Homepage is not looking as good as I would have expected:

We've deployed a new version of the homepage and documentation link handling, which also includes the pubspec-provided documentation link.

Yeees yes yes yes yes I love it! I'm so excited about everything pub! It's so beautiful now, thanks @isoos !!

authors: isoos jakemac53 mit-mit srawlins

repo: dart-lang/pub-dartlang-dart


text:
'pub cache remove' command

This issue was originally filed by @kaendfinger

A 'pub cache remove' command would be nice for people like me who experiment with pub's internals, or for people who have limited space. Works just like add but does the opposite.

This issue has been moved to dart-lang/pub#1075.

repo: dart-lang/sdk


text:
The debugger should not rely on packages symlinks

This issue was originally filed by @zoechi

I tried the option --no-package-symlinks mentioned here http://dartbug.com/15103#c22 but I wasn't able to use the the DartEditor debugger without the packages symlinks.
Currently every time I change a source code file the used Docker image is rebuilt and this needs to run pub get twice which takes very long (30 - 60 sec).
If the symlinks wouldn't be necessary I had more options to accelerate this process.
What steps will clearly show the issue / need for enhancement?
1.
When I connect the DartEditor debugger using menu "Run > Remote Connection..." > [OK] the app fails.
See this discussion https://groups.google.com/a/dartlang.org/d/msg/cloud/OK1nJtg7AjQ/u-GzUDI-0VIJ for more details about how to set up such a development environment.
I assume this can also be reproduced by a simple Dart project with one package dependency.
2.
3.
What is the current output?
Uncaught Error: FileSystemException: Cannot open file, path = '/app/bin/packages/path/path.dart' (OS Error: No such file or directory, errno = 2)
when I connect the debugger to the running app.
What would you like to see instead?
Should work
What version of the product are you using? On what operating system?
Dart VM version: 1.8.0-dev.4.6 (Wed Nov 26 06:04:36 2014) on "linux_x64"
Please provide any additional information below.
related to http://dartbug.com/15103

This issue has been moved to dart-lang/eclipse3#29.


text:
join elimination

Pull instruction from join into predecessors when it can be eliminated in all but one predecessor.

Obsolete.  SSA has a related problem but there is a separate issue for that.

authors: rakudrama sigmundch


text:
Static variables are reused in local isolates with --fast-startup

The co19 test co19/LibTest/isolate/Isolate/spawn_A04_t04 is failing on a very diverse collection of platforms.  The test should be investigated to see if it is pointing out a real failure in the async library.
It is failing if:  $compiler == dart2js && ($runtime == jsshell || ($fast_startup && ($runtime == safari || ($minified && $runtime == d8))))

This is not an isolate problem. Changed the title accordingly.
This is a bug in the --fast-startup emitter. Static variables variables are reused in different local isolates.
This is not a problem for browsers as long as they support webworkers. However, in d8 and browsers that don't support webworkers we fall back to local isolates (where we run them in the same JS isolate).
The fast-startup emitter doesn't separate the static variables of the local workers.
Example:
import 'dart:isolate';

final fin = () { print("initializing fin"); return true; }();
int global = 0;

f(arg) {
  print("calling lazy global");
  var x = fin;
  print("called");
  print("global: $global");
}

main() {
  f(null);
  global++;
  Isolate.spawn(f, null);
}

Run it with and without --fast-startup.
I have a vague memory of this being on purpose since it simplified the compiler and the output. If I remember correctly we agreed that isolate tests would need to be run with content_shell.
/cc @sigmundch : do you remember if that's what we had agreed on?

I honestly can't recall whether we discussed where to run isolate tests, but running them only in content_shell seems like a fair requirement.
In general - if we only to support isolates when webworkers are available, should we change the isolate library to fail proactively in that case & delete the local isolates logic?

@floitschG - what do you think about failing proactively and deleting the local-isolates logic?
Regarding this original bug, I'll mark it as "wont fix". FYI - after some fixes to custom-elements + js-interop, the test is now passing in safari. The test is only failing on d8 and jsshell.

authors: floitschG sigmundch whesse


text:
Move DDC to using the new analysis driver

The current status for running DDC presubmit checks:
01:11 +4985 -3: Some tests failed.

what are the 3 tests, out of curiosity? could it be expected failures because the inference behavior changed (per the new spec)?

Analysis Server crashes (I think with stack overflow) in:
codegen dartdevc language/covariant_override/tear_off_type_test
codegen dartdevc language/cyclic_typedef_test_10_multi
codegen dartdevc language/cyclic_typedef_test_11_multi

For example on this:
typedef A<T extends A>();

What is expected to happen here at all?
I find it hard to track all the informal specification changes floating around.

it's supposed to be a compile time error, right?

Yes, I think so.

any updates on this?

No new work was done since a week ago :-(
I'm still working on top-level type inference, which turned out to be much bigger than I initially anticipated.

Does this still need to be done for 1.23?

No, it doesn't.
I planned to do this, so put it preliminary into the closest version, but was not able to finish it yet.

Any updates here? Happening for 1.23?

The CL is out for review.
But there is one issue where I need help from DDC people..

Oh gosh, my bad! I've replied there @scheglov ... and I just want to say here, the change looks lovely, thanks for putting so much work into making it such an elegant patch.

What's the status of this?  Ready for 1.24?  If not, do we need it?

I sent a patch to @scheglov to fix the CL. I'm not sure however if it's correct in general. There seems to be a behavior change for custom URL mappings. However it does fix async_helper to compile despite that.

Thank you.
This improves the situation with tests.
But there are still 21 tests failing, and I don't know whether I qualify to perform initial triage of these tests.
browser_tests_fail_20170510.txt

@vsmenon is this happening for 1.24?

Current theory is we won't need to do this, because DDC will migrate to Kernel. But if we see problems with the current DDC approach, we should revisit this.

authors: bwilkerson dgrove jmesserly scheglov vsmenon


text:
optimize storage of signatures

DDC is using defineLazyProperty for things where it is overkill, such as signatures, and this costs memory. Also having seen the signature code recently, I suspect we can make other improvements to it.

I fixed this somewhat; the internal lazy getter code is faster and we no longer build a signature object only to immediate destructure it into individual properties.
There's more to do here, though. Once we remove mirrors, we can remove most signature data, and focus it towards what dynamic dispatch and tear-offs need, rather than keeping full function types for every member.

also I'm going to dupe this against https://github.com/dart-lang/sdk/issues/30499


text:
DDC/Dart2JS: Guidance on JS-interop Arrays, please!

Problem
We have a e2e testing code path in AngularDart that reads and writes to a global Array, i.e. window.ngTestabilityRegistries, as an example. If this variable does not exist, the framework creates it (via a Dart List literal - []), and if it already exists, the framework just uses it.
It turns out that DDC and Dart2JS do not agree on what a JSArray is (via @rakudrama):

In ES6 it is possible to subclass Array.
I believe DDC uses this feature.
The Dart2JS interceptor code does not recognize these as Arrays.
I am going to investigate using Array.isArray(x) in our interceptor code instead of the x.constructor===Array check. Last time I checked, Array.isArray was slower.

Resolution
I need either:

For Dart2JS to understand sub-classed Arrays (ES6+ feature)
A more temporary path forward to always creating an Array directly. Will this work?

@JS()
library js_Interop;

import 'package:js/js.dart';

@JS('Array')
abstract class _JsArray {
  external factory _JsArray();
}

/// Always creates a normal `window.Array` (in both Dart2JS and DDC).
List<dynamic> createJsArray() => _JsArray() as List;

/cc @rakudrama @jmesserly

Another option is I could monkey patch the .constructor property in DDC to make Dart2JS understand it.

DDC's List<dynamic> will be a normal JS array, would that work for you? (subclassing Array is only used for generics)
I agree that dart2js should understand subclassed arrays though.
I'm curious how dart2js is getting a DDC array? Are there like 2 Dart apps on the page, using JS interop to talk to each other or something like that?

@jmesserly:

Are there 2 Dart apps on the page, using JS interop to talk to each other...

Yup!

Here's an example, FWIW:
@JS()
library foo;

import 'package:js/js.dart';

@JS()
external set ngTestabilityRegistries(List<dynamic> value);

main() {
  ngTestabilityRegistries = [];
}

dartdevc compiles that to this:
test.main = function() {
  dart.global.ngTestabilityRegistries = [];
};

If I add these prints:
  console.log(Array.isArray(dart.global.ngTestabilityRegistries));
  console.log(dart.global.ngTestabilityRegistries.constructor === Array);

I get True True

Thanks!

authors: jmesserly matanlurey


text:
Please improve the usability of gen_bytecode_test

This test is not ideal because it's testing the bytecode generator and expecting it to produce the same output for possibly different inputs.  When something changes in Fasta we often have to either regenerate the expectations or mark this test as failing.
The test output is nearly unusable.  When it fails it gives a useless stack trace.  Catch this and give a useful message.  It dumps out a whole bunch of expected and actual output that is not formatted like the expectation file.  It's got leading whitespace, quotes, and escaped newlines.  Format this like the expectation file.
There are no instructions to tell me how to rebase the expectations.  Please add simple instructions ("run this command" or "create a file named this with these contents").
Nobody on the CFE team really has the expertise to know if the expectations are correct or not, so I've just gone with option B and approved that the test is currently failing.

/cc @alexmarkov

OK, I didn't commit the CL with the test failure yet.  It's https://dart-review.googlesource.com/c/sdk/+/98664 which fails because we are currently (and temporarily) allocating more context variables in the async translation.
How do I regenerate the expectations, and can it be made more discoverable?

In order to re-generate expectations please run the following script:
tools/test.py -m release -r vm --vm-options -Ddump.actual.result=true pkg/vm/test/bytecode/gen_bytecode_test

for i in `find -name *.actual`
do
  mv $i `echo $i | sed -e s/.actual/.expect/`
done

Thank you for the suggestions! In addition, does it make sense to unify re-generation of expectations with front-end tests?
Also, I'm not sure that these test are very useful now, as we have functional testing of bytecode pipeline on dartkb bots, so we can consider removing them.

Thanks for the instructions.  I'm sorry to have sounded so frustrated in the initial report.

Sample test output with https://dart-review.googlesource.com/c/sdk/+/98946:
00:00 +0: gen-bytecode /usr/local/google/home/alexmarkov/work/dart/sdk/pkg/vm//testcases/bytecode/literals.dart
00:00 +0 -1: gen-bytecode /usr/local/google/home/alexmarkov/work/dart/sdk/pkg/vm//testcases/bytecode/literals.dart [E]

  Result is different for the test case file:///usr/local/google/home/alexmarkov/work/dart/sdk/pkg/vm//testcases/bytecode/literals.dart

  The first difference is at line 672.
  Actual:     Entry                2
  Expected:   EntryOptional        2, 1, 0

  This failure can be caused by changes in the front-end if it starts generating
  different kernel AST for the same Dart programs.

  In order to re-generate expectations run tests with -DupdateExpectations=true VM option:

    tools/test.py -m release --vm-options -DupdateExpectations=true pkg/vm

  In order to dump actual results into .actual files run tests with -Ddump.actual.result=true VM option:

    tools/test.py -m release --vm-options -Ddump.actual.result=true pkg/vm

  package:test/src/frontend/expect.dart 160:30       fail
  pkg/vm/test/common_test_utils.dart 124:7           compareResultWithExpectationsFile
  pkg/vm/test/bytecode/gen_bytecode_test.dart 46:3   runTestCase
  ===== asynchronous gap ===========================
  dart:async/future_impl.dart 22:43                  _Completer.completeError
  dart:async-patch/async_patch.dart 40:18            _AsyncAwaitCompleter.completeError
  pkg/vm/test/bytecode/gen_bytecode_test.dart        runTestCase
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1053:19                       _CustomZone.registerUnaryCallback
  dart:async-patch/async_patch.dart 77:23            _asyncThenWrapperHelper
  pkg/vm/test/bytecode/gen_bytecode_test.dart        runTestCase
  pkg/vm/test/bytecode/gen_bytecode_test.dart 56:32  main.<fn>.<fn>
  package:test/src/backend/declarer.dart 168:27      Declarer.test.<fn>.<fn>.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1053:19                       _CustomZone.registerUnaryCallback
  dart:async-patch/async_patch.dart 77:23            _asyncThenWrapperHelper
  package:test/src/backend/declarer.dart             Declarer.test.<fn>.<fn>.<fn>
  package:test/src/backend/invoker.dart 250:15       Invoker.waitForOutstandingCallbacks.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1045:19                       _CustomZone.registerCallback
  dart:async/zone.dart 962:22                        _CustomZone.bindCallbackGuarded
  dart:async/timer.dart 52:45                        new Timer
  dart:async/timer.dart 87:9                         Timer.run
  dart:async/future.dart 174:11                      new Future
  package:test/src/backend/invoker.dart 402:11       Invoker._onRun.<fn>.<fn>.<fn>

@kmillikin please comment here or on the CL if not all concerns are addressed or you have further suggestions. Thanks!

Thanks!  This looks good.

authors: alexmarkov kmillikin


text:
[gardening] Test ffi/function_stress_test/1 is timing out.

Marking the test as Slow did not help as expected.
Cl https://dart-review.googlesource.com/c/sdk/+/100284 was reverted.

Uploaded https://dart-review.googlesource.com/c/sdk/+/103801 to stabilize the test.

authors: crelier sjindel-google


text:
Alternative type declaration syntax

This issue was originally filed by @simonpai

Currently the type declaration syntax is
[return type] [name]([parameter type] ...)
Perhaps it's possible to declare it as
([parameter type] ...) -> [return type] [name]?
The current way makes it difficult to introduce anonymous function type as return type. For example, if you want to declare a function type whose return type is a typed function, you are forced to name that return type. (Otherwise you have to declare it as Function and lose type information.)
typedef void A(); // forced to declare A
typedef A B();
This becomes a pain in refactoring, for instance, when you first have a type in parameter anonymously, but later requires a function to return it.
// constructor
MyClass(void a());
=>
A createA() { ... }
typedef void A();
MyClass(A a);
// Also, in Dart Editor, you wouldn't know what to write when you see "A a", as it contains no further information
IMHO, the X -> Y syntax is

more intuitive in functional programming,
easier to write down currying declaration, and
consistent with other type syntax

(As, the current syntax put function type information on both sides of the function name, while this one put all type information on one side, making it easier to do currying expression.)
You can achieve the scenario mentioned above by
typedef () -> () -> void B;
and
(() -> void) createA() { ... }
MyClass((() -> void) a);
Thanks in advance for all your effort.

I don't think it would be feasible to change how the return type is represented in an actual function declaration, but we are interested in syntax for function types.
Our current direction on that is #27527, so I'm going to close this bug out in favor of that. We did consider the -> syntax, but it looks kind of weird when you have type annotations on the left as you do in Dart:
(Foo) -> Bar baz;

Here, I think it's hard to visually tell that you're declaring a variable baz whose type is a function. The -> syntax works a lot nicer in languages where types are on the right:
var baz : (Foo -> Bar);

Alas, Dart does do that.

authors: DartBot munificent


text:
Analyzer FileSystemException

Analyzer Feedback from IntelliJ
Version information

IDEA AI-192.7142.36.36.6392135
2.8.1
AI-192.7142.36.36.6392135, JRE 1.8.0_212-release-1586-b4-5784211x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.15.4, screens 1440x900  Retina

Exception
Dart analysis server, SDK version 2.8.1, server version 1.27.4, error: FileSystemException(path=/Volumes/Elements/myphysio/code/myphysio/modules/ui/lib/rounded_container.dart; message=Cannot open file)
#0      _PhysicalFile.readAsStringSync (package:analyzer/file_system/physical_file_system.dart:210:7)
#1      _OverlayFile.readAsStringSync (package:analyzer/file_system/overlay_file_system.dart:245:18)
#2      FileSource.contentsFromFile (package:analyzer/src/source/source_resource.dart:90:46)
#3      FileSource.contents.<anonymous closure> (package:analyzer/src/source/source_resource.dart:74:14)
#4      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:256:15)
#5      FileSource.contents (package:analyzer/src/source/source_resource.dart:73:37)
#6      MoveFileRefactoringImpl._isPackageReference (package:analysis_server/src/services/refactoring/move_file.dart:176:34)
#7      MoveFileRefactoringImpl._computeNewUri (package:analysis_server/src/services/refactoring/move_file.dart:157:9)
#8      MoveFileRefactoringImpl.createChange.<anonymous closure> (package:analysis_server/src/services/refactoring/move_file.dart:145:22)
#9      ChangeBuilderImpl.addFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart:72:20)
<asynchronous suspension>
#10     MoveFileRefactoringImpl.createChange (package:analysis_server/src/services/refactoring/move_file.dart:144:27)
<asynchronous suspension>
#11     _RefactoringManager.getRefactoring.<anonymous closure> (package:analysis_server/src/edit/edit_domain.dart:968:41)
<asynchronous suspension>
#12     _RefactoringManager.getRefactoring.<anonymous closure> (package:analysis_server/src/edit/edit_domain.dart)
#13     _rootRun (dart:async/zone.dart:1184:13)
#14     _CustomZone.run (dart:async/zone.dart:1077:19)
#15     _runZoned (dart:async/zone.dart:1619:10)
#16     runZonedGuarded (dart:async/zone.dart:1608:12)
#17     _RefactoringManager.getRefactoring (package:analysis_server/src/edit/edit_domain.dart:924:5)
#18     EditDomainHandler._getRefactoring (package:analysis_server/src/edit/edit_domain.dart:811:24)
#19     EditDomainHandler.handleRequest (package:analysis_server/src/edit/edit_domain.dart:368:16)
#20     AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:319:40)
#21     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:256:15)
#22     AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:315:50)
#23     _rootRun (dart:async/zone.dart:1184:13)
#24     _CustomZone.run (dart:async/zone.dart:1077:19)
#25     _runZoned (dart:async/zone.dart:1619:10)
#26     runZonedGuarded (dart:async/zone.dart:1608:12)
#27     AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:314:5)
#28     ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:171:16)
#29     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:256:15)
#30     ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:161:47)
#31     ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:106:26)
#32     _rootRunUnary (dart:async/zone.dart:1192:38)
#33     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#34     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
#35     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#36     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
#37     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:70:11)
#38     _EventSinkWrapper.add (dart:async/stream_transformers.dart:17:11)
#39     _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#40     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:152:13)
#41     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:127:5)
#42     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:165:5)
#43     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:122:24)
#44     _rootRunUnary (dart:async/zone.dart:1192:38)
#45     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#46     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
#47     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#48     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
#49     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:70:11)
#50     _EventSinkWrapper.add (dart:async/stream_transformers.dart:17:11)
#51     _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#52     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)
#53     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:20)
#54     _Utf8ConversionSink.add (dart:convert/string_conversion.dar...

For additional log information, please append the contents of
file:///private/var/folders/l8/_gvxr5nx0kv_8ksfr12smmr40000gn/T/report.txt.

Thanks for reporting this issue! This was previously reported at #40063; please follow along there.

Duplicate of #40063

authors: srawlins superciccio


text:
Provide --use-vm-timer-behavior in dart2js and DDC

Background
Currently the only way to push an immediate event into the event queue in the standard libraries is via a zero-length timer:
Timer.run(() { });
// or
Timer(Duration.zero, () { });

This is typically used to make sure all microtasks are flushed prior to starting a new chunk of work (example).
In the VM Timer.run simply pushes an event onto the event queue. Therefore, if you call Timer.run() multiple times in a row within the same event, you schedule that many back to back events. This is consistent with the documentation about how the Dart event loop works:

https://api.flutter.dev/flutter/dart-async/Timer/run.html
https://medium.com/dartlang/dart-asynchronous-programming-isolates-and-event-loops-bffc3e296a6a
https://web.archive.org/web/20170704074724/https://webdev.dartlang.org/articles/performance/event-loop

Problem
In dart2js and DDC Timer.run is implemented via browser's setTimeout. However, setTimeout does not have the same event loop semantics. The browser allows other events to be injected between timers even if the timers are scheduled to run immediately.
This discrepancy between the VM and dart2js/DDC has caused an issue in Flutter app start-up, where on the web timers and animation frames are racing each other: https://github.com/flutter/flutter/issues/69313.
There are likely a number of places in Flutter that are broken but we're not aware of it. Finally, Flutter users need to deal with this issue in code that's meant to be shared between web and mobile.
This is likely a smaller problem for AngularDart applications because AngularDart code is web-only. Most code sharing between AngularDart and VM are small utility libraries that do not have complex lifecycles.
Proposal
Add a new command-line option --use-vm-timer-behavior in dart2js and DDC. Flutter will use this option to make sure Dart code behaves the same across mobile and web. This option is intentionally opt-in to avoid breaking existing AngularDart apps.
Alternatives

Introduce a new function in dart:async for scheduling immediate events (e.g. scheduleImmediateEvent(void Function() callback) that's a sibling to scheduleMicrotask). Flutter would use it instead of Timer.run.

Pros: explicit, simple, backwards-compatible.
Cons: adds yet another function to the standard libraries.

Allow the "embedder" of apps compiled using dart2js/DDC to provide a custom implementation of timer scheduling.

Pros: gives more flexibility to the embedders, such as Flutter.
Cons: can create fragmentation as code written for a specific behavior of timers will not work in other environments; can complicate filing/reproducing/debugging issues as the code demonstrating the issue might be relying on a custom timer behavior.

Add flushMicrotasks function. The function would run synchronously and would guarantee that there are no pending microtasks after it is done. The only remaining microtask would be the one calling flushMicrotasks.

Pros: all pros of scheduleImmediateEvent, but also fixes the issue in the engine where microtasks need to be flushed within the animation frame.
Cons: has a global effect, and therefore can be misused. For example, one library may schedule microtasks expecting that they run after some other work is done, but another library could call it, messing up the other library's lifecycle.
Unknowns: what should happen when a microtask attempts to call flushMicrotasks while microtasks are already being flushed? Perhaps, the function should not be reentrant, and throw if accessed concurrently.

/cc @sigmundch @rakudrama  @lrhn

Another option that wouldn't solve the Timer.run-semantics-differ-on-VM-and-web issue but would solve the warm-up-frame-getting-interrupted-by-real-frame issue that led to this being filed would be to have a "flushMicrotasks" feature that we could use to flush the microtasks between the two steps of the frame. That would also help with fixing the bug in the web engine whereby we don't flush microtasks between the two steps.

@Hixie interesting idea! Added it to the list of alternatives, with some pros/cons/unknowns that I could think of.

The VM does not guarantee that no events get added to the event queue between two zero-duration timers.
Example:
import "dart:async";
main() {
 Timer(Duration(milliseconds:200), () { print(3); });
 Timer.run(() { print(1); });
 var sw = Stopwatch()..start();
 while (sw.elapsedMilliseconds < 400) {}
 Timer.run(() { print(2); });
}

This prints 1, 3, 2 on the VM.
You should never assume that nothing happens between two event-loop events.
The fact that it rarely happens is an accident of implementation.
If we need a way to ensure that one event runs immediately after another, we should consider adding that functionality explicitly, not relying on accidental behavior which may not even b guaranteed in all cases.
We have no control over the event loop in the browser.
The one thing we might be able to control is the microtask loop (which is actually also using the browser's equivalent functionality when run in a browser, but not for each event - we still have our own queue on top of it, and only fall back to the browser when we need to get back after something throws).
So, what if we had a two-level microtask queue:

Top-tasks in one queue.
Normal microtasks scheduled by a top event goes into separate local queue, and only when the local queue is empty will the next top task be executed.

Then adding two consecutive top-tasks ensures that no other top task can get between them, and each has its local queue run to completeness before moving on to the next one.
It feels a little too specific to have precisely two levels. A more general approach would be to be able to wrap any callback in such a way that all its microtasks are executed on a separate queue, and the task itself is only considered done when all its microtasks are done.
I'm fairly sure I can write that, the only danger is that microtasks which throw will always be asynchronously uncaught, they can't be propagated back out because there is no way to ensure that we get back to our own microtask queue first afterwards.

The VM does not guarantee that no events get added to the event queue between two zero-duration timers.
...
If we need a way to ensure that one event runs immediately after another, we should consider adding that functionality explicitly, not relying on accidental behavior which may not even b guaranteed in all cases.

Yikes! Good to know. Yes, it sounds like we definitely need such a mechanism, since we're assuming we have one and using it in core parts of Flutter!

authors: Hixie lrhn yjbanov


text:
NNBD: Generic type parameter for constant is evaluated incorrectly in no-sound null safety mode

Dart SDK version: 2.12.0-133.0.dev (dev) (Tue Dec 8 13:04:00 2020 -0800) on "windows_x64"
Here is a simple source code example which prints true with sound null safety and false with non-sound null safety:
Type typeOf<X>() => X;

class CHECK_TOP_MERGE<T> {
  T Function(T) get f => (x) => x;
}

class A<T> {
  const A();
  void testme() { print(typeOf<int?>() == T); }
}

main() {
  const a = A<int?>();
  a.testme();
}

This is a known issue with the common front end: It uses LEGACY_ERASURE on type arguments to collection literals and <constObjectExpression>, and this eliminates ? from types (not just top-level, also List<Object?> --> List<Object*>*). The front end will change to use a different rule, which is currently being debated in here.
In any case, seems like the rules in the end will not erase ? and make <int?>[] and <int>[] canonicalize to the same object. So, this issue should be corrected and finally true should be printed in both modes.
Please nota that is a declared as non-constant, both with and without non-sound null safety true is printed in the exa,ple above.

@eernstg @leafpetersen I believe this difference is intended?

The question is what it means that type arguments passed to constant collection literals and constant object expressions are 'treated as legacy types' for execution with unsound null checking.
If we wish to ensure that constant expressions with the same syntax are canonicalized together even when one occurrences is in a legacy library and the other one is in a library with null safety, then we can use the following rule: Add * on every type argument in said terms, and consider Never to denote the type Null.
If we wish to ensure that the analyzer does not need to distinguish between sound and unsound null checking execution in order to canonicalize in a way that matches the execution then we can use this rule: Add * as before, but consider Never in opted-in libraries as a separate type. On the other hand, this means that const <Never>[] in an opted-in library will not denote the same object as const <Never>[] in a legacy library.
But I don't think we'd want a rule that canonicalizes const <int>[] and const <int?>[] to be the same object. The point is that we don't want that distinction to arise suddenly when execution switches to sound null checking mode, especially if both of those terms occur in an opted-in library. In other words, 'treated as legacy types' does not mean that we ignore ?.

authors: eernstg iarkh johnniwinther


text:
dart run should accept --[no-]sound-null-safety

dart run --no-sound-null-safety currently results in a Could not find an option named "no-sound-null-safety" error.

@mit-mit we should be safe to drop this flag across tooling now, right?

Drop as in remove? I'm not sure we're ready to that for web tooling, but not entirely sure. @a-siva ?

Ah right, that makes sense. I guess a better question is whether or not this issue is relevant anymore since we'll eventually be removing this flag for 3.0, right?

I don't think we can drop it yet, maybe sometime next year.

authors: a-siva bkonyi mit-mit


text:
iso-stress-linux tsan data race for Page::object_end()/Thread::set_top()

from log
==================
WARNING: ThreadSanitizer: data race (pid=2588)
  Read of size 8 at 0x7b7c0003fe48 by thread T7 (mutexes: write M0):
    #0 dart::Page::object_end() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h (dart+0x27808d3)
    #1 dart::Page::used() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h:92:34 (dart+0x27808d3)
    #2 dart::SemiSpace::used_in_words() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:46:18 (dart+0x27808d3)
    #3 dart::Scavenger::UsedInWords() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:159:17 (dart+0x27808d3)
    #4 dart::Scavenger::GetCurrentUsage() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:165:27 (dart+0x27808d3)
    #5 dart::Heap::RecordBeforeGC(dart::GCType, dart::GCReason) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:1033:36 (dart+0x27808d3)
    #6 dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::GCType, dart::GCReason) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:487:5 (dart+0x277f10e)
    #7 dart::Heap::CollectAllGarbage(dart::GCReason, bool) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:598:3 (dart+0x277eab3)
    #8 Dart_ExecuteInternalCommand ../../out/ReleaseTSANX64/../../runtime/vm/native_api_impl.cc:279:38 (dart+0x2e4df19)
    #9 TriggerGC ../../out/ReleaseTSANX64/../../runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc:88:3 (libffi_test_functions.so+0xb074c)
    #10 <null> <null> (memfd:dart-code (deleted)+0x644a)
    #11 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:145:10 (dart+0x24a52fb)
    #12 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24a86a7)
    #13 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:732:28 (dart+0x24a86a7)
    #14 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x24e3bbb)
    #15 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2527d43)
    #16 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x2528750)
    #17 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x2529123)
    #18 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x2746479)
    #19 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2746d37)
    #20 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x265c343)

  Previous write of size 8 at 0x7b7c0003fe48 by thread T9:
    #0 dart::Thread::set_top(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread.h:686:34 (dart+0x277e004)
    #1 dart::Scavenger::TryAllocateFromTLAB(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:261:13 (dart+0x277e004)
    #2 dart::Scavenger::TryAllocate(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:141:12 (dart+0x277e004)
    #3 dart::Heap::AllocateNew(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:84:27 (dart+0x277e004)
    #4 dart::Heap::Allocate(dart::Thread*, long, dart::Heap::Space) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.h:87:16 (dart+0x254818b)
    #5 dart::Object::Allocate(long, long, dart::Heap::Space, bool) ../../out/ReleaseTSANX64/../../runtime/vm/object.cc:2799:25 (dart+0x2570625)
    #6 dart::Context::New(long, dart::Heap::Space) ../../out/ReleaseTSANX64/../../runtime/vm/object.cc:18431:21 (dart+0x25a0bff)
    #7 dart::DRT_HelperAllocateContext(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments) ../../out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:702:13 (dart+0x26e7bef)
    #8 dart::DRT_AllocateContext(dart::NativeArguments) ../../out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:699:1 (dart+0x26e7bef)
    #9 <null> <null> (memfd:dart-code (deleted)+0x2b39)
    #10 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:145:10 (dart+0x24a52fb)
    #11 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24a86a7)
    #12 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:732:28 (dart+0x24a86a7)
    #13 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x24e3bbb)
    #14 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2527d43)
    #15 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x2528750)
    #16 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x2529123)
    #17 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x2746479)
    #18 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2746d37)
    #19 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x265c343)

  Location is heap block of size 3376 at 0x7b7c0003fe00 allocated by thread T9:
    #0 operator new(unsigned long) ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (dart+0x2245517)
    #1 dart::ThreadRegistry::GetFromFreelistLocked(bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread_registry.cc:139:14 (dart+0x2746ef9)
    #2 dart::ThreadRegistry::GetFreeThreadLocked(bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread_registry.cc:30:20 (dart+0x2746ef9)
    #3 dart::IsolateGroup::ScheduleThreadLocked(dart::MonitorLocker*, dart::Thread*, bool, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc (dart+0x24dec67)
    #4 dart::Isolate::ScheduleThread(bool, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:3693:16 (dart+0x24ecdfa)
    #5 dart::Thread::EnterIsolate(dart::Isolate*, bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread.cc:282:29 (dart+0x273ee04)
    #6 dart::Isolate::InitIsolate(char const*, dart::IsolateGroup*, Dart_IsolateFlags const&, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1839:8 (dart+0x24e5b4b)
    #7 dart::Dart::CreateIsolate(char const*, Dart_IsolateFlags const&, dart::IsolateGroup*) ../../out/ReleaseTSANX64/../../runtime/vm/dart.cc:824:7 (dart+0x249fd4b)
    #8 dart::CreateIsolate(dart::IsolateGroup*, bool, char const*, void*, char**) ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1272:16 (dart+0x2e1887e)
    #9 dart::CreateWithinExistingIsolateGroup(dart::IsolateGroup*, char const*, char**) ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1347:7 (dart+0x2e18788)
    #10 dart::SpawnIsolateTask::RunLightweight(char const*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:685:24 (dart+0x24066c7)
    #11 dart::SpawnIsolateTask::Run() ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:638:7 (dart+0x240645c)
    #12 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x2746479)
    #13 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2746d37)
    #14 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x265c343)

  Mutex M0 (0x7b6800000850) created at:
    #0 pthread_mutex_init ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1341:3 (dart+0x21c1490)
    #1 dart::Mutex::Mutex(char const*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:308:12 (dart+0x265c7a7)
    #2 dart::Scavenger::Scavenger(dart::Heap*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.cc:756:12 (dart+0x279b844)
    #3 dart::Heap::Heap(dart::IsolateGroup*, bool, long, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:49:7 (dart+0x277d6ff)
    #4 dart::Heap::Init(dart::IsolateGroup*, bool, long, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:731:34 (dart+0x2781a83)
    #5 dart::IsolateGroup::CreateHeap(bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:475:3 (dart+0x24de23f)
    #6 Dart_CreateIsolateGroup ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1383:10 (dart+0x2e18cfd)
    #7 dart::bin::CreateIsolateGroupAndSetupHelper(bool, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**, int*, bool) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:813:15 (dart+0x2251064)
    #8 dart::bin::RunMainIsolate(char const*, char const*, bool, dart::bin::CommandLineOptions*) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1023:26 (dart+0x2250802)
    #9 dart::bin::main(int, char**) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1407:9 (dart+0x2251d6b)
    #10 main ../../out/ReleaseTSANX64/../../runtime/bin/main.cc:9:3 (dart+0x22506b4)

  Thread T7 'DartWorker' (tid=2597, running) created by thread T6 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x21bfb1b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x265c1f3)
    #2 dart::ThreadPool::Worker::StartThread() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x2745b50)
    #3 dart::ThreadPool::RunImpl(std::__2::unique_ptr<dart::ThreadPool::Task, std::__2::default_delete<dart::ThreadPool::Task>>) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x2745b50)
    #4 bool dart::ThreadPool::Run<dart::SpawnIsolateTask, dart::Isolate*&, std::__2::unique_ptr<dart::IsolateSpawnState, std::__2::default_delete<dart::IsolateSpawnState>>>(dart::Isolate*&, std::__2::unique_ptr<dart::IsolateSpawnState, std::__2::default_delete<dart::IsolateSpawnState>>&&) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x240356d)
    #5 dart::DN_HelperIsolate_spawnFunction(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:959:36 (dart+0x240356d)
    #6 dart::BootstrapNatives::DN_Isolate_spawnFunction(dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:906:1 (dart+0x240356d)
    #7 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*)) ../../out/ReleaseTSANX64/../../runtime/vm/native_entry.cc:140:37 (dart+0x2544d4f)
    #8 <null> <null> (memfd:dart-code (deleted)+0x2caa)
    #9 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:145:10 (dart+0x24a52fb)
    #10 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24a86a7)
    #11 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:732:28 (dart+0x24a86a7)
    #12 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x24e3bbb)
    #13 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2527d43)
    #14 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x2528750)
    #15 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x2529123)
    #16 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x2746479)
    #17 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2746d37)
    #18 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x265c343)

  Thread T9 'DartWorker' (tid=2599, running) created by thread T8 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x21bfb1b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x265c1f3)
    #2 dart::ThreadPool::Worker::StartThread() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x2745b50)
    #3 dart::ThreadPool::RunImpl(std::__2::unique_ptr<dart::ThreadPool::Task, std::__2::default_delete<dart::ThreadPool::Task>>) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x2745b50)
    #4 bool dart::ThreadPool::Run<dart::MessageHandlerTask, dart::MessageHandler*>(dart::MessageHandler*&&) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x2527931)
    #5 dart::MessageHandler::Run(dart::ThreadPool*, dart::MessageHandler::MessageStatus (*)(unsigned long), void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:120:24 (dart+0x2527931)
    #6 dart::Isolate::Run() ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:2382:22 (dart+0x24e802c)
    #7 Dart_RunLoopAsync ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:2116:12 (dart+0x2e1d18b)
    #8 dart::SpawnIsolateTask::Run(dart::Isolate*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:740:10 (dart+0x2406c75)
    #9 dart::SpawnIsolateTask::RunLightweight(char const*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:705:5 (dart+0x2406744)
    #10 dart::SpawnIsolateTask::Run() ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:638:7 (dart+0x240645c)
    #11 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x2746479)
    #12 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2746d37)
    #13 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x265c343)

SUMMARY: ThreadSanitizer: data race ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h in dart::Page::object_end() const
==================
=> Running "out/ReleaseTSANX64/dart --disable-dart-dev -Drepeat=4 -Dshard=109 -Dshards=200 --sound-null-safety runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill" failed with -6
=> Possible crash 0 (pid: 2588)
Running "out/ReleaseTSANX64/dart --disable-dart-dev -Drepeat=4 -Dshard=119 -Dshards=200 --sound-null-safety runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill"

another instance
[/b/s/w/ir/cache/builder/sdk/runtime/tests/concurrency/../../../tests/language/assert/with_message_test.dart] finished
LLVMSymbolizer: error reading file: No such file or directory
==================
WARNING: ThreadSanitizer: data race (pid=29013)
  Read of size 8 at 0x7b7c00012648 by thread T7 (mutexes: write M0):
    #0 dart::Page::object_end() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h (dart+0x27b48a3)
    #1 dart::Page::used() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h:92:34 (dart+0x27b48a3)
    #2 dart::SemiSpace::used_in_words() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:46:18 (dart+0x27b48a3)
    #3 dart::Scavenger::UsedInWords() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:159:17 (dart+0x27b48a3)
    #4 dart::Scavenger::GetCurrentUsage() const ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:165:27 (dart+0x27b48a3)
    #5 dart::Heap::RecordBeforeGC(dart::GCType, dart::GCReason) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:1033:36 (dart+0x27b48a3)
    #6 dart::Heap::CollectOldSpaceGarbage(dart::Thread*, dart::GCType, dart::GCReason) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:546:5 (dart+0x27b3aed)
    #7 dart::Heap::CollectAllGarbage(dart::GCReason, bool) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:605:3 (dart+0x27b2ac1)
    #8 Dart_ExecuteInternalCommand ../../out/ReleaseTSANX64/../../runtime/vm/native_api_impl.cc:279:38 (dart+0x2e81fb9)
    #9 TriggerGC ../../out/ReleaseTSANX64/../../runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc:88:3 (libffi_test_functions.so+0xb0a3c)
    #10 <null> <null> (memfd:dart-code (deleted)+0x644a)
    #11 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24d93b7)
    #12 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:750:28 (dart+0x24d93b7)
    #13 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x25148cb)
    #14 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2558ce3)
    #15 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x25596f0)
    #16 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x255a0c3)
    #17 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x27773c9)
    #18 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2777c87)
    #19 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x268d2e3)

  Previous write of size 8 at 0x7b7c00012648 by thread T8:
    #0 dart::Thread::set_top(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread.h:687:34 (dart+0x27b1fd4)
    #1 dart::Scavenger::TryAllocateFromTLAB(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:261:13 (dart+0x27b1fd4)
    #2 dart::Scavenger::TryAllocate(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.h:141:12 (dart+0x27b1fd4)
    #3 dart::Heap::AllocateNew(dart::Thread*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:84:27 (dart+0x27b1fd4)
    #4 dart::Heap::Allocate(dart::Thread*, long, dart::Heap::Space) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.h:87:16 (dart+0x257912b)
    #5 dart::Object::Allocate(long, long, dart::Heap::Space, bool) ../../out/ReleaseTSANX64/../../runtime/vm/object.cc:2797:25 (dart+0x25a15c5)
    #6 dart::Double::New(double, dart::Heap::Space) ../../out/ReleaseTSANX64/../../runtime/vm/object.cc:23717:9 (dart+0x260b1b5)
    #7 dart::DN_HelperDouble_mul(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/double.cc:59:10 (dart+0x23f9eda)
    #8 dart::BootstrapNatives::DN_Double_mul(dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/double.cc:52:1 (dart+0x23f9eda)
    #9 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*)) ../../out/ReleaseTSANX64/../../runtime/vm/native_entry.cc:140:37 (dart+0x2575cef)
    #10 <null> <null> (memfd:dart-code (deleted)+0x2caa)
    #11 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24d93b7)
    #12 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:750:28 (dart+0x24d93b7)
    #13 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x25148cb)
    #14 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2558ce3)
    #15 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x25596f0)
    #16 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x255a0c3)
    #17 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x27773c9)
    #18 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2777c87)
    #19 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x268d2e3)

  Location is heap block of size 3376 at 0x7b7c00012600 allocated by thread T2:
    #0 operator new(unsigned long) ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (dart+0x2257e17)
    #1 dart::ThreadRegistry::GetFromFreelistLocked(bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread_registry.cc:139:14 (dart+0x2777e49)
    #2 dart::ThreadRegistry::GetFreeThreadLocked(bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread_registry.cc:30:20 (dart+0x2777e49)
    #3 dart::IsolateGroup::ScheduleThreadLocked(dart::MonitorLocker*, dart::Thread*, bool, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc (dart+0x250f977)
    #4 dart::IsolateGroup::ScheduleThread(bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:724:10 (dart+0x250fd1e)
    #5 dart::Thread::EnterIsolateGroupAsHelper(dart::IsolateGroup*, dart::Thread::TaskKind, bool) ../../out/ReleaseTSANX64/../../runtime/vm/thread.cc:355:35 (dart+0x2770605)
    #6 dart::ConcurrentMarkTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/heap/marker.cc:822:19 (dart+0x27bd858)
    #7 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x27773c9)
    #8 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2777c87)
    #9 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x268d2e3)

  Mutex M0 (0x7b6800000850) created at:
    #0 pthread_mutex_init ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1341:3 (dart+0x21d3d90)
    #1 dart::Mutex::Mutex(char const*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:308:12 (dart+0x268d747)
    #2 dart::Scavenger::Scavenger(dart::Heap*, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/scavenger.cc:756:12 (dart+0x27cf834)
    #3 dart::Heap::Heap(dart::IsolateGroup*, bool, long, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:49:7 (dart+0x27b16cf)
    #4 dart::Heap::Init(dart::IsolateGroup*, bool, long, long) ../../out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:731:34 (dart+0x27b5a53)
    #5 dart::IsolateGroup::CreateHeap(bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:475:3 (dart+0x250ef4f)
    #6 Dart_CreateIsolateGroup ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1383:10 (dart+0x2e4ccad)
    #7 dart::bin::CreateIsolateGroupAndSetupHelper(bool, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**, int*, bool) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:813:15 (dart+0x2263844)
    #8 dart::bin::RunMainIsolate(char const*, char const*, bool, dart::bin::CommandLineOptions*) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1023:26 (dart+0x2262fe2)
    #9 dart::bin::main(int, char**) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1407:9 (dart+0x226454b)
    #10 main ../../out/ReleaseTSANX64/../../runtime/bin/main.cc:9:3 (dart+0x2262e94)

  Thread T7 'DartWorker' (tid=29021, running) created by thread T6 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x21d241b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x268d193)
    #2 dart::ThreadPool::Worker::StartThread() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x2776aa0)
    #3 dart::ThreadPool::RunImpl(std::__2::unique_ptr<dart::ThreadPool::Task, std::__2::default_delete<dart::ThreadPool::Task>>) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x2776aa0)
    #4 bool dart::ThreadPool::Run<dart::SpawnIsolateTask, dart::Isolate*&, std::__2::unique_ptr<dart::IsolateSpawnState, std::__2::default_delete<dart::IsolateSpawnState>>>(dart::Isolate*&, std::__2::unique_ptr<dart::IsolateSpawnState, std::__2::default_delete<dart::IsolateSpawnState>>&&) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x2415d6d)
    #5 dart::DN_HelperIsolate_spawnFunction(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:959:36 (dart+0x2415d6d)
    #6 dart::BootstrapNatives::DN_Isolate_spawnFunction(dart::Thread*, dart::Zone*, dart::NativeArguments*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:906:1 (dart+0x2415d6d)
    #7 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*)) ../../out/ReleaseTSANX64/../../runtime/vm/native_entry.cc:140:37 (dart+0x2575cef)
    #8 <null> <null> (memfd:dart-code (deleted)+0x2caa)
    #9 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x24d93b7)
    #10 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) ../../out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:750:28 (dart+0x24d93b7)
    #11 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message>>) ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1437:15 (dart+0x25148cb)
    #12 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:239:16 (dart+0x2558ce3)
    #13 dart::MessageHandler::TaskCallback() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:450:18 (dart+0x25596f0)
    #14 dart::MessageHandlerTask::Run() ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x255a0c3)
    #15 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x27773c9)
    #16 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2777c87)
    #17 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x268d2e3)

  Thread T8 'DartWorker' (tid=29022, running) created by thread T7 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x21d241b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x268d193)
    #2 dart::ThreadPool::Worker::StartThread() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x2776aa0)
    #3 dart::ThreadPool::RunImpl(std::__2::unique_ptr<dart::ThreadPool::Task, std::__2::default_delete<dart::ThreadPool::Task>>) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x2776aa0)
    #4 bool dart::ThreadPool::Run<dart::MessageHandlerTask, dart::MessageHandler*>(dart::MessageHandler*&&) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x25588d1)
    #5 dart::MessageHandler::Run(dart::ThreadPool*, dart::MessageHandler::MessageStatus (*)(unsigned long), void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:120:24 (dart+0x25588d1)
    #6 dart::Isolate::Run() ../../out/ReleaseTSANX64/../../runtime/vm/isolate.cc:2380:22 (dart+0x2518d3c)
    #7 Dart_RunLoopAsync ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:2120:12 (dart+0x2e5117b)
    #8 dart::SpawnIsolateTask::Run(dart::Isolate*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:740:10 (dart+0x2419475)
    #9 dart::SpawnIsolateTask::RunLightweight(char const*) ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:705:5 (dart+0x2418f44)
    #10 dart::SpawnIsolateTask::Run() ../../out/ReleaseTSANX64/../../runtime/lib/isolate.cc:638:7 (dart+0x2418c5c)
    #11 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x27773c9)
    #12 dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x2777c87)
    #13 dart::ThreadStart(void*) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x268d2e3)

  Thread T2 'DartWorker' (tid=29016, running) created by main thread at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x21d241b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) ../../out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x268d193)
    #2 dart::ThreadPool::Worker::StartThread() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x2776aa0)
    #3 dart::ThreadPool::RunImpl(std::__2::unique_ptr<dart::ThreadPool::Task, std::__2::default_delete<dart::ThreadPool::Task>>) ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x2776aa0)
    #4 bool dart::ThreadPool::Run<dart::RunServiceTask>() ../../out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x274f7eb)
    #5 dart::ServiceIsolate::Run() ../../out/ReleaseTSANX64/../../runtime/vm/service_isolate.cc:513:44 (dart+0x274f7eb)
    #6 dart::Dart::DartInit(Dart_InitializeParams const*) ../../out/ReleaseTSANX64/../../runtime/vm/dart.cc:503:5 (dart+0x24cfb1b)
    #7 dart::Dart::Init(Dart_InitializeParams const*) ../../out/ReleaseTSANX64/../../runtime/vm/dart.cc:522:18 (dart+0x24cfb8b)
    #8 Dart_Initialize ../../out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1213:10 (dart+0x2e4c0db)
    #9 dart::bin::main(int, char**) ../../out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1357:11 (dart+0x22642ca)
    #10 main ../../out/ReleaseTSANX64/../../runtime/bin/main.cc:9:3 (dart+0x2262e94)

SUMMARY: ThreadSanitizer: data race ../../out/ReleaseTSANX64/../../runtime/vm/heap/page.h in dart::Page::object_end() const
==================
=> Running "out/ReleaseTSANX64/dart --disable-dart-dev -Drepeat=4 -Dshard=109 -Dshards=200 --sound-null-safety runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill" failed with -6
=> Possible crash 0 (pid: 29013)
Running "out/ReleaseTSANX64/dart --disable-dart-dev -Drepeat=4 -Dshard=119 -Dshards=200 --sound-null-safety runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill"

cc @rmacnak-google

I think there's no race, but TSAN needs to be informed about the CAS in Assembler::EnterFullSafepoint.

authors: aam rmacnak-google


text:
dart fix required_named is not working

@loic-sharma was sharing with me some strange behavior from dart fix.
A change was made where
ClipboardData({ String? this.text });

became
ClipboardData({ required String text });

The planned fix was to add the text parameter where users may not have already been using it.
// Before
ClipboardData();

// After
ClipBoardData(text: '');

This was the defined rule:
# Changes made in https://github.com/flutter/flutter/pull/122446
  - title: "Replace null 'text' with empty string"
    date: 2023-04-19
    element:
      uris: [ 'services.dart' ]
      constructor: ''
      inClass: 'ClipboardData'
    oneOf:
      - if: "text == ''"
        changes:
          - kind: 'addParameter'
            index: 0
            name: 'text'
            style: required_named
            argumentValue:
              expression: "''"
              requiredIf: "text == ''"

But no transformation is applied.

This was the defined rule:

The transform appears to be missing a declaration of the variable text.

However, I am also curious if this type of rule is just not needed.

My guess is that for simple cases like strings and integers the quick fix will produce a default value ('', 0, false, etc.). That value isn't configurable, and for more complex types it probably produces null, even when the parameter type is non-nullable. So it probably depends on the default value you want to have produced.

Oh! I thought I might be missing something silly.
@loic-sharma It is missing the variables part to define text
# Changes made in https://github.com/flutter/flutter/pull/122446
  - title: "Replace null 'text' with empty string"
    date: 2023-04-19
    element:
      uris: [ 'services.dart' ]
      constructor: ''
      inClass: 'ClipboardData'
    oneOf:
      - if: "text == ''"
        changes:
          - kind: 'addParameter'
            index: 0
            name: 'text'
            style: required_named
            argumentValue:
              expression: "''"
              requiredIf: "text == ''"
  variables:
      text:
        kind: 'fragment'
        value: 'arguments[text]'

Fixed as per comment in #52108.

authors: Piinks bwilkerson keertip


text:
rev java library to match the latest protocol spec

For details, see https://github.com/dart-lang/vm_service_drivers/pull/91.
@danrubel

(Java travis commented out in https://github.com/dart-lang/vm_service_drivers/pull/95/files#diff-354f30a63fb0907d4ad57269548329e3R9)

Re: optional params into the Java methods, instead of using primitive types for those params, you can type them as objects (i.e., Integer instead of int). That would be a way to know if the user had actually passed them in, and they should be adding to the json packet.

Good point. I'll work towards that.

https://github.com/dart-lang/vm_service_drivers/pull/104

fixed

authors: danrubel devoncarew


text:
Async compilation and instantiation

Add WasmModule.compileAsync and WasmInstanceBuilder.buildAsync, so that the web API can be supported in the future.
#34

@lexaknyazev are there any other functions that need async equivalents?

The web platform has these async entry points (all exposed by the wasm_interop package):

async compile from bytes or buffer;
async instantiate from bytes or buffer;
async instantiate from a compiled module.

Going directly from bytes to an instance doesn't fit nicely with the way we're doing imports, so I'll leave that out for now.

authors: lexaknyazev liamappelbe

repo: dart-lang/wasm


text:
how to set value to if the path path does not exist

iam working on CLI features that
see the content of the assets directory and add pathes to pubspec.yaml based on that
it works with update if there is already a list in pubspec assets
    final doc = YamlEditor(pubspecContent);
    doc.update(['flutter','assets'], assets);

BUT if there is no assets key n the pubspec under flutter

flutter:
  uses-material-design: true

it throws exception
i think this is the expected behavior to throw when updating a null but how could i set value to a key that does not exist+

@maxzod, you should be able to insert a new key in a YamlMap using `YamlEditor.
Can you make provide a complete minimal example of this issue?

I have no issues doing:
import 'package:yaml_edit/yaml_edit.dart';

void main() {
  final yamlEditor = YamlEditor('''
flutter:
  uses-material-design: true
''');
  yamlEditor.update([
    'flutter',
    'assets'
  ], {
    'foo': 'foo.jpg',
    'bar': 'bar.png',
  });
  print(yamlEditor.toString());
}

that prints:
flutter:
  assets:
    foo: foo.jpg
    bar: bar.png
  uses-material-design: true

authors: jonasfj maxzod


text:
Consume until end of document if there is no newline when removing from

block map.
Fixes #55.

Have you tried also with lists?

No, one issue at the time :see_no_evil:
I think there is also a possibility of bugs with inline blocks.