text:
🐞 Output lines are getting duplicated

What is the issue?
When running mage ci, I am seeing duplicate STDERR lines:
> mage ci
Creating new Engine session... Creating new Engine session... Creating new Engine session... OK!
Establishing connection to Engine... OK!
Establishing connection to Engine... OK!
Establishing connection to Engine... OK!
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
8: > in 📦 RUNTIME IMAGE > from hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
OK!
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
8: > in 🧰 TEST > from hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
OK!
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
8: > in 🎁 PRODUCTION IMAGE > from hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126 DONE
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126 DONE
8: resolve image config for docker.io/hexpm/elixir:1.14.4-erlang-25.3.2-ubuntu-jammy-20230126 DONE

Same is happening when running with dagger run (only seeing these at the very end):

WDYT @TomChv @helderco?

Yes, there is a different issue with the version number, the Engine is not experimental - will file a separate issue for that one.
Log output
No response
Steps to reproduce

git clone https://github.com/gerhard/changelog.com
cd changelog.com
git checkout -b upgrade-dagger-to-0.8 origin/upgrade-dagger-to-0.8
mage ci

SDK version
Go SDK v0.8.0
OS version
SDK / CLI on macOS 12.6 & Engine on NixOS 22.11 (Linux 5.15)

Yes, this was expected: https://github.com/dagger/dagger/pull/5488#issuecomment-1655570382
From https://github.com/dagger/dagger/pull/5488#issuecomment-1656491646

As for #5488 (comment), that test is testing concurrent provisioning for the automatic provisioning feature in the SDK, so it explicitly ignores an existing session. I say it's not a big deal in this case and we can remove LogOutput from the test. We'll be focusing more on the CLI experience going forward so hopefully less and less users will be running off the SDK directly in the future.
In the meantime this is the problematic situation that remains. It's if someone is doing multiple Connects when executing via the SDK, so that provisioning logging will be all over the place. I've seen it being done in a complex python SDK codebase, especially in a test suite that uses dagger, so I wanted to make sure I had that covered. Two things help there: 1) status update is replaced in line and disappears when run interactively; 2) No status updates are printed when running non-interactively (e.g., log_output to a file).

authors: gerhard helderco

repo: dagger/dagger


text:
docs: Added guide on Docker alternatives

This commit adds a guide on using Docker alternatives with Dagger.
Closes #5017

This looks good and is not far off. A great follow-up to Podman & Containerd would be Kubernetes. I know that many of our users are already doing this.
What are your thoughts @samalba on Lima? I know that you are a fan.

source: gharchive/pull-request

authors: gerhard vikram-dagger

license_type: permissive

license_source: github-api


text:
部分手机 划开后自动关闭，好多人都这个问题，为啥作者不提一下呢

按照大家的解决方案，都没成功。。。

+1

试过他自带的adapter没  我发现魅族手机都会有这个问题  下了个demo发现 demo里的listview并不会这样，于是重新看了次wiki 发现他有个自带的adapter 用了 就好了。

是啊 这控件有问题！！！

duplicate with #413

source: gharchive/issue

authors: beiliubei daimajia mingtang1079 roshenLiang sumaniru

repo: daimajia/AndroidSwipeLayout

license: mit

license_source: bigquery


text:
requests with malformed json body hangs and error is not passed to error handler

Posting an invalid json body with Content-Type application/json cause request to hang for aprox 10 seconds before the socket is close and the following is written to the console
(node:25737) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token a in JSON at position 1
    at JSON.parse (<anonymous>)
    at body (/tmp/nanotest/node_modules/nanoexpress/build/nanoexpress.js:559:21)
    at async /tmp/nanotest/node_modules/nanoexpress/build/nanoexpress.js:1659:11
(node:25737) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Sample program:
const nanoexpress = require('nanoexpress');
const app = nanoexpress();
app.setErrorHandler((err, req, resp) => {
    console.log(err);
    resp.status(500).end(err.message);
});
app.setValidationErrorHandler( (err, req, resp) => {
    console.log(err);
    resp.status(500).end(JSON.stringify(err.errors));
});
app.post('/', (req, resp) => {
    resp.send( "sdfsdfdsf");
});
app.listen(4002).catch((...args) => {
    console.log(args)
});

Testing:
curl http://localhost:4002/ -H "Content-Type: application/json"-X POST  --data-binary '{a}'

Hello.
Thanks for using and/or trying out my library.
Can you confirm please, are you using Pro or Simple version?

nanoexpress@1.1.4 - which I assume is the non-pro

Thanks for confirm. I will soon look at code and will try fix

@jalkjaer Thanks for reporting issue and this will helps this project always be safe and up-to-date. Good day and wish you all the best!

This bug allowed attacker execute async code with-in web-server and give access to all files contains in server. Bug is now fixed and now project much safer than before

authors: dalisoft jalkjaer

repo: dalisoft/nanoexpress


text:
Error loading syntax: "Capture number is greater than the number of captures in the regex"

Hi, Nova 7.5 is failing to load this syntax definition with the following error:
Error loading syntax “Arm.xml”

Capture number is greater than the number of captures in the regex: 3, unknown, <SKRegularExpression: 0x6000005a7e40> { pattern=\b(?i)(?:mov(?:w|t)?|pac(?:dz?[a|b]|ga|i(?:[a|b](?:1716|sp|z)?)|z[a|b])|swi|svc|wfi|dmb|clrex|dsb|isb|v?(?:push|pop)|b(?:l|l?x|l?r)?|(?:i|e)?ret(?:aa|ab)?|(?:st|ld)(?:p|r(?:ex|s?(?:h|b)|d)?|m(?:(?:f|e)(?:d|a)|(?:d|i)(?:b|a))?))(?:(?:(?=s)s(\w{2})?)|(\w{2})s?)?(?-i)\b, options=82 }, {92, 23}

The capture in question is part of scope arm.keyword.mnenomic.memory.
Thanks!

Sorry for the delay in getting back to you on this. This should now be fixed in 1.1.2 😄 I had spotted that the extension wasn't loading - but wasn't getting any errors flagging it. Where did the error message appear for you?

Not a problem, thanks for taking the time to fix it.
As for the error message, I believe it was showing the Extension Console.

Thanks - that's useful to know, for some reason it wasn't showing up on on my side!

authors: dan-c-underwood gredman

license: MIT


text:
Implement unnumbered BGP

Is this a bug report or a feature request?:
Feature request
What happened:
Configuring BGP can be tedious if you have a big number of peers, it will be great to make it easier and simpler.
What you expected to happen:
It will be great to implement BGP unnumbered to facilitate the configuration
Ref:
https://blog.ipspace.net/2015/02/bgp-configuration-made-simple-with.html
https://marcelwiget.blog/2018/06/21/bgp-over-unnumbered-interfaces-automated/
https://github.com/osrg/gobgp/blob/master/docs/sources/unnumbered-bgp.md
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Can you assign it to me?
I've planned to work on this soon
Environment:

MetalLB version:
Kubernetes version:
BGP router type/version:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):

This depends on IPv6 support, which is currently not great in MetalLB. In particular, it requires full BGP-MP support so we can advertise IPv4 routes over an IPv6 link-local BGP session.
It's all possible, just requires some small tweaks to the BGP libraries.

unfortunately, I can't work on this since my priorities changed

authors: aojea danderson

repo: danderson/metallb


text:
Dlp fixes

Fixes #117.
Fixes #116.
I've added some additional logic with the fetchFullLocation function. This is to allow for the button that links from the dandiset contents to the dandiset landing page to function properly, as to appear it needs to know if the folder is a valid dandiset or not.

@zachmullen should be good to go

repo: dandi/dandiarchive


text:
Tests for GitHubDSL model objects

Purpose
To make sure Danger-Swift is tested and therefore easy to maintain going forward.
Changes

Wrote test for GitHubUser and one test for GitHubMilestone
Moved the DateFormatter used in GitHubDSL to an extension so tests could use the exact same implementation
Used Sourcery to autogenerate equatable extensions for all GitHub and Git models

I used an example template from the Sourcery project to generate equatable extensions, adding only an import statement to the template
I also added a Sourcery config file to make using Sourcery easier
All you have to do to update the models is: $ sourcery --config .sourcery.yml

Fixed an issue with GitHubMilestone where properties were not marked public

Plans

Adding one test case to GitHubMilestone in which the due date and completion date are not nil
Adding tests for all the other model types
Deleting the autogenerated equatable extensions once Swift 4.1 is released (which generates equatable conformance for free)

Areas to consider
1. Equatable
Normally, a model object with an ID property should be considered equatable when it has the same ID as another —without checking other properties. People making plugins will likely want the models to be equatable, so I propose that at a certain point we make the regular equatable extensions looking only at the id where relevant. Then, in the test target we can use code generation to create convenience methods for objects that conform to a custom protocol named FullyEquatable or something like that.
2. How to handle test resource files
SPM does not allow for test resource files (like json files), so, after examining the thread below, I put the JSON in a big multiline string literal inside Swift files. The solutions in the thread below all looked very hacky, and I thought mine was more simple and stable, but please tell me your thoughts. (I think Apple will release support for test resources for SPM at some point because they plan on using server-side Swift; it's just a matter of when.)
https://stackoverflow.com/questions/47177036/use-resources-in-unit-tests-with-swift-package-manager
https://bugs.swift.org/browse/SR-2866
Related
#9

Warnings

:warning:

Any changes to library code should be reflected in the Changelog.
Please consider adding a note there and adhere to the Changelog Guidelines.

  Generated by :no_entry_sign: dangerJS

Hmm, not really sure what the CI error is: anyone have a guess?
Error:  TypeError: Cannot read property 'concat' of undefined
    at Executor.<anonymous> (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:236:45)
    at step (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:32:23)
    at Object.next (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:13:53)
    at /Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:7:71
    at __awaiter (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:3:12)
    at Executor.handleResultsPostingToPlatform (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:230:16)
    at Executor.<anonymous> (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:163:26)
    at step (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:32:23)
    at Object.next (/Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:13:53)
    at /Users/travis/.nvm/versions/node/v6.11.5/lib/node_modules/danger/distribution/runner/Executor.js:7:71
The command "danger process .build/x86_64-apple-macosx10.10/debug/danger-swift" exited with 1.
6.34s$ sudo chmod -R a+rwx /usr/local/

@yhkaplan the CI error seems to be generated by the javascript implementation or danger. What I find strange is that danger-swift seems to generate a different danger-response.json on macOS and linux, that's why it fails just on macOS. Access level issue? Invalid path? Invalid format of the json? Hard to say, it'd be nice if danger-js could provide a more reasonable error message.

That's a raised exception, I'm willing to bet that somehow danger-swift is sending a response back that  danger-js doesn't expect. Ideally there should be some verification on the response on danger-ja's side

I plan on adding tests for more models on Monday or Tuesday. Should I add them as part of this PR or should I make a separate PR? Also, it looks like the CI is still not liking my PR 🤔

Does it work via swift test locally?

@orta Running Swift test locally works, with all tests being run, and all passing. Also, looking at the CI output, all the tests appear to execute and pass on both Linux and macOS.

GitHubRequestedReviewers' comment states that it represents a value in a PR. However, it's not implemented as a parameter of GitHubPR at this time, so it doesn't appear to need a test at this time. Once it is implemented as part of a PR, GitHubRequestedReviewers is just a simple struct for User and Team, so I think I'll just test to see that it's not nil.
/// Represents the payload for a PR's requested reviewers value.
public struct GitHubRequestedReviewers: Decodable {

    // MARK: - CodingKeys

    enum CodingKeys: String, CodingKey {
        case users
        case teams
    }

    // MARK: - Properties

    /// The list of users of whom a review has been requested.
    public let users: [GitHubUser]

    /// The list of teams of whom a review has been requested.
    public let teams: [GitHubTeam]
}

I'll take a look on Danger JS's side 👍

I added more tests for now, but I can move them to a new PR if that's better.
One thing I noticed is that GitHubPR couldn't be decoded with two samples of JSON data that I tried. I made several properties optional to fix this in 0c5e2fb4389a0a3aab415862c2b575670176f855 , but I suspect some need new CodingKeys.

I've done https://github.com/danger/danger-js/pull/548 which should raise if there's anything Danger JS doesn't expect in the JSON passed between danger-js and danger-swift

Interesting that it's green, do you feel like you changed anything that would have fixed it?

@orta No, I don't think any of my recent changes were the reason it was successful this time because they were mostly just adding a couple tests and a lot of test data. I didn't push any configuration changes...

OK, I'm going to release a new Danger JS, which I'm like 80% sure will break danger-swift. So I'll take this PR, and ship a new release to match the new danger-js one with #56

authors: DangerCI orta petrpavlik yhkaplan

repo: danger/danger-swift


text:
Support a danger local command

Re: https://github.com/KrauseFx/danger/issues/17
So far I've added another commands danger local and set it up to use a non-existent  CI Source, the source's job is going to be to find the last PR it can find in the current history of the current repo, then fill in it's environment variables with that stuff.

Now grabs enough git data :tada:

Looks good, however HoundCI doesn't seem so happy

also, if you have a better idea for the name, I'd be interested

OK, I've removed match, and fui - it wasn't being used.
I've also updated Danger to this PR https://github.com/KrauseFx/danger/pull/40/ - which makes --verbose work - should make debugging DM easier for me.

Punted the tables stuff to https://github.com/danger/danger/issues/62

authors: KrauseFx orta

repo: danger/danger


text:
Switch to rugged for git integration

Needs more tests - looks more stable now. I have to understand how git works though, tradeoff.

OK, :green_heart:


text:
Upload direct from outlook

Hi,
First, thanks for the wonderful directive as I make use of it in my production code. I'd like to know if it's possible to drag an email directly from outlook for the upload. Currently, the  upload requires that I make an initial drop to desktop, wondering if possible to get the stream data.
TIA
John

Did this has been solved ?

Hi ,
I have a similar requirement where I would have to drag the email from outlook and drop it on the browser directly rather than saving it on desktop.Is this possible in some way?
Thanks & Regards
Ramarathna B C

authors: johntom ptitdje45 ramarathna

repo: danialfarid/ng-file-upload


text:
keithley-arduino using RS-232

I am trying to communicate between Arduino and Keithley electrometer 6517b using RS-232 cable.
I used an RS-232 shield for Arduino to connect it.
When I tried to communicate between Arduino and my laptop and my PC just to check whether everything was working, it just worked fine.
I used the following code on Arduino to communicate with my electrometer.
void setup() {
  // initialize both serial ports:
  Serial.begin(19200);//serial port on my laptop
  Serial1.begin(19200);//serial port connected to RS-232 cable
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    char inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    char inByte = Serial.read();
    Serial1.write(inByte);
  }
}

The electrometer did not go into REM mode (i.e. Remote Operation mode).
It was not responding at all to the commands.
Previously I was working on communicating with library using pyserial on my PC and it was working properly.

Sorry I didn't realize you were (1) using a different electrometer with (2) a different communication method and thus (3) aren't actually using my library. I don't know what the problem is.

Are you able to do use RS 232 with your electrometer?

authors: ayubih daniel-centore


text:
🛑 DMU is down

In 280b62d, DMU (https://www.mobilitateurbana4.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DMU is back up in dd5160c after 7 minutes.


text:
JSON Path spec

Please be involved with the JSON Path spec effort: https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base.  We need more opinions.

I don't think so. I don't think I was very effective when I was participating. I could spend several hours preparing what I thought was a well presented post, and it often seemed that you were the only one that read it. And I didn't enjoy my interactions with Carston.
Best regards,
Daniel
On Tuesday, August 10, 2021, 02:59:39 p.m. EDT, Greg Dennis @.***> wrote:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Ah, I replied from my inbox, and hadn't realized this had been sent to the project issues! I'll delete this response from the issues, and edit the other.
Best regards,
Daniel
On Tuesday, August 10, 2021, 04:34:50 p.m. EDT, Daniel Parker @.***> wrote:
I don't think so. I don't think I was very effective when I was participating. I could spend several hours preparing what I thought was a well presented post, and it often seemed that you were the only one that read it. And I didn't enjoy my interactions with Carston.
Best regards,
Daniel
On Tuesday, August 10, 2021, 02:59:39 p.m. EDT, Greg Dennis @.***> wrote:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

authors: danielaparker gregsdennis


text:
Weapon Revealer

Suggestion

@danielkrupinski

@dapaster what hack is that?

@dapaster what hack is that?
it’s a skeet lua

its pretty cool, never saw it before

yes, i want this to happen

this would be cool

authors: DEVjeSucks anarbmw dapaster grey-stack thisisprettyepic wemanzoz

repo: danielkrupinski/Osiris


text:
👀 Avoid Entity Services

https://youtu.be/2gOOstEI4vU

Concentrate on capabilities over data-manipulation


text:
One specific virtual device not reachable

I agree to the following

[X] I have read the documentation right now
[X] I have read the FAQs right now
[X] I am aware of the latest release notes
[X] The Backend (CCU/Homegear/...) is working as expected and connected devices are controllable by its own UI.
[X] I am running the latest version of the custom_component (and Home Assistant)

The problem
A virtual device (INT0000005) is not available. All other virtual devices are available.
The blueprint reactivate_single_device does not work.
What version of HomematicIP (local) has the issue?
1.52.0
What was the last working version of HomematicIP (local)?
No response
What type of installation are you running?
Home Assistant Container
What type of installation are you running for your homematic backend?
CCU2
Which version of your homematic backend are you running?
2.61.7
What hardware are you running for your system?
Pi4
Which config details do you use

[X] Username and password
[ ] TLS
[ ] callback data (see)

Which interfaces do you use?

[X] Homematic IP
[X] Homematic (Bidcos-RF)
[X] Groups (Heating-Group)
[ ] BidCos-Wired (HM-Wired)

Diagnostics information
home-assistant_homematicip_local_2024-01-07T15-08-11.824Z.log
Anything in the logs that might be useful for us? The log (full log) is the best source to support trouble shooting!
No response
Additional information
No response

Don't switch to DEBUG level if not requested.

Manchmal Frage ich mich, warum ich das ins Issue Template überhaupt reingeschrieben habe.
Bitte ein Log ohne DEBUG Level anhängen.

Nur zum Verständnis:
Fehler und Warnungen  sind immer im Log. Erst wenn man mit diesen Informationen nicht weiter kommt, dann kann man selektiv für einige Module Debug aktivieren. Ansonsten enthält das Log tausende Zeilen, die nicht relevant sind, und man sieht so den Wald vor lauter Bäumen nicht.

authors: EckeFL SukramJ


text:
🛑 CCB - Transacciones is down

In fc6512b, CCB - Transacciones (https://linea.ccb.org.co/apprenovaciones/index.html#!/) was down:

HTTP code: 404
Response time: 706 ms

Resolved: CCB - Transacciones is back up in f3c9d5d after 1 hour, 20 minutes.

repo: danielqb/status


text:
Error "Uncaught TypeError: Cannot read property 'play' of undefined"

When using the ngAudio.play() method with a remote resource, I receive the above error on my console (version is 1.7.0 on the latest Chrome).
It fails at audio.play();, what leads me to the assumption that audio has not yet been initialized upon calling.
if (ngAudioGlobals.unlock) {

            window.addEventListener("click",function twiddle(){
                audio.play();
                audio.pause();
                window.removeEventListener("click",twiddle);
            });

        }
}

Furthermore, I think I'm unable to set ngAudio.unlock = false as outlined at http://danielstern.github.io/ngAudio/#/docs

Hard to reliably reproduce (it is a race condition) but I have noted this behavior as well. I submitted a PR which moves that call into the closure that assigns the audio property.

+1

Fixed in PR

Is the fixed version available through bower? I don't see it

Fix should be somewhere here:
https://github.com/danielstern/ngAudio/pulls?q=is%3Apr+is%3Aclosed
If not, please take a look and see if you can implement a fix / update the necessary bower versioning to make the fix available.

I think you just need to push a new version / tag
I still see the old code here for v1.7.0
https://github.com/danielstern/ngAudio/blob/1.7.0/app/angular.audio.js#L145-L153

Hey @danielcrisp,
I added you as a collaborator, so please feel free to push the new tag.
Cheers,
DS

Thanks, done

authors: danielcrisp danielstern lbyers tobilg tsareg

repo: danielstern/ngAudio


text:
No longer support armv7?

zigbee2mqtt add-on version (if edge, please report commit hash):
1.14.4
Operating environment (HassOS, Virtual Machine, Device/platform running Hass.io):
Home Assistant 0.114.0
Supervisor 242
Docker version 19.03.12, build 48a6621
Raspbian GNU/Linux 10 (buster) armv7l GNU/Linux
Description of problem:
This add-on is not available on your system.
Your entire configuration from the frontend (with sensitive fields redacted):
// replace this line with your pasted configuration

Your logs from Hass.io
20-09-11 02:25:35 INFO (MainThread) [supervisor.store.git] Clone add-on https://github.com/danielwelch/hassio-zigbee2mqtt repository
20-09-11 02:25:39 INFO (MainThread) [supervisor.store] Load add-ons from store: 80 all - 2 new - 0 remove
20-09-11 02:25:46 ERROR (MainThread) [supervisor.addons] Add-on 7ad98f9c_zigbee2mqtt not supported on that platform
20-09-11 02:25:52 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Poeschl/Hassio-Addons repository
20-09-11 02:25:52 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/danielwelch/hassio-zigbee2mqtt repository

Was this working in the past?

Yes. Installed and used it flawlessly until a week ago. It just disappeared from add-on store (reposity is already added).
But I can find and install it on same Pi, same Raspbian, same Home Assistant with 64bit kernel (so aarch64).

The image seems to be there: https://hub.docker.com/r/dwelch2101/zigbee2mqtt-aarch64. Maybe some local caching. Try removing and adding the repository itself.

This might be the same as #366 so I linked it there. If you are no longer experiencing the issue it's probably related.

Thanks but no image for armv7. Is it removed or never been there? But we all used it on Raspbian before.

Maybe it was using armhf before and something changed in HA that no longer knows to use armhf image?
According to https://superuser.com/questions/1009540/difference-between-arm64-armel-and-armhf armhf should work.
Maybe you have a problem closer to: https://community.home-assistant.io/t/installing-hassio-with-docker/101118

See this relevant PR here: https://github.com/danielwelch/hassio-zigbee2mqtt/pull/124
My understanding has been since then that armv7 would "fall back" to armhf if not specified as a supported architecture, and that seems to have been working for quite some time. Will have to check if something changed within HA.

See this relevant PR here: #124
My understanding has been since then that armv7 would "fall back" to armhf if not specified as a supported architecture, and that seems to have been working for quite some time. Will have to check if something changed within HA.
Should be related to some recent Supervisor updates? This is my first though but some other add-ons work well and I do not have much time to investigate. Move zigbee2mqtt to docker container anyway.

This is tentatively fixed by #388. I'll close for now, but please feel free to re-open if there are continued issues with armv7 architecture

authors: ciotlosm danielwelch wolverinevn


text:
Add Turkish translation

Great library @danihodovic, would like to contribute!

Sayın Emirhan Soytaş'a teşekkür ederiz.

Released as 1.2.0

authors: danihodovic emrhnsyts

repo: danihodovic/django-allauth-ui


text:
make component mounts discrete from croom

rather than building the mounts into the croom proper, we ought just leave screw holes there. that way, you can attach the discrete mounts to the IC outside the box easily, and have them secure, and then drop the entire structure into the croom, feeling around until the bolts hit the holes. it also reduces material for the croom print and doesn't fault out the croom if one of the mounts breaks off.

also regarding the croom:

restore symmetry to top corners (one's wonky currently)
cut the motor mount higher
bring the bottom out to reduce the overhang

all of these have been done

repo: dankamongmen/dankdryer


text:
render color message

Current output:
[E0001]: type mismatching
test.c:4:10
4 |   int x = "hello";
  |           ^^^^^^^ cannot assign a `string` to `int` variable
  |       ^ `x` is a `int` variable
=> expected type `int`, found type `string`

The part should be Red:
[E0001]

and
^^^^^^^ cannot assign a `string` to `int` variable

The part should be Blue:
^ `x` is a `int` variable

and =>

Maybe shouldn't use primary or other labels to give color, should be some rules like hint -> blue, error -> red.

Current status:

repo: dannypsnl/reporter


text:
insta scrape save?

Hi! i downloaded and ran a few cases but where does the images save ? also, it was stalling in the command line and would not come to completion after 3 hours. is it in a queue or if the hashtag is like millions of post how long should i expect to wait? i tried with a 13 post hastag and it stalled the same for quite a while.
Thanks!
Tayler

Hey @taylerpauls I haven't had the time to update the gem in a bit so some functionality may be broken. I'll see if I can update some of it using some open PRs later tonight if I have the time. It's been a while. As for saving the images, theres no direct way to do it in the gem but you could easily download the images from the returned objects using ruby. I'll leave this issue open and will respond asap when I check out what's broken.

authors: dannyvassallo taylerpauls


text:
boost.a needs to be libboost.a for Cocoapods

Trying to use the Cocoapod for this project it almost works out of the box, except that the linker can't find boost. I found the fix to be renaming boost.a to libboost.a.
My fix for the moment is to add this to the projects Podfile:
post_install do |installer|
    # ofxiOSBoost has the boost library named 'boost.a', but it needs to be
    # called 'libboost.a' for the linker to find it, we will rename it here:
    boost_root_path = installer.sandbox.pod_dir('ofxiOSBoost')
    boost_lib_path = boost_root_path.join('libs/boost/ios/boost.a')
    boost_lib_path.rename(boost_lib_path.parent.join 'libboost.a') if boost_lib_path.exist?
end

But if some fix could be made upstream here that would be great.

Yeah thanks for this report!
I think I will go with the name change.
I have got into the habit of renaming libs and to not conflict with system libs, however this should have priority so I think it should be a go.
Thanks again! I'll make the adjustments
Sent from my iPhone

On 28 Oct 2015, at 1:23 PM, Mark Haylock notifications@github.com wrote:
Trying to use the Cocoapod for this project it almost works out of the box, except that the linker can't find boost. I found the fix to be renaming boost.a to libboost.a.
My fix for the moment is to add this to the projects Podfile:
post_install do |installer|
# ofxiOSBoost has the boost library named 'boost.a', but it needs to be
# called 'libboost.a' for the linker to find it, we will rename it here:
boost_root_path = installer.sandbox.pod_dir('ofxiOSBoost')
boost_lib_path = boost_root_path.join('libs/boost/ios/boost.a')
boost_lib_path.rename(boost_lib_path.parent.join 'libboost.a') if boost_lib_path.exist?
end
But if some fix could be made upstream here that would be great.
—
Reply to this email directly or view it on GitHub.

Changed to libboost.a in new releases for 1.59.0 and master.


text:
Email Confirmation Link Timing Out

Looking for some guidance on how to address this issue. I'm not seeing any logs from Heroku or Timber regarding it, so I'm not exactly sure how to solve it.
Currently the sign-up flow works fine, however the link the user receives to confirm their account just hangs. It is working fine locally.
I'm using all default settings and it's deployed on Heroku. The link is www.domain.com:52070/confirm-email/XXXXX..
Any troubleshooting advice is greatly appreciated!

After making a change and pushing it to production it seems the port number on the link has changed.
Still unable to find any errors or even requests when I try to click the link.

Found the issue, it's hanging because of the port number attached to the link. It works correctly when the port is removed (www.domain.com/confirm-email/XXXXX) instead of (www.domain.com:52070/confirm-email/XXXXX).
My next question is how do I edit the confirmation link that is sent to not include the port number?

You need to set the Phoenix URL generator opts as shown here: https://github.com/danschultzer/pow/issues/478#issuecomment-607529518

Just checked the related issue, however I do have it set already.
This is what I currently have:
url: [scheme: "https", host: "domain.com", port: System.get_env("PORT")],

Change System.get_env("PORT") to 443, or remove it entirely.

That solved the issue! Really appreciate the quick responses.

I did have an issue where if you are running behind a reverse proxy you will need to set the port explicitly otherwise it will default to the main port of the app. IE 4001 or 4000.

authors: Marciola danschultzer joshchernoff

repo: danschultzer/pow


text:
Provide an option for non-root install.

running actions init tries to copy something into a privileged location (/usr/local/bin) that's fine, but you might want to:
a) print a more useful error message (e.g. 'sudo actions init') instead of just failing the write.
b) provide a command line option for saving to an alternate location so that people w/o root can still install.

How about we change from from /usr/local/bin to $HOME/.dapr/bin and instruct users to add to path with:
export PATH=$PATH:$HOME/.dapr/bin

Combining the two suggestions - how about:

If dapr init fails to copy to the default location (/usr/local/bin) print a better message e.g Cannot write to /usr/local/bin, please run sudo dapr init.
Add an optional arg to dapr init, --install-path, to install to a user-provided location instead of /usr/local/bin & include output at the end to add the specified location to the path:

!!!dapr installed to [user-provided location], please run the following to add it to your path:

    export PATH=$PATH:[user-provided location]

Related issue: https://github.com/dapr/cli/issues/168

authors: LMWF brendandburns yaron2

repo: dapr/cli


text:
Helm Chart：Unnecessary RBAC permissions

Description
The bug is that the Deployment dapr-operator in the charts has too much RBAC permission than it needs. The service account of dapr-operator is bound to a clusterrole (operator.yaml#L15) with the following permissions:

get/list verb of the secrets resource (ClusterRole)
delete verb of the services resource (ClusterRole)

After reading the source code of dapr-operator, I didn't find any Kubernetes API usages using list secrets and delete services permissions. Besides, some of these unused permissions may have potential risks. For example, if malicious users gain control of a Kubernetes node running a dapr-operator pod, they can list all the names of the secrets, and with the name, they can get the details of all the secrets objects (since this is declared in a ClusterRole).
Therefore, these permissions should be rechecked to determine if they are truly unnecessary. If they are, the issue should be fixed by removing the unnecessary permissions or or other feasible methods.
To Reproduce
Use helm chart with default values.

Thanks, would you be interested in opening a PR with the changes you think can be done to the cluster roles? We have automated tests on Kubernetes so if anything's not behaving properly we'll know right away.

These ClusterRole's and ClusterRoleBindings are a concern for us too

authors: Yseona rajivml yaron2

repo: dapr/dapr


text:
Document component metrics

Component metrics were added in https://github.com/dapr/dapr/issues/4068 and need to be documented.

This is a dupe of https://github.com/dapr/docs/issues/2245

repo: dapr/docs


text:
Workflow terminate/purge: remove non_recursive query option

Updates from PR https://github.com/dapr/dapr/pull/7498

@JoshVanL - Looks great. Set to waiting on Code PR before merging.

@msfussell please note the PR is updated to now remove the query completely after discussion on https://github.com/dapr/dapr/pull/7498

@msfussell please note the PR is updated to now remove the query completely after discussion on dapr/dapr#7498

For the recursive purge, we decide to remove the setting altogether, it that it always does this? Just making sure I understand this correctly. This statement "Removes this option so that recursive is always enabled with no API field exposing the option."

@msfussell correct, the option has been completely removed, and workflow deletion will always be done recursively. This option can be added back in future if we decide it is needed.

authors: JoshVanL msfussell


text:
Regarding custom middleware to setup in the pipeline and how to create

Hi Team,
Please let me know how to create the custom middleware in c#
how to register it.
And how to configure it in a microservice to use it.
Please let me know in detailed steps as I have been struggling a lot on this.
Please do pass the sample application from top to bottom steps.

Closing as a duplicate of #1278

authors: JitenderUDecrypt WhitWaldo

repo: dapr/dotnet-sdk


text:
Dapr sidecar does not contain subscribed topics provided by java app

Expected Behavior
Dapr sidcar of app shows in container logs the array with the subscribed topics. This would mean: events from subscribed topics are retrieved by java application.
Actual Behavior
Events are not provided to the java application.
The dapr sidecar logs show following logs:

time="2020-04-03T13:47:47.693907425Z" level=info msg="starting Dapr Runtime -- version 0.5.0 -- commit v0.3.0-rc.0-157-gb3bcd88" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.694047726Z" level=info msg="log level set to: debug" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.694762231Z" level=info msg="metrics server started on :9090/" app_id= instance= scope=dapr.metrics type=log ver=0.5.0
time="2020-04-03T13:47:47.712423472Z" level=info msg="kubernetes mode configured" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.712645473Z" level=info msg="dapr id: " app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.712816975Z" level=info msg="mTLS enabled. creating sidecar authenticator" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.713296478Z" level=info msg="trust anchors extracted successfully" app_id= instance= scope=dapr.runtime.security type=log ver=0.5.0
time="2020-04-03T13:47:47.71347548Z" level=info msg="authenticator created" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.723036856Z" level=info msg="found component messagebus (pubsub.azure.servicebus)" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:47:47.723328058Z" level=info msg="application protocol: http. waiting on port 8080" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.053883659Z" level=info msg="application discovered on port 8080" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.305592656Z" level=warning msg="either no actor state store or multiple actor state stores are specified in the configuration, actor stores specified: 0" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.31612004Z" level=info msg="App is subscribed to the following topics: []" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.31617134Z" level=info msg="Initialized service discovery to kubernetes" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.316216941Z" level=warning msg="actors: state store must be present to initialize the actor runtime" app_id= instance= scope=dapr.runtime.actor type=log ver=0.5.0
time="2020-04-03T13:48:29.316246741Z" level=warning msg="failed to init actors: state store does not support transactions which actors require to save state - please see https://github.com/dapr/docs" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.316481143Z" level=info msg="enabled metrics grpc middleware" app_id= instance= scope=dapr.runtime.grpc type=log ver=0.5.0
time="2020-04-03T13:48:29.316517043Z" level=info msg="sending workload csr request to sentry" app_id= instance= scope=dapr.runtime.grpc type=log ver=0.5.0
time="2020-04-03T13:48:29.367156045Z" level=info msg="certificate signed successfully" app_id= instance= scope=dapr.runtime.grpc type=log ver=0.5.0
time="2020-04-03T13:48:29.368351755Z" level=info msg="gRPC server is running on port 50001" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.368403855Z" level=info msg="starting workload cert expiry watcher. current cert expires on: 2020-04-04 14:03:29 +0000 UTC" app_id= instance= scope=dapr.runtime.grpc type=log ver=0.5.0
time="2020-04-03T13:48:29.368701957Z" level=info msg="enabled cors http middleware" app_id= instance= scope=dapr.runtime.http type=log ver=0.5.0
time="2020-04-03T13:48:29.368739458Z" level=info msg="enabled proxy http middleware" app_id= instance= scope=dapr.runtime.http type=log ver=0.5.0
time="2020-04-03T13:48:29.368755858Z" level=info msg="enabled metrics http middleware" app_id= instance= scope=dapr.runtime.http type=log ver=0.5.0
time="2020-04-03T13:48:29.368775358Z" level=info msg="http server is running on port 3500" app_id= instance= scope=dapr.runtime type=log ver=0.5.0
time="2020-04-03T13:48:29.368796758Z" level=info msg="dapr initialized. Status: Running. Init Elapsed 41656.374987ms" app_id= instance= scope=dapr.runtime type=log ver=0.5.0

In the pod we have the dapr container and the app container. We added an additional container in the pod (in order to do curl commands) and called the java app endpoint:
curl GET http://10.240.0.85:8080/<appid>/dapr/subscribe
that returned:
["topic.app.apptopic-request","app.create","app.update","app.delete"]
The logs above are from AKS environment. We restarted the dapr-system pods, also the app pod, but the dapr sidecar of the app has still no subscription to topics although the app returns on the corresponding REST endpoint the required topics to subscribe
We tested the collaboration between the apps first on localhost with the same code, there it works as it should:

app 1: publishes on topic1 a msg
app 2: is subscribed to topic 1 and retrieves the event, when app 1 has published the msg

Please let us know what we should try / check in order to get this running on the server.
Thanks

Hi @pagufler,
Please, change the controller to response to the following API instead: GET http://10.240.0.85:8080/dapr/subscribe - there should be no appid in the path.

Hi @artursouza,
ah, that was the problem. We knew it must be something small, but did not see it.
Thank you! Now the application gets the event

authors: artursouza pagufler

repo: dapr/java-sdk


text:
[BUG] Asyncio DaprClient raising "coroutine 'Channel.close' was never awaited"

Expected Behavior
I'm getting this error in my logs when an asyncio DaprClient exists an async with block:
./dapr/aio/clients/grpc/client.py:172: RuntimeWarning: coroutine 'Channel.close' was never awaited

I haven't perceived any other side effects, but I haven't tested much. Maybe there is a resource leak.
Dapr version: 1.12.0
SDK version: 1.12.0
Python version: 3.9
Actual Behavior
To have DaprClient correctly manage the lifecycle of the channel and close it upon exiting the async with block.
Steps to Reproduce the Problem
Just create an asyncio DaprClient and use it in an async with block.
Also, I've noticed that the bug appears to be caused by this method on ./dapr/aio/clients/grpc/client.py, line 172:
    async def close(self):
        """Closes Dapr runtime gRPC channel."""
        if hasattr(self, '_channel') and self._channel:
            self._channel.close()

There seems to be a missing await on self._channel.close().
Release Note

RELEASE NOTE:

I'll patch this up and will add a 1.12.1. I won't bother with updates for 1.11.X and earlier however. The SDK can be used with previous versions of Dapr Runtime, so no concerns there.

Fixed in 1.12.1
https://github.com/dapr/python-sdk/releases/tag/v1.12.1
Should be available via PyPI in a few minutes. Build job here:
https://github.com/dapr/python-sdk/actions/runs/7008586040

authors: berndverst ivarec

repo: dapr/python-sdk


text:
启动报错

musicbox
Traceback (most recent call last):
  File "/usr/local/bin/musicbox", line 11, in <module>
    load_entry_point('NetEase-MusicBox==0.2.5.4', 'console_scripts', 'musicbox')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.linux-x86_64/egg/NEMbox/__main__.py", line 14, in <module>
  File "/usr/local/lib/python2.7/dist-packages/NetEase_MusicBox-0.2.5.4-py2.7.egg/NEMbox/menu.py", line 921
    self.datatype, self.title, self.datalist, *_ = self.stack[0]
                                              ^
SyntaxError: invalid syntax

+1，同样错误，系统是manjaro20

建议换到Python3

authors: NibaZShab kigawas sonichy

repo: darknessomi/musicbox


text:
send more files into the analysis server as overlays

I.e., not just .dart files. We'll need a way to figure out what files. Currently it would look something like .analysis_options, *.dart, *.html.

@pq, @scheglov, @bwilkerson

Yes please!  It would be great to see incremental analysis of .analysis_options.
Thanks!

We're sending in *.dart and .analysis_options; we should discuss a way to get a set of path globs for interesting files from the analysis server :)

Cool!
I opened an issue https://github.com/dart-lang/sdk/issues/24746 to track this idea.

authors: devoncarew pq

repo: dart-atom/dartlang


text:
Type check bound @Outputs

From an internal user:

From what I see there is currently no type check, so if you have a widget doing:
  <foo (x)="do($event)">

in you code you can have do(AnyType event) and it will compile just fine. As we are now moving to compiled templates, could this be made into a typed interface that would cause actual type error if it doesn't match the widget @Output?

@leonsenft WDUT?

This was probably a Dartium issue as it won't compile in DDC.

authors: leonsenft matanlurey

repo: dart-lang/angular


text:
Improve error message for * on

Currently using the * sytnax on a <template> element like
<template *ngIf="condition">

produces the error message

Invalid decorator in 'template' element

Providing a link to the * documentation could be more helpful for new users.
Originally filed here: https://github.com/dart-lang/angular_analyzer_plugin/issues/451

Ah, didn't realize this repository is deprecated.
Where's the active one?

https://github.com/dart-lang/angular/tree/master/angular_ast
Not sure if we have a label yet for angular_ast specific issues, but we can certainly make one.

https://github.com/dart-lang/angular/issues/687

authors: MichaelRFairhurst alorenzen


text:
Add timezone package

Would be lovely to get timezone https://pub.dev/packages/timezone in dartpad to simplify testing different timezone code

Closed in #995

Actually, this isn't shipped to production, so I'm re-opening this issue. This package has been shipped to our hidden testing instance https://dartpad.dev/?channel=dev
Please exercise your suggested package on this instance and confirm here that it works as intended. If you do confirm this as working I'll ship it to stable, beta, master, and old channels on dartpad.dev. If you don't confirm, I won't ship it.

authors: AAverin domesticmouse johnpryan

repo: dart-lang/dart-pad


text:
Code completion isn't ranked well

The first result is both incorrect and deprecated.

Thanks for the report.
This is serving from a very old and somewhat broken ordering model. I need to get a few changes into Analysis Server, and will then replace with a much more accurate one.
I'll retest with the same code before landing the update.

https://github.com/dart-lang/sdk/issues/24339

authors: lukechurch sethladd


text:
Enforce two strict analysis modes

I like these changes for a few specific reasons:

Future => Future<void> ensures with static analysis you won't try to use the result.
Future => Future<AnalysisServer> changes any method/field access on the result from dynamic dispatch to static dispatch; safer, smaller, faster.
Future => Future<dynamic> is not really a functional improvement; it lucks ugly. But it takes code that was already using dynamic (just secretly) and makes it explicit, so that developers are aware of dynamicism in their code.

Some changes like {} => <dynamic, dynamic>{} are pretty ugly. I hope that with generalized typedefs, some styles come out like typedef JsonMap = Map<dynamic, dynamic>, etc.

This change is impacting the compilation phase. That's probably bad. This may need to wait until after we implement the single sdk change.
/cc @devoncarew

This change is impacting the compilation phase. That's probably bad. This may need to wait until after we implement the single sdk change.
/cc @devoncarew

DBC: do we want to update the flutter submodule as part of this change? It may be best to keep that separate from this PR.

I think they should definitely be different changes.

authors: devoncarew domesticmouse srawlins

repo: dart-lang/dart-services


text:
[ffigen] Support ObjC objects in global variables

Global variables using ObjC types (interfaces or blocks) will now use the correct Dart wrapper types, instead of the raw C-style pointers.
Fixes https://github.com/dart-lang/native/issues/1418

coverage: 91.306%. first build
when pulling 7ddfbd1333c881c1a9b405ed46fd51feab2cb440 on global_obj
into 4eaec5a18977e215b3d37a6293564d1911137cef on main.

authors: coveralls liamappelbe

repo: dart-lang/native


text:
improving errors for unbalanced trees

(Moved from dart-lang/web-ui#217)
These are a couple minor improvements we can do to give early feedback to our users:
when there is a mismatch close tag, show the location of the open-tag that wasn't closed correctly
when a component close tag is missing (either use a warning always, or at least if such component has no <content> tags in it)

This issue has been moved to dart-lang/html#21.

authors: DartBot sethladd

repo: dart-lang/sdk


text:
polymer application compilation error

This issue was originally filed by Roman.Korneyev@gmail.com

Dart2js output contains the following erorr messages:
This import is not annotated with @MirrorsUsed, which may lead to unnecessarily large generated code.
Try adding '@MirrorsUsed(...)' as described at https://goo.gl/Akrrog.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:18.394552 to compile od_web|web/load.html_bootstrap.dart.
[Info from Dart2JS]:
Compiling od_web|web/resetPassword.html_bootstrap.dart...
[Warning from Dart2JS]:
web/resetPassword.html_bootstrap.dart:
294 methods retained for use by dart:mirrors out of 2026 total methods (15%).
[Info from Dart2JS]:
Took 0:00:05.577569 to compile od_web|web/resetPassword.html_bootstrap.dart.
[Info from Dart2JS]:
Compiling od_web|web/profile.html_bootstrap.dart...
[Warning from Dart2JS]:
web/profile.html_bootstrap.dart:154:53:
'smoke_8' has no member named 'T'.
          #viewmodel: const Declaration(#viewmodel, smoke_8.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^
[Error from Dart2JS]:
web/profile.html_bootstrap.dart:154:53:
Not a compile-time constant.
          #viewmodel: const Declaration(#viewmodel, smoke_8.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:05.676572 to compile od_web|web/profile.html_bootstrap.dart.
[Info from Dart2JS]:
...
Took 0:00:10.231995 to compile od_web|web/home.html_bootstrap.dart.
[Info from Dart2JS]:
Compiling od_web|web/data.html_bootstrap.dart...
[Warning from Dart2JS]:
web/data.html_bootstrap.dart:159:53:
'smoke_9' has no member named 'T'.
          #viewmodel: const Declaration(#viewmodel, smoke_9.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^
[Error from Dart2JS]:
web/data.html_bootstrap.dart:159:53:
Not a compile-time constant.
          #viewmodel: const Declaration(#viewmodel, smoke_9.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:09.715136 to compile od_web|web/data.html_bootstrap.dart.
[Info from Dart2JS]:
Compiling od_web|web/profilewizard.html_bootstrap.dart...
[Warning from Dart2JS]:
web/profilewizard.html_bootstrap.dart:255:53:
'smoke_15' has no member named 'T'.
          #viewmodel: const Declaration(#viewmodel, smoke_15.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^^
[Warning from Dart2JS]:
web/profilewizard.html_bootstrap.dart:264:53:
'smoke_15' has no member named 'T'.
          #viewmodel: const Declaration(#viewmodel, smoke_15.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^^
[Error from Dart2JS]:
web/profilewizard.html_bootstrap.dart:255:53:
Not a compile-time constant.
          #viewmodel: const Declaration(#viewmodel, smoke_15.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:22.513475 to compile od_web|web/profilewizard.html_bootstrap.dart.
[Info from Dart2JS]:
Compiling od_web|web/datawizard.html_bootstrap.dart...
[Error from Dart2JS]:
web/datawizard.html_bootstrap.dart:58:9:
Symbol literal '#_hightlightChanged' is currently unsupported by dart2js.
        #_hightlightChanged: (o) => o._hightlightChanged,
        ^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS]:
web/datawizard.html_bootstrap.dart:246:53:
'smoke_14' has no member named 'T'.
          #viewmodel: const Declaration(#viewmodel, smoke_14.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^^
[Error from Dart2JS]:
web/datawizard.html_bootstrap.dart:250:11:
Symbol literal '#_hightlightChanged' is currently unsupported by dart2js.
          #_hightlightChanged: const Declaration(#_hightlightChanged, Function, kind: METHOD),
          ^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS]:
web/datawizard.html_bootstrap.dart:250:50:
Symbol literal '#_hightlightChanged' is currently unsupported by dart2js.
          #_hightlightChanged: const Declaration(#_hightlightChanged, Function, kind: METHOD),
                                                 ^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS]:
web/datawizard.html_bootstrap.dart:292:9:
Symbol literal '#_hightlightChanged' is currently unsupported by dart2js.
        #_hightlightChanged: r'_hightlightChanged',
        ^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS]:
web/datawizard.html_bootstrap.dart:246:53:
Not a compile-time constant.
          #viewmodel: const Declaration(#viewmodel, smoke_14.T, kind: PROPERTY, annotations: const [smoke_2.reflectable, smoke_1.published]),
                                                    ^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:04.672336 to compile od_web|web/datawizard.html_bootstrap.dart.
Build failed.
What version of the product are you using? On what operating system?

Dart Editor version 1.4.0.dev_04_00 (DEV)
Dart SDK version 1.4.0-dev.4.0
polymer 0.10.0-pre.9

This issue has been moved to dart-lang/polymer-dart#171.


text:
using core.Resource in a Dart transformer leads to Build error

using the core.Resource class in a Barback transformer leads to a build error in the project referencing that transformer. In case of my transformer project this error looks like this:
Build error: Transform InsertCopyright on {your project} threw error: Load Error for "package:simple_resource_loading_transformer/copyright.txt": SocketException: OS Error: Connection refused
a little bit more explanation in this stackoverflow ticket

This issue was moved to dart-lang/barback#65

authors: sethladd simon-void


text:
Exception computing quick fix

I don't know what the code looked like when this error occurred, but it was almost certainly invalid code that caused the exception. I think it was while I was editing one line, and the likely intermediate states are:
_checkPackageMap(root, isNull);
_checkPackageMap(_packageMaproot, isNull);
_checkPackageMap(_packageMap()root, isNull);
_checkPackageMap(_packageMap(root, isNull);
_checkPackageMap(_packageMap(root), isNull);
expect(_packageMap(root), isNull);

Dart analysis server, SDK version 1.15.0-edge.d8786ac278f98e771e230970ee860f35ea7a6ff1, server version 1.14.0, error: Exception from fix contributor: DefaultFixContributor
RangeError: Index: 1, Size: 1
#0      NodeListImpl.[] (package:analyzer/src/dart/ast/ast.dart:7565)
#1      FixProcessor._addFix_addMissingParameter (package:analysis_server/src/services/correction/fix_internal.dart:432)
#2      FixProcessor.compute.<compute_async_body> (package:analysis_server/src/services/correction/fix_internal.dart:245)
#3      Future.Future.microtask. (dart:async/future.dart:144)
#4      _rootRun (dart:async/zone.dart:891)
#5      _CustomZone.run (dart:async/zone.dart:790)
#6      _CustomZone.runGuarded (dart:async/zone.dart:696)
#7      _CustomZone.bindCallback. (dart:async/zone.dart:721)
#8      _rootRun (dart:async/zone.dart:895)
#9      _CustomZone.run (dart:async/zone.dart:790)
#10     _CustomZone.runGuarded (dart:async/zone.dart:696)
#11     _CustomZone.bindCallback. (dart:async/zone.dart:721)
#12     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#14     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

@scheglov

https://codereview.chromium.org/1776353003

https://github.com/dart-lang/sdk/commit/21ed1750cef0cfed837d24637a15cae35d28953d

authors: bwilkerson scheglov


text:
Analyzer Feedback from IntelliJ

Analyzer Feedback from IntelliJ; /cc @bwilkerson
Version information

IDEA IC-171.3780.107
1.24.0-edge.368d1ec58af35f61938f62d2be81d310a6c4c430
IC-171.3780.107, JRE 1.8.0_112-release-736-b13x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.12.3 unknown, screens 1680x1050  Retina

Exception
Dart analysis server, SDK version 1.24.0-edge.368d1ec58af35f61938f62d2be81d310a6c4c430, server version 1.18.0, FATAL error: Failed to handle request: {clientRequestTime: 1491315686668, params: {included: [/Users/devoncarew/temp/tmp/flutter/examples/hello_world], excluded: [/Users/devoncarew/temp/tmp/flutter/examples/hello_world/.idea, /Users/devoncarew/temp/tmp/flutter/examples/hello_world/.idea, /Users/devoncarew/temp/tmp/flutter/examples/hello_world/.pub, /Users/devoncarew/temp/tmp/flutter/examples/hello_world/build]}, method: analysis.setAnalysisRoots, id: 3}
RangeError: Value not in range: -5
#0      _StringBase.substring (dart:core-patch/string_patch.dart:363)
#1      PluginWatcher._checkPluginsFor.getPackageRoot (package:analysis_server/src/plugin/plugin_watcher.dart:98)
#2      PluginWatcher._checkPluginsFor (package:analysis_server/src/plugin/plugin_watcher.dart:108)
#3      PluginWatcher.addedDriver.<anonymous closure> (package:analysis_server/src/plugin/plugin_watcher.dart:56)
#4      _rootRunUnary (dart:async/zone.dart:1128)
#5      _CustomZone.runUnary (dart:async/zone.dart:1012)
#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:909)
#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#9      _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:387)
#10     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:328)
#11     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:386)
#12     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:254)
#13     _AsBroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:480)
#14     _rootRunUnary (dart:async/zone.dart:1132)
#15     _CustomZone.runUnary (dart:async/zone.dart:1012)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:909)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#18     _DelayedData.perform (dart:async/stream_impl.dart:578)
#19     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:694)
#20     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:654)
#21     _rootRun (dart:async/zone.dart:1116)
#22     _CustomZone.run (dart:async/zone.dart:1001)
#23     _CustomZone.runGuarded (dart:async/zone.dart:901)
#24     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:926)
#25     _rootRun (dart:async/zone.dart:1120)
#26     _CustomZone.run (dart:async/zone.dart:1001)
#27     _CustomZone.runGuarded (dart:async/zone.dart:901)
#28     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:926)
#29     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#30     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#31     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:99)
#32     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:152)

1491315686654 started analysis server:
  /Users/devoncarew/projects/workspace/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dart /Users/devoncarew/projects/workspace/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/snapshots/analysis_server.dart.snapshot -
1491315687190 <= {"event":"server.connected","params":{"version":"1.18.0","pid":25837,"sessionId":""}}
1491315687246 <= {"id":"0","result":{"version":"1.18.0"}}
1491315687248 => {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]},"clientRequestTime":1491315686667}
1491315687248 => {"id":"2","method":"analysis.updateOptions","params":{"options":{"enableAsync":true,"enableDeferredLoading":true,"enableEnums":true,"enableNullAwareOperators":true,"enableSuperMixins"
1491315687248 => {"id":"3","method":"analysis.setAnalysisRoots","params":{"included":["/Users/devoncarew/temp/tmp/flutter/examples/hello_world"],"excluded":["/Users/devoncarew/temp/tmp/flutter/example
1491315687248 => {"id":"4","method":"analysis.setPriorityFiles","params":{"files":["/Users/devoncarew/temp/tmp/flutter/examples/hello_world/lib/main.dart"]},"clientRequestTime":1491315686668}
1491315687248 => {"id":"5","method":"analysis.setSubscriptions","params":{"subscriptions":{"HIGHLIGHTS":["/Users/devoncarew/temp/tmp/flutter/examples/hello_world/lib/main.dart"],"OVERRIDES":["/Users/d
1491315687255 <= {"id":"1"}
1491315687267 <= {"id":"2"}
1491315687305 <= {"event":"server.status","params":{"pub":{"isListingPackageDirs":true}}}
1491315687306 <= {"event":"server.status","params":{"pub":{"isListingPackageDirs":false}}}
1491315687448 <= {"id":"3"}
1491315687451 <= {"id":"4"}
1491315687457 <= {"id":"5"}
1491315687462 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1491315688101 <= {"event":"server.error","params":{"isFatal":true,"message":"Failed to handle request: {clientRequestTime: 1491315686668, params: {included: [/Users/devoncarew/temp/tmp/flutter/example

Did you get this by opening an unmodified copy of the hello_world example from Flutter, or are there changes I might need to make to reproduce this?

I'm sorry to say I don't remember :(
Is there a crash file I can provide?

I tried loading the hello_world example, but an not able to reproduce this behavior. Please re-open this or open a new issue if it happens again.

authors: bwilkerson devoncarew


text:
analyzer reports error in an optional new/const code

class Widget { }

class MaterialPageRoute {
  final Widget Function() builder;
  const MaterialPageRoute({this.builder});
}

void main() {
  print(MaterialPageRoute(
    builder: () { return Widget(); }
  ));
}

reports
sdk/bin/dartanalyzer --preview-dart-2 --strong /tmp/reduction.dart
Analyzing /tmp/reduction.dart...
  error • The function expression type '() → dynamic' isn't of type '() → Widget'. This means its parameter or return type does not match what is expected. Consider changing parameter type(s) or the returned type(s) at /tmp/reduction.dart:11:14 • strong_mode_invalid_cast_function_expr
1 error found.

reduced from flutter/flutter#14899

@leafpetersen @stereotype441 In Dart 2, do we expect the type of () { return Widget(); } be () → Widget? If so, do either of you know where that should be happening? (There's code in StaticTypeAnalyzer._inferLocalFunctionReturnType that appears to expect that the type of the function will have already been inferred, but I don't know where that happens.)

This seems to be a recent regression.  I don't see this error in dev.23.
This only happens with optional new: if I add new to the constructor call, it works.
@bwilkerson Yes, that function should have type () -> Widget both because of the downwards context, and because of the upwards context.  Here's a simpler repro that just captures the upwards part:
class Widget { }

void main() {
  var a = () { return Widget(); };
  int x = a;
}

The error message here implies that the inferred type of a is () -> dynamic, which is wrong.
The analyzer doesn't do exactly the right thing in the presence of upwards and downwards inference (this is a known issue  https://github.com/dart-lang/sdk/issues/29606) but ignoring this, here's my recollection of how this should be working:
While traversing the AST in the resolver/static_type_analyzer dance, InferenceContext.addReturnOrYieldType is called on every returned expression, and the least upper bound of the types of all of the return values is computed.
In Resolver.visitBlockFunctionBody, popReturnContext is called which marks the function body with the computed inferred type from all of the return expressions.
In StaticTypeAnalyzer._inferLocalFunctionReturnType, InferenceContext.getContext is called to recover the inferred type that was cached on the function body, and this type is marked into the element model at that point.
My guess is that at the point where addReturnOrYieldType is called on the returned constructor call, the version without new is for some reason not resolved to the appropriate type.

Thanks! I think I understand what the problem is, and what I'm going to need to do to fix it.

any updates here?

I'm still working on it. It requires refactoring the support we'd added so that it happens as a separate pass rather than being done in the resolver. That necessitated invoking that extra pass in both the Driver and Task model implementations. I think I'm getting close, and hope to land it on Monday.

This should be fixed by https://dart-review.googlesource.com/c/sdk/+/44384.

authors: bwilkerson dgrove leafpetersen mraleph


text:
Analyzer Error

Analyzer Feedback from IntelliJ
Version information

IDEA IC-181.5087.20
2.0.0-edge.46ab040e589adc5200370dec7952ce5150850822
IC-181.5087.20, JRE 1.8.0_152-release-1136-b39x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1680x1050

Exception
Dart analysis server, SDK version 2.0.0-edge.46ab040e589adc5200370dec7952ce5150850822, server version 1.20.3, error: NoSuchMethodError: Class 'DynamicElementImpl' has no instance getter 'supertype'.
Receiver: Instance of 'DynamicElementImpl'
Tried calling: supertype
#0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1      InheritanceManager._gatherInterfaceLookupMaps (package:analyzer/src/dart/resolver/inheritance_manager.dart:478:40)
#2      InheritanceManager._computeInterfaceLookupMap (package:analyzer/src/dart/resolver/inheritance_manager.dart:450:9)
#3      InheritanceManager._gatherInterfaceLookupMaps (package:analyzer/src/dart/resolver/inheritance_manager.dart:496:15)
#4      InheritanceManager.lookupOverrides (package:analyzer/src/dart/resolver/inheritance_manager.dart:205:9)
#5      InstanceMemberInferrer._computeFieldOverrideType (package:analyzer/src/task/strong_mode.dart:114:28)
#6      InstanceMemberInferrer._inferField (package:analyzer/src/task/strong_mode.dart:414:9)
#7      InstanceMemberInferrer._inferClass.<anonymous closure> (package:analyzer/src/task/strong_mode.dart:319:11)
#8      List.forEach (dart:core-patch/dart:core/growable_array.dart:274)
#9      InstanceMemberInferrer._inferClass (package:analyzer/src/task/strong_mode.dart:318:29)
#10     InstanceMemberInferrer.inferCompilationUnit (package:analyzer/src/task/strong_mode.dart:88:9)

Duplicate of #32037.

authors: bwilkerson kostaa


text:
The VM should not print CFE warnings when it is running code

Since we are (as far as I know) considering it non-breaking to add new warnings in CFE we should not be printing warnings when running code. It's probably ok to print them when compiling to kernel only.
If I have some process which runs the Dart vm and processes the output, it would be breaking to me to have new warnings printed when I upgrade my SDK. I think the exact output of the Dart VM should be considered part of what is stable for the SDK. If we want to be able to add new warnings without breaking SDK version bumps we shouldn't print warnings during execution.

Ping. I noticed a new warning for using ! to negate a void value which gets printed then the code runs anyway - can we suppress warnings when the VM is about to run code instead of, say, take a snapshot?

When Dart VM runs from the source(rather than from the snapshot) it does compile the source first and the warnings you see I believe are coming from the compiler.
If you create a snapshot first, then run Dart VM from that snapshot there should be no warnings.
Does the above match your experience?

Yes that matches my experience and the behavior when running from source is what I think we need to change - we should suppress the compiler output in that case. Neither running from source, nor creating an app-jit snapshot with training data should output anything on stderr from the compiler.

when running from source is what I think we need to change - we should suppress the compiler output in that case

I am not sure I understand this. Couldn't that be the only opportunity for us to give user feedback about warnings in their dart program?

Yes, if they never compile to a script snapshot or to kernel they might never see the warning from the CFE. In that case we'll rely on them running the analyzer to see it.
AFAIK we're treating new CFE warnings as non-breaking, which means we'll suddenly start changing the output of Dart programs when run from source and upgrading SDKs.

In that case we'll rely on them running the analyzer to see it.

That sounds pretty fundamental. I don't understand why we would make the case of running dart from command line ($ dart hello-world.dart) less user-friendly, why we would mandate use of analyzer to see all important output.

AFAIK we're treating new CFE warnings as non-breaking, which means we'll suddenly start changing the output of Dart programs when run from source and upgrading SDKs.

I would focus on this as there are a lot of assumptions here: 1) are we treating new CFE warnings as breaking/non-breaking? 2) Why running dart embedder from source and getting new warnings at that point is different from compiling that source explicitly and getting those new warnings? 3) Are new warnings produced by analyzer treated differently that warnings produced by dart command line embedder?
Answers to the questions above seem to be prerequisites and outside of scope for this blanket request for dart command line embedder to silence all CFE warnings when running from source.
If possible can you share some context for this request as I don't understand what problem you are trying to solve that existing set of tools can't solve and the only solution is for dart embedder to filter out warnings.

This is not a CFE warning, it's a Dart language error.  It's mandated by https://github.com/dart-lang/sdk/blob/master/docs/language/informal/generalized-void.md, and it's definitely a breaking change.
The VM already prints warnings and errors on stderr.  You should just be able to redirect that.  Ultimately of course, you should try to get the error in the code you're running fixed.
Hiding errors when running code seems like a usability problem.  Some errors are (will be) fatal and there's no way to run the code at all.  In those cases at least, we need to give the user some indication.

are we treating new CFE warnings as breaking/non-breaking?

I've seen them show up without any note at all the changelog - let alone a breaking change notification. In some conversations with @leafpetersen it was my understanding that we'd treat new errors as breaking (if they don't already exist in the analyzer as errors), and new warnings as non-breaking.

Why running dart embedder from source and getting new warnings at that point is different from compiling that source explicitly and getting same new warnings there?

When executing code stderr may have meaning that is determined by the author, not by the Dart team. When compiling explicitly stderr has meaning determined only by the Dart team.

Are new warnings produced by analyzer treated differently than warnings produced by dart command line embedder? (meaning are analyzer's warnings similarly "breaking/non-breaking"?)

AFAIK new warnings in either are considered non breaking externally - the code still runs and maintains the same semantics. They are breaking internally but we have tolerance for adding new static checking without a breaking version bump in the SDK because we control the code and can migrate it.

If possible can you share some context for this request as I don't understand what problem you are trying to solve that existing set of tools can't solve and the only solution is for dart embedder to filter out warnings.

I have tools written in Dart where stderr has specific meaning. In some cases any output means "this tool is broken and you can't trust it". I sometimes need to hop between versions of the SDK and running from source is smoother than constantly recompiling for each version and running from kernel. When I upgrade my Dart SDK and these tools suddenly appear broken it means I must edit my code, or worse potentially code in dependencies I don't own, in order to continue to use the tool. I consider forcing a change in the code in order to get the same behavior as a prior version to be a breaking change.

This is not a CFE warning, it's a Dart language error.

It wasn't my intention to focus on any particular warning or error. Another case where this came up had to do with mandating new return statements in some methods. If I recall correctly that was defined as a warning by the language team.

The VM already prints warnings and errors on stderr. You should just be able to redirect that.

I can't redirect it if stderr already has a meaning in my program.

Hiding errors when running code seems like a usability problem. Some errors are (will be) fatal and there's no way to run the code at all. In those cases at least, we need to give the user some indication.

Yes, that's why I've specifically focused this issue on warnings. If we can't run the code - and by definition we can't if there are errors - then printing to stderr is the most sensible thing to do. We're already aware as a team of the impact of adding new errors and making code not run at all - the issue is that we are changing program behavior on SDK upgrades by adding warnings which have not been treated with the same caution as errors.

Thanks for the details.

When executing code stderr may have meaning that is determined by the author, not by the Dart team. > When compiling explicitly stderr has meaning determined only by the Dart team.

I understand what you mean, but I don't think that this is accurate. "When executing code" includes compilation and that might the only channel for the compiler to provide diagnostic to the user( see my $ dart hello_world.dart example.

I have tools written in Dart where stderr has specific meaning.

Can you make your tool more robust in a sense of ignoring stderr(if that is what you desire) until your code actually starts executing?

It depends on the tool, I might not own all the tools that are executing programs and reading from stderr.

I think your best bet then would be to do the compilation separately and feed resultant kernel to the vm.

I'm sorry, I just discovered that standalone dart embedder has --suppress-fe-warnings option that does what you want already:
╰─➤  xcodebuild/DebugX64/dart-sdk/bin/dart --suppress_fe_warnings hello.dart
Hello, world!
╰─➤  xcodebuild/DebugX64/dart-sdk/bin/dart  hello.dart
hello.dart:4:3: Warning: Must explicitly return a value from a non-void function.
  return;
  ^
Hello, world!
╰─➤  cat hello.dart
int main() {
  print('Hello, world!');
  return 0;
  return;
}

So that makes discussion above slightly irrelevant. Again, sorry about that.

To me it seems like the issue here is that we have two different modes of working with the same dart executable.
One is running a production program, the other is running code while developing.
In the latter case you do want to be told about warnings. In the former case, we should assume you are aware of the warning and just want to run the program (which may emit meaningful messages on stderr).
No single behavior of the dart executable can satisfy both behaviors.
The simplest solution, as already noticed above, is to have a flag. The next question is then which behavior is the default, and which behavior requires the flag.
The discoverability of the flag is low. The usability impact of not displaying warnings is high (we assume most users will want to fix the warnings). That suggests that the default should be to show warnings.
There is a cost to this because people running in production might not be aware of the flag until they get hit by a new warning. Adding warnings is non-breaking for the language (they do not change the behavior of any running program), but not necessarily for the dart executable because it mixes compile-time and run-time behavior and the run-time behavior of the program might include the output on stderr.
A different, possibly more practical, solution could be to have two different dart executables, dart-dev and dart, where dart-dev prints warnings and enables assertions by default, and dart does not.
(Or, in the traditional Unix way, it's just one executable that dispatches on the name it's invoked as).
Or it could have a --dev flag that does the same things.

I just discovered that standalone dart embedder has --suppress-fe-warnings option that does what you want already

Awesome! That definitely helps. I'm happy to see further consideration of changing the default. My preference skews towards suppressing by default, but given that the flag exists I'm not prepared to argue quite as strongly. We could also consider defaulting this for pub run in the (somewhat rare) cases of running from source. https://github.com/dart-lang/pub/issues/1990

Or it could have a --dev flag that does the same things.

I think this has come up before - the idea of having a single flag to wrap up the things a developer would generally use - like --enable-asserts, --enable-fe-warnings (assuming we change the default), as well as skipping some optimizations that we might want in "production". I can't find the issue but I think there was one around using more memory than necessary in case observatory was turned on, we could consider only allowing observatory in --dev mode and saving the memory otherwise.

I think having a flag to suppress warnings is the right thing here.  For what it's worth, that seems to be what java does, we could look at other languages.  For programs that parse output, the best practice should be to run with that flag.

The --disable-fe-warnings flag is a valid solution. I'd argue that the name is overly specific, and it should probably only be called --disable-warnings or something similar, if we intend to make it generally available and recommend its use.  Users should not need to know that there is a "front end".

We have changed the language specification so that tools are no longer required to report all specified warnings. More context is here. If CFE or the VM no longer want to report warnings, they are now free to do so while still respecting the language specification.

authors: aam kmillikin leafpetersen lrhn munificent natebosch


text:
'ClassElementForLink_Enum' has no instance method 'getSetter' with matching arguments during Map editing

Please review the below report for any information you do not wish to share and report to
https://github.com/dart-lang/sdk/issues/new
Exception from analysis server (running from VSCode / Dart Code)
What I was doing
(please describe what you were doing when this exception occurred)
Versions

Flutter SDK 1.2.1-pre.125
Visual Studio Code 1.31.0
Dart Code 2.22.3

Analyzer Info
The analyzer was launched using the arguments:
/Users/timsneath/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=2.22.3

Exception
Analysis failed: /Users/timsneath/git/me/console/console2/test/console2_test.dart context: exception_20190208_190924_190
NoSuchMethodError: Class 'ClassElementForLink_Enum' has no instance method 'getSetter' with matching arguments.
Receiver: Instance of 'ClassElementForLink_Enum'
Tried calling: getSetter("green")
Found: getSetter(String) => PropertyAccessorElement
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      ClassElementForLink.noSuchMethod (package:analyzer/src/summary/link.dart:566:48)
#2      ClassElementForLink_Enum.getSetter (package:analyzer/src/dart/element/element.dart:179:27)
#3      ElementResolver._resolveElement (package:analyzer/src/generated/element_resolver.dart:1532:30)
#4      ElementResolver._resolvePropertyAccess (package:analyzer/src/generated/element_resolver.dart:1589:23)
#5      ElementResolver.visitPrefixedIdentifier (package:analyzer/src/generated/element_resolver.dart:649:5)
#6      PrefixedIdentifierImpl.accept (package:analyzer/src/dart/ast/ast.dart:9875:49)
#7      ResolverVisitor.visitPrefixedIdentifier (package:analyzer/src/generated/resolver.dart:4927:10)
#8      PrefixedIdentifierImpl.accept (package:analyzer/src/dart/ast/ast.dart:9875:49)
#9      ResolverVisitor.visitAssignmentExpression (package:analyzer/src/generated/resolver.dart:3920:24)
#10     AssignmentExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:834:49)
#11     MapLiteralEntryImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:8241:11)
#12     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4909:10)
#13     UnifyingAstVisitor.visitMapLiteralEntry (package:analyzer/dart/ast/visitor.dart:3523:51)
#14     MapLiteralEntryImpl.accept (package:analyzer/src/dart/ast/ast.dart:8237:49)
#15     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:9166:20)
#16     MapLiteralImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:8313:14)
#17     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4909:10)
#18     UnifyingAstVisitor.visitMapLiteral (package:analyzer/dart/ast/visitor.dart:3517:41)
#19     ResolverVisitor.visitMapLiteral (package:analyzer/src/generated/resolver.dart:4789:11)
#20     MapLiteralImpl.accept (package:analyzer/src/dart/ast/ast.dart:8308:49)
#21     ExprTypeComputer.compute (package:analyzer/src/summary/link.dart:2542:16)
#22     TypeInferenceNode.evaluate (package:analyzer/src/summary/link.dart:5286:36)
#23     TypeInferenceDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:5136:7)
#24     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2217:13)
#25     DependencyWalker.walk (package:analyzer/src/summary/link.dart:2236:18)
#26     VariableElementForLink.inferredType (package:analyzer/src/summary/link.dart:5562:47)
#27     TopLevelVariableElementForLink.link (package:analyzer/src/summary/link.dart:5121:48)
#28     CompilationUnitElementInBuildUnit.link (package:analyzer/src/summary/link.dart:1640:16)
#29     LibraryElementInBuildUnit.link (package:analyzer/src/summary/link.dart:3810:12)
#30     LibraryCycleNode.link (package:analyzer/src/summary/link.dart:3516:15)
#31     LibraryCycleDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:3456:7)
#32     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2217:13)
#33     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#34     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#35     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#36     DependencyWalker.walk (package:analyzer/src/summary/link.dart:2236:18)
#37     LibraryCycleForLink.ensureLinked (package:analyzer/src/summary/link.dart:3489:42)
#38     Linker.link (package:analyzer/src/summary/link.dart:4012:35)
#39     _relink (package:analyzer/src/summary/link.dart:305:57)
#40     link (package:analyzer/src/summary/link.dart:123:3)
#41     LibraryContext.load.<anonymous closure> (package:analyzer/src/dart/analysis/library_context.dart:170:25)
#42     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#43     LibraryContext.load (package:analyzer/src/dart/analysis/library_context.dart:169:12)
#44     new LibraryContext (package:analyzer/src/dart/analysis/library_context.dart:67:5)
#45     AnalysisDriver._createLibraryContext (package:analyzer/src/dart/analysis/driver.dart:1610:29)
#46     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1424:30)
#47     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#48     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1414:20)
#49     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1234:33)
<asynchronous suspension>
#50     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2143:24)
<asynchronous suspension>
#51     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2073:5)
#52     new AnalysisServer (package:analysis_server/src/analysis_server.dart:213:29)
#53     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:86:26)
#54     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#55     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:526:21)
#56     _rootRun (dart:async/zone.dart:1124:13)
#57     _CustomZone.run (dart:async/zone.dart:1021:19)
#58     _runZoned (dart:async/zone.dart:1516:10)
#59     runZoned (dart:async/zone.dart:1463:12)
#60     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:605:12)
#61     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:524:7)
#62     Driver.start (package:analysis_server/src/server/driver.dart:427:7)
#63     main (file:///b/rr/tmp4zHFAb/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#64     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#65     main (file:///b/rr/tmp4zHFAb/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#66     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:298:32)
#67     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Diagnostics requested after the error occurred are:
[
    {
        "name": "/Users/timsneath/git/me/console/console2",
        "explicitFileCount": 5,
        "implicitFileCount": 310,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    }
]

@timsneath can you tell us the output of dart --version on your machine?

Unfortunately it's at home, and I'm traveling. But it's whatever was embedded in Flutter SDK 1.2.1-pre.125.

This crash hasn't been reported since Dart ~2.5.0. Please re-open if you see this crash again.

authors: srawlins stereotype441 timsneath


text:
_getCrashDump is broken

Dart SDK Version (dart --version)
Dart VM version: 2.1.1 (Unknown timestamp) on "linux_x64"

Whether you are using Windows, MacOSX, or Linux (if applicable)
Linux

Whether you are using Chrome, Safari, Firefox, Edge (if applicable)
any

When I try to debug my stuck application with the Observatory, I meet following error(from the json I got)
{"jsonrpc":"2.0","id":"","error":{"code":-32603,"message":"Internal error","data":{"details":"_getCrashDump: Unexpected exception:type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, dynamic>'\n#0      Message.toUri (dart:_vmservice/message.dart:122:51)\n#1      VMService._getCrashDump (dart:_vmservice:637:27)\n<asynchronous suspension>\n#2      VMService._routeRequestImpl (dart:_vmservice:666:22)\n<asynchronous suspension>\n#3      VMService.routeRequest (dart:_vmservice:656:36)\n<asynchronous suspension>\n#4      Client.onRequest (dart:_vmservice/client.dart:44:13)\n#5      Server._requestHandler (dart:vmservice_io/server.dart:335:12)\n<asynchronous suspension>\n#6      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)\n#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)\n#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)\n#9      _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)\n#10     _StreamController._add (dart:async/stream_controller.dart:640:7)\n#11     _StreamController.add (dart:async/stream_controller.dart:586:5)\n#12     _HttpServer._handleRequest (dart:_http/http_impl.dart:2664:19)\n#13     new _HttpConnection.<anonymous closure> (dart:_http/http_impl.dart:2422:19)\n#14     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)\n#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)\n#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)\n#17     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)\n#18     _StreamController._add (dart:async/stream_controller.dart:640:7)\n#19     _StreamController.add (dart:async/stream_controller.dart:586:5)\n#20     _HttpParser._headersEnd (dart:_http/http_parser.dart:372:19)\n#21     _HttpParser._doParse (dart:_http/http_parser.dart:701:15)\n#22     _HttpParser._parse (dart:_http/http_parser.dart:318:7)\n#23     _HttpParser._onData (dart:_http/http_parser.dart:810:5)\n#24     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)\n#25     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)\n#26     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)\n#27     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)\n#28     _StreamController._add (dart:async/stream_controller.dart:640:7)\n#29     _StreamController.add (dart:async/stream_controller.dart:586:5)\n#30     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1722:41)\n#31     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)\n#32     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)\n#33     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)\n#34     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)\n#35     _StreamController._add (dart:async/stream_controller.dart:640:7)\n#36     _StreamController.add (dart:async/stream_controller.dart:586:5)\n#37     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1284:33)\n#38     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)\n#39     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)\n#40     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)\n#41     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)\n#42     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)\n"}}}

_getCrashDump was an internal functionality and support for it has been removed.

authors: a-siva huiyiqun


text:
MOVE_FILE refactoring bazel URI

MOVE_FILE refactoring does not yet update URIs from the form package:a.b.c/foo.dart to package:a.b.x/foo.dart.  (Refactorings of the form package:a.b.c/foo.dart to package:a.b.c/bar.dart are working correctly.)
The issue is probably one of:

the index not returning such URI references
the Bazel URI resolver not functioning as expected

Seeing the correct behavior today, something in my dev-environment must have been broken yesterday.


text:
Can Dart add an Scanner just like Scanner in Java?

I want to use some feature ,just lile 'Scanner' in Java.
In Java,you can use the code like this: 'Scanner s = new Scanner();  int result = s.nextInt();' to get your resluts in the dos window,but Dart hasn't API to support this.
So what shall I do now?
Can Dart add the feature? Thanks.

I assume you are talking about getting input values from the standard input (e.g. terminal application asking the user for an answer).
Have you looked at the stdin global property from dart:io which gives an Stdin instance?
https://api.dart.dev/stable/2.7.0/dart-io/stdin.html
https://api.dart.dev/stable/2.7.0/dart-io/Stdin-class.html
This class provides a method called readByteSync which does more or less the same as you ask.

@AweiLoveAndroid, thanks for the inquiry. This type of question might be better answered in stack overflow, or other: https://dart.dev/community.

authors: AweiLoveAndroid devoncarew julemand101


text:
DomException is not an Object according to dartjs under NNBD

Take the following program:
main() {
  try {
    window.crypto.getRandomValues(Float32List(100));
  } on Object catch (e) {
    print("Caught Object");
  } catch (e) {
    print("Not Object?! $e");
  }
}

Compile it with dart2js as opted in to NNBD and run it in a browser. I would expect the first catch clause to capture the exception, but it does not. Instead, the second clause is the one that gets the thrown DomException.

Should be fixed by 7ac53f182561a35ad932f39f1183988bb23ef1ff.

authors: fishythefish munificent


text:
Access from static members to members from extensions.

It crashes during compilation, but does not show an error while writing code.
void main() {
  print(A.meth);
}

extension ExtA on A {
  String get value => '777';
}

class A {
  static String get meth => value;
}

You cannot access the data in the extension class from the main class.
void main() {
  A a =A();
  print(a.value);
}

extension ExtA on A {
  String get value => '777';
}

class A {
  //somethink
}

you can use Like this

Seems like a missing compile time error in the analyzer, it seems to resolve value in a static method thinking that it refers to the extension member, which does not seem to be correct to me /cc @scheglov

You cannot access the data in the extension class from the main class.
void main() {
  A a =A();
  print(a.value);
}

extension ExtA on A {
  String get value => '777';
}

class A {
  //somethink
}

you can use Like this

Of course I can’t. That's why I created this issue. Because the analyzer allows this.

https://dart-review.googlesource.com/c/sdk/+/148501

The analyzer now reports:

error • Instance members can't be accessed from a static method. • a.dart:10:29 • instance_member_access_from_static

The analyzer now reports:

error • Instance members can't be accessed from a static method. • a.dart:10:29 • instance_member_access_from_static

authors: Abdusin mraleph scheglov srawlins vr19860507


text:
Have test.py ensure dependencies

It would be greatly helpful if tools/test.py (or our testing flow in general) was "dependency-aware" so that running a test would automatically ensure all its dependencies are met (and - bonus points - up to date).
Some build systems (e.g. bazel), have test rules that allow for declaring test targets in the same manner as build targets. This allows it to declare and resolve dependencies in the same way the build system does when building. Unfortunately GN/Ninja, which we're using in Dart, does not offer any test rules at all.
Instead we currently rely on tools/test.py which can resolve test targets of sorts and run them.
But the lack on any built-in dependency management means that it will happily run and crash because of missing files. Or worse it'll run the tests with outdated files.
Adding some basic dependency management to tools/test.py would mean one less thing for developers to manually manage and eliminate a potential gotcha.

That is in the plans we are drawing up for Q3, definitely a high priority.

@whesse
Please re-evaluate this and do one of the following:

Add it to a milestone if it is still P1
Change priority label and add milestone if no longer P1
Close, if this issue is no longer needed

FYI - @athomas @whesse - dropping this to P2.

authors: cskau-g franklinyow vsmenon whesse


text:
User reported issue: weird text highlighting drift with inserted cast.

See @DanTup 's comment here, point 2.

As of 1c7fe7196dd7a542f7f91cd6ea2ac81e1a13146c, the null safety migration tool has been removed from active development and retired. No further work on the tool is planned.
If you still need help, or you believe this issue has been closed in error, please feel free to reopen.