text:
excludeCompletedBy filter not working in all scenarios

Tracey has reported the following:

Interestingly, for example... Incomplete quiz shows 2/7 but 'all quizzes' doesn't show it. Others also pop up in 'incomplete' but not in 'all'. Weird!

The graphql endpoint should be tested and debugged with her email against production data to figure out what's going on.

Spoke with the user, actually everything is working

repo: danielemery/quizlord-api


text:
[bug]: describe column not found

We are currently on dagster-polars==0.1.5 and we tried to upgrade to 2.2, but are getting the following failures on CI
polars.exceptions.ColumnNotFoundError: describe
FAILED

Platform info
We are running in a x86 docker container.
Polars version:
polars==0.20.6

platform:
root@50efadb560a1:/src# uname -a
Linux 50efadb560a1 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Details
Here is the full relevant stack trace
polars.exceptions.ColumnNotFoundError: describe
Stack Trace:
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/api.py", line 764, in job_execution_iterator
    for event in job_context.executor.execute(job_context, execution_plan):
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/executor/in_process.py", line 55, in execute
    yield from iter(
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/api.py", line 875, in __iter__
    yield from self.iterator(
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/executor/in_process.py", line 26, in inprocess_execution_iterator
    yield from inner_plan_execution_iterator(
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/plan/execute_plan.py", line 121, in inner_plan_execution_iterator
    for step_event in check.generator(
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/plan/execute_plan.py", line 359, in dagster_event_sequence_for_step
    raise dagster_user_error.user_exception
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
    yield
  File "/usr/local/lib/python3.10/dist-packages/dagster/_utils/__init__.py", line 467, in iterate_with_context
    next_output = next(iterator)
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/execution/plan/execute_step.py", line 738, in _gen_fn
    gen_output = output_manager.handle_output(output_context, output.value)
  File "/usr/local/lib/python3.10/dist-packages/dagster/_core/storage/upath_io_manager.py", line 448, in handle_output
    custom_metadata = self.get_metadata(context=context, obj=obj)
  File "/usr/local/lib/python3.10/dist-packages/dagster_polars/io_managers/base.py", line 317, in get_metadata
    return get_polars_metadata(context, df) if df is not None else {"missing": MetadataValue.bool(True)}
  File "/usr/local/lib/python3.10/dist-packages/dagster_polars/io_managers/utils.py", line 125, in get_polars_metadata
    "stats": MetadataValue.json(get_polars_df_stats(df)),
  File "/usr/local/lib/python3.10/dist-packages/dagster_polars/io_managers/utils.py", line 108, in get_polars_df_stats
    return {
  File "/usr/local/lib/python3.10/dist-packages/dagster_polars/io_managers/utils.py", line 109, in <dictcomp>
    col: {stat: describe[col][i] for i, stat in enumerate(describe["describe"].to_list())}
  File "/usr/local/lib/python3.10/dist-packages/polars/dataframe/frame.py", line 1731, in __getitem__
    return self.get_column(item)
  File "/usr/local/lib/python3.10/dist-packages/polars/dataframe/frame.py", line 7068, in get_column
    return wrap_s(self._df.get_column(name))
The above exception occurred during handling of the following exception:

Notes
Seems like the problem lies here but looking at the blame, it hasn't changed for 7 months. Is this function invoked some where new? Do we have to have all of our df's implement a describe col? If so, where is this documented?

Hey @abhinavDhulipala!
This is caused by polars changing the output column name of DataFrame.describe from describe to statistic.
I'll submit a fix.

Fix available in 0.3.0

Awesome thanks guys!

source: gharchive/issue

authors: abhinavDhulipala danielgafni

repo: danielgafni/dagster-polars

license_type: permissive

license_source: github-api


text:
🛑 DevOps App Roadmap Prod is down

In d6d0c82, DevOps App Roadmap Prod (https://roadmap-app.onrender.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DevOps App Roadmap Prod is back up in dbf1380 after 9 minutes.

repo: danielitogomez/upptime

license: MIT


text:
aa not working

it just straight up doesnt work i go thirdperson and i cant see anything happening and i still got shot in the head

[SOLVED] but i have a new question, is there anyway i can make the aa better. like a spinbot or a jitter. i am not experienced with coding and would need help doing it

This might help #989

ive already been following that but i dont know how to implement or download them

i deleted the repo so i can't give you a simple git clone command.
i might try to remake it sometime soon and add more stuff.

please do im so stuck and i have no idea how this stuff works

made a pull, close this #1546

authors: AbdallahMehiz Aidan7831 DoomFishWasTaken xAkiraMiura

repo: danielkrupinski/Osiris


text:
Feuture Request: Activate / Put the cursor in the first modal field for immediate capturing

This plugin is a great add-on!
Calling the modal forces the user to click on the first or any field to capture the data.
I suggest you activate and put the cursor in the first field to speed up the process for us keyboard-oriented fellows. 😉

I thought about that at first. But many people also gets quite nervous when they get their focus moved automatically. But since most of the current users of the plugin (you and me 😂 ) seems to want it, I will just add that and wait to see if anyone complains

Great and thank you!

In my tests this us already happening. Is it not te same for you? Have you tried in a clean obsidian vault?

Indeed, it is now correctly working as expected.
Thank you!


text:
Ensure the signal handler gets called at most once

The mainloop may continue to run if there are more tasks than only hahomematic. Make sure the program can be stopped with a second SIGINT.

Codecov Report

Merging #898 (d76cded) into devel (ed6f811) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##            devel     #898   +/-   ##
=======================================
  Coverage   89.92%   89.92%
=======================================
  Files          28       28
  Lines        4677     4677
=======================================
  Hits         4206     4206
  Misses        471      471

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Thank you for contributing.

source: gharchive/pull-request

authors: SukramJ codecov-commenter mtdcr


text:
Attempt to make Scan Interval configurable

After testing and trying I've redone a lot of things, please test and review carefully.
Setup was inspired by: https://aarongodfrey.dev/home automation/building_a_home_assistant_custom_component_part_4/

You can now use the configure button to set the scan interval.

Saw this log after changing the sync interval.
Traceback (most recent call last): File "/config/custom_components/innova/__init__.py", line 65, in _async_options_updated hass.config_entries.async_setup_platforms(entry, PLATFORMS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'. Did you mean: 'async_unload_platforms'?

Hi Daniel, thanks for the feedback, I'll check my own logs too, I haven't seen the error myself. I'll try to make time to address it tonight.

Hi Daniel, I think I have fixed the error by unloading the existing platforms before re-setting them up during options updates in the _async_options_updated method.

Thanks Daniel, I appreciate it.

authors: LarsMudde danielrivard

repo: danielrivard/homeassistant-innova


text:
Add ways to group buttons together

To increase the visual clarity of e.g. the format toolbar, RichTextKit should have a way to group buttons together.
Using a reusable component, we will then be able to group action buttons and toggles together like this:

This has been pushed to the main branch.

repo: danielsaidi/RichTextKit


text:
Don't pass global object as argument

Please, don't pass global object as argument here https://github.com/dankogai/js-base64/blob/master/base64.js#L11
Build with Babel fails here with error
Requiring external module babel-core/register
/Users/meu/web/node_modules/js-base64/base64.js:16
    var _Base64 = global.Base64;
                        ^

TypeError: Cannot read property 'Base64' of undefined
    at /Users/meu/web/node_modules/js-base64/base64.js:14:25
    at Object.<anonymous> (/Users/meu/web/node_modules/js-base64/base64.js:194:2)
    at Module._compile (module.js:425:26)
    at normalLoader (/Users/meu/web/node_modules/babel-core/lib/api/register/node.js:199:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/meu/web/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/meu/web/node_modules/postcss/lib/map-generator.js:5:15)

Yes, eshint also failed with the error  'Base64' not defined.

I have the same error

use import {Base64} from "js-base64" save the error

who knows, how to fix it?

Both
import { Base64 } from '/node_modules/js-base64/base64.js';
and
import { Base64 } from '/node_modules/js-base64/base64.min.js';
Give me the following error:
TypeError: Cannot get property "Base64" of null
On line 14
var _Base64 = global.Base64;
In other words global is null...

This is also causing some Jest tests to blow up for me.

I met this problem too.
This project has not been updated since July 2015 , it is 2017-6-15 now ,will the author solve this after this long time?
@dankogai

Should be fixed in https://github.com/dankogai/js-base64/commit/2bfbc30e8821350af562277f47610542fc568be3.

authors: ComLock FuGardenia cuiyajie dankogai developerdizzle ematveyev holynova itriy

license_source: bigquery


text:
Preferences pane does not appear on High Sierra 10.13.1 (17B48)

Installed as a homebrew cask and a stand alone app but when I run it and try to access the preferences to find the hue hub the window does not appear.
The focus changes but no preferences pane.

Nor does it appear on Monterey

Nor Big Sur

authors: gingerbeardman rjmunro thejasonparker

repo: danparsons/QuickHue

license: mit


text:
Endpoint plugs for multiple user schemas

Hi,
I'm following guide for multiple users in same scope:
https://github.com/danschultzer/pow/blob/e725d04b2a9e91565a1c7c1075411e0ae2cec792/guides/MULTIPLE_USERS_IN_SAME_SCOPE.md
My problem is that when I register a new user - no matter via admin scope or via user scope - my app uses only the last Session plug in endpoint.ex file. It seems, that somehow the namespace configuration is not passed.
Here is my router.ex:
...
  scope "/", private: %{pow_config_namespace: :user} do
    pipe_through [:browser, :locked]
    pow_routes()
    pow_extension_routes()
    pow_assent_routes()
  end

  scope "/admin", private: %{pow_namespace: :admin}, as: :admin do
    pipe_through :browser
    pow_routes()
  end

  scope "/", BaseAppWeb, private: %{pow_namespace: :user} do
    pipe_through [:browser, :locked]
    get "/", PageController, :index
    get "/static", PageController, :show_static
  end

  scope "/panel", BaseAppWeb do
    pipe_through :browser
    get "/", AdminController, :index
    get "/users", AdminUserController, :index
    get "/block_user", AdminUserController, :block_user
    scope "/static_pages" do
      get "/", StaticPagesController, :index
      get "/new_page", StaticPagesController, :new
      post "/create_page", StaticPagesController, :create
      get "/edit_page", StaticPagesController, :edit
      post "/update_page", StaticPagesController, :update
      get "/delete_page", StaticPagesController, :delete
    end
  end
...

and endpoint.ex:
defmodule BaseAppWeb.Endpoint do
  use Phoenix.Endpoint, otp_app: :base_app

  socket "/socket", BaseAppWeb.UserSocket,
    websocket: true,
    longpoll: false

  plug Plug.Static,
    at: "/",
    from: :base_app,
    gzip: false,
    only: ~w(css fonts images js favicon.ico robots.txt)

  if code_reloading? do
    socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
    plug Phoenix.LiveReloader
    plug Phoenix.CodeReloader
  end

  plug Plug.RequestId
  plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]

  plug Plug.Parsers,
    parsers: [:urlencoded, :multipart, :json],
    pass: ["*/*"],
    json_decoder: Phoenix.json_library()

  plug Plug.MethodOverride
  plug Plug.Head

  plug Plug.Session,
    store: :cookie,
    key: "_base_app_key",
    signing_salt: "salt"

  plug Pow.Plug.Session,
    repo: BaseApp.Repo,
    user: BaseApp.Auth.Admin,
    namespace: :admin,
    current_user_assigns_key: :current_admin

  plug Pow.Plug.Session,
    repo: BaseApp.Repo,
    user: BaseApp.Auth.User,
    namespace: :user,
    current_user_assigns_key: :current_user

  plug BaseAppWeb.Router
end

In case of this code, no matter if I register from /admin/registration/new or /registration/new, my app always creates BaseApp.Auth.User - because plug with user: BaseApp.Auth.User comes after a plug with user: BaseApp.Auth.Admin in endpoint.ex. In case when I switch their order - it creates only admin users.

That guide is from a deleted PR branch: #24
I rejected it due to https://github.com/danschultzer/pow/issues/19#issuecomment-439668816. The current recommended way of dealing with this is to set up an umbrella app with a separate Phoenix app for each user context (all keys will automatically have the otp app namespace, and you'll have clear separation).
You can still deal with it in the same Phoenix app, but in that case you will have to ensure that all admin routes has the admin configuration as the primary config.
It's assume that you would like to have access to the admin user anywhere, so first we need the two plug calls in the endpoint:
defmodule MyAppWeb.Endpoint do
  # ...

  plug Pow.Plug.Session,
    repo: MyApp.Repo,
    user: MyApp.Users.Admin,
    current_user_assigns_key: :current_admin,
    session_key: "admin_auth"

  plug Pow.Plug.Session,
    repo: MyApp.Repo,
    user: MyApp.Users.User

  plug BaseAppWeb.Router
end

Then we'll need to ensure that only the admin config is used for admin Pow paths:
  pipeline :pow_admin do
    plug :set_pow_config,
      repo: MyApp.Repo,
      user: MyApp.Users.Admin,
      current_user_assigns_key: :current_admin,
      session_key: "admin_auth",
      routes_backend: MyAppWeb.Pow.AdminRoutes
  end

  defp set_pow_config(conn, config), do: Pow.Plug.put_config(conn, config)

  scope "/admin", as: :admin do
    pipe_through [:browser, :pow_admin]
    pow_routes()
  end

And we'll have to ensure all paths generated within that pipeline are the admin paths. Something like this should work (it will prepend the controller module name with Admin so that admin_pow_* route helpers are called instead of the pow_* routes):
defmodule MyAppWeb.Pow.AdminRoutes do
  use Pow.Phoenix.Routes

  def path_for(conn, verb, vars \\ [], query_params \\ []), do:
    plug = Module.concat(["Admin", verb])
    Pow.Phoenix.Routes.path_for(conn, plug, vars, query_params)
  end

  def url_for(conn, verb, vars \\ [], query_params \\ []) do
    plug = Module.concat(["Admin", verb])
    Pow.Phoenix.Routes.url_for(conn, plug, vars, query_params)
  end
end

You can put the admin Pow config in your config.exs and load them in both places on compile time with Application.get_env/2.
Be advised that I haven't tested the above, but this is more or less what you need to do to get it working. There are some caveats, so I recommend to just use an umbrella setup if possible.

Thank you for a quick answer!
I just wanted to avoid umbrella app, so I followed your instructions. This solution works really good when it comes to adding users to right table, however in the AdminRoutes module it was necessary to make some slight changes, here is my code:
defmodule MyAppWeb.Pow.AdminRoutes do
    use Pow.Phoenix.Routes

    def path_for(conn, plug, verb, vars \\ [], query_params \\ []) do
      plug = Module.concat(["admin_pow", plug])
      Pow.Phoenix.Routes.path_for(conn, plug, verb, vars, query_params)
    end

    def url_for(conn, plug, verb, vars \\ [], query_params \\ []) do
      plug = Module.concat(["admin_pow", plug])
      Pow.Phoenix.Routes.url_for(conn, plug, verb, vars, query_params)
    end
end

And also although the user is added to right table - when it comes to admin users I've got a small problem. After creating an admin user I'm becoming this error: Pow plug was not found in config. Please use a Pow plug that puts the `:plug` in the Pow configuration. Probably I'm missing something really goofy, but I can't find damn thing.

Good catch, I've updated the example!
I forgot that the plug is necessary for Pow to update session, it's something that's automatically added to the config when running the plug:
  pipeline :pow_admin do
    plug :set_pow_config,
      repo: MyApp.Repo,
      user: MyApp.Users.Admin,
      current_user_assigns_key: :current_admin,
      session_key: "admin_auth",
      routes_backend: MyAppWeb.Pow.AdminRoutes,
      plug: Pow.Plug.Session
  end

This will call the Pow.Plug.Session to renew session 😄
At some point I'll write a guide on all this, so please let me know if things are working as expected or if there are any caveats.

Everything works fine now 😄
Thank you for help!

authors: Kaquadu danschultzer

repo: danschultzer/pow


text:
Add redis cache store guide

Resolves #87 #75

I've tried this and it works like a charm. I only changed how Redix is configured to use a REDIS_URL ENV variable.
# config.exs

config :myapp, :redix,
  url: System.get_env("REDIS_URL"),
  name: :redix

# application.ex

children = [
...
worker(Redix, [redix_config()[:url], [name: redix_config()[:name]]])
...
]

defp redix_config, do: Application.get_env(:myapp, :redix)

authors: danschultzer jaimeiniesta


text:
Creating users table in getting started guide before running 'mix ecto.setup'

I have stumbled upon an issue when following the getting started guide in the docs.
When running mix ecto.setup, I get the following error:
$ mix ecto.setup
warning: found quoted keyword "test" but the quotes are not required. Note that keywords are always atoms, even when quoted, and quotes should only be used to introduce keywords with foreign characters in them
  mix.exs:58

The database for MyApp.Repo has already been created
[info] == Running MyApp.Repo.Migrations.CreateUserIdentities.change/0 forward
[info] create table user_identities
** (Postgrex.Error) ERROR 42P01 (undefined_table): relation "users" does not exist
    (ecto) lib/ecto/adapters/sql.ex:200: Ecto.Adapters.SQL.query!/5
    (ecto) lib/ecto/adapters/postgres.ex:96: anonymous fn/4 in Ecto.Adapters.Postgres.execute_ddl/3
    (elixir) lib/enum.ex:1925: Enum."-reduce/3-lists^foldl/2-0-"/3
    (ecto) lib/ecto/adapters/postgres.ex:96: Ecto.Adapters.Postgres.execute_ddl/3
    (ecto) lib/ecto/migration/runner.ex:104: anonymous fn/2 in Ecto.Migration.Runner.flush/0
    (elixir) lib/enum.ex:1925: Enum."-reduce/3-lists^foldl/2-0-"/3
    (ecto) lib/ecto/migration/runner.ex:102: Ecto.Migration.Runner.flush/0
    (stdlib) timer.erl:181: :timer.tc/2
    (ecto) lib/ecto/migration/runner.ex:26: Ecto.Migration.Runner.run/6
    (ecto) lib/ecto/migrator.ex:128: Ecto.Migrator.attempt/6
    (ecto) lib/ecto/migrator.ex:73: anonymous fn/4 in Ecto.Migrator.do_up/4
    (ecto) lib/ecto/adapters/sql.ex:576: anonymous fn/3 in Ecto.Adapters.SQL.do_transaction/3
    (db_connection) lib/db_connection.ex:1283: DBConnection.transaction_run/4
    (db_connection) lib/db_connection.ex:1207: DBConnection.run_begin/3
    (db_connection) lib/db_connection.ex:798: DBConnection.transaction/3
    (ecto) lib/ecto/migrator.ex:261: anonymous fn/4 in Ecto.Migrator.migrate/4
    (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
    (ecto) lib/mix/tasks/ecto.migrate.ex:83: anonymous fn/4 in Mix.Tasks.Ecto.Migrate.run/2
    (elixir) lib/enum.ex:765: Enum."-each/2-lists^foreach/1-0-"/2
    (elixir) lib/enum.ex:765: Enum.each/2

Running on Windows 10 with the following version of Elixir and Erlang/OTP:
$ elixir -v
Erlang/OTP 21 [erts-10.0.1] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.7.3 (compiled with Erlang/OTP 19)

Could it be that the getting started guide is missing a step for creating the users table?

Did you get this working?

I got Pow working today, but encountered an issue with PowAssent. There was an exception thrown due to mapping of an email attribute, or something along those lines.
I'll continue fiddling with it on Monday 🙂

authors: IRLeif danschultzer


text:
records very little points

I found the tool works fine but it doesn't record points in the grass dashboard or records very little points

Takes up to a day or more to record the points.

I found the tool works fine but it doesn't record points in the grass dashboard or records very little points

It takes time to fetch real points.


text:
Use mocha-jsdom?

I found this package: https://www.npmjs.com/package/mocha-jsdom
...after reading your blog post. It was as simple to set up as:
var jsdom = require('mocha-jsdom');

describe('...', function () {
  jsdom();
  it('...', function () {
    // normal React TestUtils.renderIntoDocument, etc. goes here
  });
});

The function you suggest gave me errors I did not understand during the require of jsdom proper. This did not. Very straightforward.
For your consideration. 😎

Cool! Want to send me a PR to update the examples?

Created PR #8.

Closed via #8.

authors: benmosher danvk

repo: danvk/mocha-react


text:
Does not work with strict Content Security Policy (CSP) that blocks unsafe-eval (new Function)

Pretty sure this is related to the Rive JS/WASM script, and I put an issue in on that repo here:
https://github.com/rive-app/rive-wasm/issues/131
But also wanted to add an issue to track it here both for others to find who may have a similar issue and so if it gets updated, the new version fixing it can be pulled in here.

I'm closing this issue. Feel free to reopen if the problem persists.

Sorry it took so long to get back to this - confirmed (per notes in the linked thread) that using wasm-unsafe-eval eliminates the need for the more generic unsafe-eval in the CSP.

authors: GrandSchtroumpf localpcguy

repo: dappsnation/ng-rive


text:
Redis return ttlExpiryTime in GetResponse

See https://github.com/dapr/components-contrib/pull/2863

/close
Closing this PR since Dapr will not support redis as a TTL actor state store, and eventually be deprecated as an actor state store all together.

repo: dapr/components-contrib


text:
[Proposal] Provide alternative service resolution mechanism besides mdns

In what area(s)?

/area runtime
Describe the feature

We commonly get reports that service invocation does not work with dapr standalone mode:
https://github.com/dapr/dapr/issues/2665
https://github.com/dapr/quickstarts/issues/361
https://github.com/dapr/quickstarts/issues/388
https://github.com/dapr/quickstarts/issues/399 (May also be a general failure to start daprd?)
https://github.com/dapr/python-sdk/issues/146
... and a bunch more across various SDKs/docs repos
We've root caused most of these to security/VPN configurations blocking mdns requests. The fix varies heavily based on which OS/security software the user is using. It would be lovely to have a generic solution to this, either by falling back to another service discovery mechanism if mdns doesn't work, or replacing mdns outright with something else.
Release Note

RELEASE NOTE:

We can point users to use Consul in self hosted mode.
Alternatively, if we find another cross machine self discovery mechanism that doesnt involve an external agent (as this is already provided with Consul) we can consider that.

It would be really nice for there to be a simple alternative for self-hosted systems where this is an issue. There is something with our corporate network that is blocking service to service invocation. Every time I think I've worked out how to work around it, it comes back. I can imagine this could be a very frustrating issue for people trying out Dapr for the first time.

@mukundansundar Any idea on this?

Here are a few thoughts from an offline conversation:
Yes, Consul would absolutely work, but is another container that the CLI would have to install.
An alternative is to add "Consul lite" functionality to the placement service. This could range anywhere from a "local only mode" which holds a simple in-memory lookup table to a fully distributed/replicated lookup table via Raft. The placement service already handles replicating the actors placement table. In theory, adding general service addresses could make use of existing infra/replication code. One could ask "are you just recreating Consul"? Yeah sort of. That aside, assuming the goals are 1) lightweight/no additional installation footprint and 2) satisfies Dapr service invocation without the pitfalls of mDNS, then this approach could make sense.
/cc @artursouza

We might be overthinking this, we could just have a local resolver component that is just a flat file in ~/.dapr/

Alternatively, we could do whatever dapr list is doing.

dapr list and the VS Code plugin both look at the running processes to discover app-id and ports. If we don't really need a distributed option, this makes a ton of sense and the code/logic already exists in the CLI.

I don't support expanding the placement service to provide service discovery, although I am guilty of suggesting the same in the past. Assigning extra responsibilities for a component that is targeted at placing actors just because it's the nearest neighbor isn't something I can advocate for.
I do support creating a local name resolution component that's explicitly clear about providing dev/single-box discovery.
Using it would be as simple as configuring the following:
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
  name: appconfig
spec:
  nameResolution:
    component: "local"

The CLI could be configured to register the local component by default.

For the local component, we could replicate similar logic to Consul but have it in a datastore for example Redis. Since we are already using Redis as a state store an an actor store we can use it for service resolution also I think. This way a service can self register on Init and perform GET requests on ResolveID calls.
The potential issue in this is in the slim mode the fallback will still be mDNS or Redis needs to be stood up separately and used for service discovery.
One more concern is deregistration of the service once it is shutdown . Currently we do not have a onShutdown handle regarding name resolution for deregistration ...
One option is extend the name resolution interface to handle onShutdown ... This will help with the current Consul component also.
The other option is to make use of Redis TTL for the keys and have the service periodically refresh the associated registration if possIble.

@mukundansundar @yaron2 any concerns with using the dapr list approach? It would work in slim mode as well.

I do not support using Redis or any state store for service discovery purposes as that would create a tight coupling between a state store and a name resolution component.
@pkedy I'm fine with a file based approach or whatever dapr list does.

@artursouza that's my preferred approach then.

Can you all please make sure that this works with applications launched thru daprd directly (ie not just thru the dapr process). Currently, dapr list does not list things started via daprd directly.

There was a PR to fix that.

great ! thanks

So I am planning to start work on this issue.
As per the discussions, I will create a new name resolution component local that imitates dapr list and does process name and argument parsing. This will make sure that if mdns is disabled on local machine then local name resolution component will work.

/assign

+1 !!!

I am facing the same issue. I had to log off VPN before I could get the first example to work. It took several hours even before I came to that point. Even now it's not clear to me how the VPN is causing issues. Is there a way to make mDNS work with the VPN on?

Can you all please make sure that this works with applications launched thru daprd directly (ie not just thru the dapr process). Currently, dapr list does not list things started via daprd directly.

There was a PR to fix that.

@artursouza Can you please provide a link to that PR? Because I don't believe dapr list is yet showing daprd instances started standalone:

@wcs1only would using Gossip directly not be a viable alternative to mDNS? I think based on this article even Consul uses Gossip under the hood.

This may already be covered by another issue, but a work around for me works as follows:

Disconnect from VPN (Cisco AnyConnect in my case)
Start the apps with Dapr
Re-connect to VPN

This is pretty painful in development as I do restart the apps often as I make changes.  If my application didn't have to access the corporate network, that wouldn't be a big deal though.
I'm going to work on running dapr on WSL/ubuntu since I could at least script the startup/shutdown of the apps and vpn.

https://github.com/dapr/components-contrib/pull/1380

Configuring the name resolver to resolve only dapr sidecars on local computer would be much needed feature for us. We have quite opposite issues with dapr in development but this should fix them too. When developing in office environment where mDNS is allowed, Dapr resolves to services on other developers' computers. This is because mDNS packets are thrown to the same network which other computers can see.
We have tried blocking inbound mDNS packets on Windows Firewall but somehow they don't get blocked at all. If blocking outbound mDNS, the name resolution stops working completely.

We found a solution for our issues which is to use Consul. However, the guide on Dapr docs doesn't give simple and complete example how to use Consul as name resolver in local environment. Thankfully I found this great article that contains simple enough instructions for that. You could include such an example on the Dapr Docs Consul page.

We found a solution for our issues which is to use Consul. However, the guide on Dapr docs doesn't give simple and complete example how to use Consul as name resolver in local environment. Thankfully I found this great article that contains simple enough instructions for that. You could include such an example on the Dapr Docs Consul page.

Thank you. It's been two years since this issue was raised, but Dapr has not yet provided an official solution.

Let's get this done for 1.13, for local development scenarios using SQLite.

New name resolver (backed by SQLite) is implemented in #7038
Whether that becomes the new default for the local DX is an issue that should be discussed with the runtime and CLI maintainers.

@ItalyPaleAle Is this "Whether that becomes the new default for the local DX is an issue that should be discussed with the runtime and CLI maintainers." tracked as an issue?

authors: ItalyPaleAle MrCliff addjuarez aktxyz artursouza badgeratu jigargandhi jjcollinge markheath msfussell mukundansundar pkedy safari137 tony-clarke-amdocs wcs1only xckai yaron2

repo: dapr/dapr


text:
rename servicediscovery pacakge to nameresolution

servicediscovery is not an appropriate name for the package as it doesn't conduct service discoveries but name resolutions.

@Haishi2016 Is it only in code? If yes, could you add priority to it. PS. not closing it and asking clarification :)

We need to check docs as well.

@yaron2 @amanbha @yolember @msfussell @orizohar Any objections to change the servicediscovery to nameresolution ? it may require to change component-contrib as well.

@youngbupark  LGTM, no objections

authors: Haishi2016 amanbha youngbupark


text:
Prints perf test output to stdout.

Description
Prints perf test output to stdout.
Issue reference

Please reference the issue this PR will close: N/A
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[ ] Code compiles correctly
[ ] Created/updated tests
[ ] Unit tests passing
[ ] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

/ok-to-perf

/ok-to-perf


text:
Resiliency QuickStart

Signed-off-by: Nick Greenfield nigreenf@microsoft.com
Initial commit that adds a 5 minute Resiliency QuickStart (uses State Management QuickStart as the app scenario).
User simulates a fault by stoping the Redis container on their dev machine. The resiliency policies for retries and circuit breakers kick-in. Once the Redis container is restarted, the application (writes and reads from Redis) resume seamlessly.

One consideration - I used the JS example since that's the language I'm most familiar with. However, the language being used is not important. The capability we're highlighting is how resiliency is configured declaratively through the resiliency spec.
I'm not sure it makes sense to have alternate versions of this QuickStarts in other languages....Thoughts?

repo: dapr/docs


text:
Add custom proto support for "Bring Your Own Proto"

We should add custom proto support
https://github.com/dapr/dapr/issues/3231
^ the discussion
https://youtu.be/B_vkXqptpXY?t=71
^ community call showing this

repo: dapr/js-sdk


text:
ERROR TypeError: undefined is not an object on V2.1.1

When testing the latest version 2.1.1 the following error occurs.
file:///app/tns_modules/nativescript-google-maps-sdk/map-view.js:28:32: JS ERROR TypeError: undefined is not an object (evaluating 'this._owner.get')
May 30 10:25:59 --- last message repeated 1 time ---

Seems an exception on my side was causing this.
Closing it.

repo: dapriett/nativescript-google-maps-sdk


text:
Add Differential Channel Configuration in Channel Settings

Nq1 channels are ground-referenced single-ended by default.  Channels 8+9, 10+11, 12+13, 14+15, can be optionally used as differential channels.  The advertised differential capability and subsequent setting is represented by analog_in_port_av_rse and analog_in_port_rse protobuf tags respectively.
The app should query the differential capably and provide the user an option to configure a channel pair as RSE or differential.

Hi just a few questions on this topic:

You mention channels 8+9, 10+11, 12+13, 14+15 for differential outputs, however this does not correspond to the data sheet for the Nyquist 1 so which channels are supposed to be differential?
When trying the recommended ports for differential readings, how to i apply this in the software, do i add a singular channel out of the pair and set it to differential or do i need to apply both channels which are connected?
Does this Nyquist 1 have a built-in amplification module for reading scaling the mV signals of load cells, if not what is the recommended reading voltages for the analogue ports

Also, there was mention of a firmware update pending I am wondering as to where i can find this update.

Yes, the datasheet needs to be updated.  The hardware supports 8+9, 10+11, 12+13, 14+15 for optional differential inputs.
The Windows application needs to be updated to properly configure differential channels.  The SCPI commands for differential configuration are working but the output is currently not converted from 2's complement, so the resulting number is a direct integer based on the 2's complement value coming from the ADC.  This will be addressed in firmware/software.
It does not.  Load cell signals should be passed through something like the EMBSGB200 or other bridge amplifier and sent to the DAQ.

authors: MarshBod cptkoolbeenz

repo: daqifi/daqifi-desktop


text:
[Feature] Icon Customization

It'd be neat if we could completely customize the guild icons, instead of having options to toggle on/off. Something like this in the config.
guild-list-icon:
  display-name: '&f{guild-name} is a &7Guild'
  lore:
  - '&fGuild Master: &b{guild-master}'
  - '&2Guild Tier: {guild-tier}'
  - '&dMembers:&f {member-count}'
  - 'dank memes'
  - 'to join a guild, do x y and z!'

Done!

authors: UltraFaceguy darbyjack

repo: darbyjack/Guilds-Plugin


text:
Added a setMatrix() function to set the matrix of the mesh shader.

This keeps the draw..() routines as they were.
It can be extended to also modify other shaders too.

Could you attach a sketch or screenshot of what you would like to draw? I'm still a bit unclear about it and maybe there is another way to achieve the result. I'm trying to be very careful with the render API since one of my next tasks will be porting it to other graphics APIs, and to minimize the work I would like to keep it as minimal as possible.

El 17 nov. 2022, a las 14:41, Darby Johnston @.***> escribió:
Could you attach a sketch or screenshot of what you would like to draw? I'm still a bit unclear about it and maybe there is another way to achieve the result. I'm trying to be very careful with the render API since one of my next tasks will be porting it to other graphics APIs, and to minimize the work I would like to keep it as minimal as possible.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Find attached a picture of the drawings I am doing with the modified api.  Note that the drawing of shapes extends beyond the canvas and follows the panning and zooming around.  Also, the color green does not get picked by the pixel toolbar when the cursor is on one of the drawings.
—
Gonzalo Garramuno
@.***

Thanks for the screenshot, do you also have one showing the use of the rectangle outlines?
I think I understand the issue now but would like to think more about a general solution. I need to finish up some other work first, so maybe we can continue this discussion next week.

Find two screenshots attached.  The image is 4K and it is resized by the panel to the right.
The image with the rectangle (two lines only shown) is the one drawn with a mesh.  The one with the outline perfectly drawn is the one with GL_LINE_LOOP.

Hi, and sorry for the delay! I've been working on some improvements to the renderer in the "scene" branch and I think I'm pretty close to supporting this functionality. I've added a setTransform() function that takes a 4x4 matrix that applies to all of the primitives including the image/video rendering. I've also added functions for adjusting the viewport and setting a clip rectangle which are useful when rendering UIs. I'm currently testing it out, and maybe later this week if you have time you can try it out for your use case. Thanks!

repo: darbyjohnston/tlRender


text:
Multi-line compiled file

ncc compiles javascript dependencies into minified mode by default. Need to allow multi-line compilation to decrease GitHub change set sizes for history review.

Wrong issue. It's already implemented

repo: dark-mechanicum/aws-codebuild


text:
termux只能看评论

termux正常安装了环境 但是运行后不能登录只能查看评论

在歌曲页面按空格播放，是空格也不行？

刚刚测试空格播放也不行，会报错退出，打扰了抱歉

repo: darknessomi/musicbox


text:
Model info

Added additional parsing of crystal file to include all of the columns associated with model information.  An example file can be seen here: https://drive.google.com/open?id=1s_6ULQK3penKElCc-GucXEMdx6_W4okPRwalgtEkry4 (restricted view access on the file, please request permission to view if needed).
The relevant columns added during this patch include 'modelname', 'participantname', 'notes'.  These data are now included as _raw_ values in the main dataset.

Added additional parsing of crystal file to include all of the columns associated with model information. An example file can be seen here: https://drive.google.com/open?id=1s_6ULQK3penKElCc-GucXEMdx6_W4okPRwalgtEkry4 (restricted view access on the file, please request permission to view if needed).
The relevant columns added during this patch include 'modelname', 'participantname', 'notes'. These data are now included as raw values in the main dataset.


text:
fix(rfc): Age header update

Fixes following test from cache-tests.fyi: freshness-max-age-age, freshness-max-age-s-maxage-shared-longer-multiple. Unlocks the whole "Age Parsing" section of the test suite (see here).

Thank you @vejipe for your contribution! 🚀

authors: darkweak vejipe

repo: darkweak/souin


text:
Support for unix style paths

I was trying to run SassyStudio in VS 2013 on OSX via Parallels.
but i kept getting a file not found / unreadable exception. Im thinking the issue is the path for the file is coming up as a network drive path, and maybe this unix style path that doesn't play well with sassy.
this is what the path looks like:
\\psf\Home\dev\website\Content\sass\Tool.scss
Here is the full stack trace:
Failed to compile css.
[SassCompileException]Error: File to read not found or unreadable: \\psf\Home\dev\website\Content\sass\Tool.scss

   at LibSassNet.SassCompiler.CompileFile(String inputPath, OutputStyle outputStyle, String sourceMapPath, Boolean includeSourceComments, Int32 precision, IEnumerable`1 additionalIncludePaths)
   at SassyStudio.Integration.LibSass.LibSassNetDocumentCompiler.Compile(FileInfo source, FileInfo output)
   at SassyStudio.Integration.LibSass.LibSassNetDocumentCompiler.<>c__DisplayClass3.<CompileAsync>b__2()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was
 thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SassyStudio.Editor.CompileScssOnSave.<GenerateCss>d__1d.MoveNext()

yeah, that's a limitation in libsass unfortunately, and has been there for a while. i've also been bitten by this.
i can revisit and see if it's something i'm doing, but it didn't work even when i was using nsass.

repo: darrenkopp/SassyStudio


text:
Load exercises from a repo in addition to gists

This involves a few individual tasks:

Create a format for storing multiple DartPad exercises in a single repo.
Add a RepoController or something similar to dart-pad that's capable of loading data from a repo set up with that format
Update the new embed UI and playground UI with query string parameters and have them use the RepoController to fetch and parse exercises when supplied with those parameters.

q.v. GitHub's API docs for retrieving repo contents: https://developer.github.com/v3/repos/contents/

Would it be possible to load code from part of a doc repo? I'd love to be able to host DartPad code under https://github.com/dart-lang/site-www/tree/master/examples, so that our site tests can detect when the DartPad code needs to be updated.

Fixed for the new embeds by #1295.

Fixed for the new embeds by #1295.

Does that mean this is done?
If so, how can we use it?
I would like to embed dart-pad in a blog-post. But having to maintain gists is a hassle, and feels off when the article is written in markdown

I should have linked everybody to the wiki page we have for this:
https://github.com/dart-lang/dart-pad/wiki/Embedding-Guide#query-parameters
There are a number of ways to get code into an embedded editor. @johnpryan wrote a script that can detect and transform markdown blocks into iframes, and it's possible to load directly from a repo by creating a small metadata file for each exercise you want to load.
One feature we still haven't implemented is a hardcoded GitHub path to a single file. That feature request remains outstanding.

Closing this as a duplicate of https://github.com/dart-lang/dart-pad/issues/1763."
Note that the workshop feature discussed in that issue is no longer supported. Feel free to explore other open issues like https://github.com/dart-lang/dart-pad/issues/2702 that explore alternatives.

authors: RedBrogdon kwalrath parlough rrousselGit

repo: dart-lang/dart-pad


text:
Test code doesn't work in the playground

Snippets with test code only work in the embeds. See this comment for more details.

I'm not sure of the best way to handle this. Some options:

Leave it as-is. Folks can just learn that the snippets in exercises with tests will need additional work in order to run.
Leave as-is, but add a popup after the user clicks the Open in DartPad button warning them that the test code won't be going with them.
Update the playground to concatenate the test code onto main.dart and present the result (possibly throwing in a comment above the test code to explain what's going on).

@johnpryan Did you mean "only work in the embeds" above?

As part of the new, simplified version of the DartPad frontend, the exercise functionality tests were related to was removed.
If anyone would like to see similar functionality brought back, please consider opening a new issue. Thanks so much!

authors: RedBrogdon johnpryan parlough


text:
WE NEED A LIGHT THEME !!!

What happened?

Steps to reproduce problem

Additional info
Browser
Browser:
Version:
Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)?
Are there any warnings or errors in your browser's JavaScript console?
If so, paste them below:
[paste warnings or errors here]

Machine
Operating system:
Version:
Your code
What code was in the editor, if any, when the failure occurred? You
can paste it in below:
// Paste code here.

DartPad's output
Did DartPad print anything to the console pane? If so, paste it below:
[paste console output here]

If you were running Flutter code, you can also paste an image of the
Flutter output directly into this bug report.

I open a dartpad and light theme is not the default state - that's a serious defect, making it unusable.

Thanks for the feature request @repo-2017!
For embedded DartPad iframes, it is possible to switch between light and dark themes through query parameters. This feature has not yet been implemented for the main DartPad playground though.
This feature request is currently being tracked at https://github.com/dart-lang/dart-pad/issues/1260 where you've commented as well, so I'm going to close this one as a duplicate.
Thanks again :)


text:
Zero memory after test

Only zero memory after a successful allocation takes place. This should fix the dart_not_asan test in dart/sdk, I think. https://github.com/dart-lang/ffi/issues/148

Done.
Technically, the tests in dart-lang/sdk need tweaking -- they attempt to allocate 2^63-1 of Int64, which is obviously 8 times more than is needed to exercise the scenario they're going after. I'm not great at submitting through Gerrit, but if you wanted to you could change those to Uint8, which would make the tests a little more strict. I've done that here, and these tests now pass.
Feel free to squash and merge if you're happy with this, @dcharkes! Thanks!

repo: dart-lang/ffi


text:
[objective_c] Should we expose autorelease pools

I'm using this pattern a lot in ffigen tests:
final pool = lib.objc_autoreleasePoolPush();
// Do stuff ...
lib.objc_autoreleasePoolPop(pool);

Should we expose this capability in package:objective_c? It might be useful to some users, but it's a bit problematic.
In a language like C++ we could make a util class that calls push in the constructor and pop in the destructor, and users could declare a local variable of this class to turn their scope into an autorelease pool.
But in Dart if we did that using finalizers, pop would be called at an undefined time in the future. Worse, this could mean pools are popped out of order (popping an outer pool pops all the inner pools, so later when the inner pool is popped we'd be double popping, which is not allowed).
So our only option would be to expose push and pop directly as standalone functions, which is a bit of a footgun.

How about using the scoping structure like we do with Arena and using?
autoReleasePool(() {
  // Do stuff...
});

While working on https://github.com/dart-lang/native/pull/1573 I ran into some issues with autorelease pool reliability that makes me think we should be very careful about how we expose them to users, if at all. Judging by the problems I was seeing, I think flutter uses autorelease pools internally. That's fine, except that it's really easy to accidentally interleave your own pools with theirs, especially if you're working with async code, leading to those double popping issues I mentioned.
I think the only safe API is Daco's suggestion, with the added restriction that the function must be sync. That is, we'll need to ensure (either in the type system or with a runtime type check) that the result of the callback is not a Future.

authors: dcharkes liamappelbe

repo: dart-lang/native


text:
[ffigen] Fix block inheritance issue

If the ObjC class Child inherits from Base, and overrides a method that accepts or returns a block, it may use a different type of block than Base's method, according to certain subtyping rules. The issue is that when ffigen codegens those methods, it uses the Dart wrapper objects to represent the blocks in the method signatures, but those wrappers are essentially unrelated, so this breaks Dart's method overriding rules.
The basic idea of the fix is to add the block signature as a type param to ObjCBlockBase, which all block wrappers inherit from. Then anywhere we were previously passing a block wrapper through an API, we instead pass a ObjCBlockBase<signature>. That way the subtyping rules are enforced by Dart's ordinary subtyping rules. Simplfied example.
The rest of the PR is dealing with the consequences of this change:

I had to add another get*Type method to ffigen's Type class, getDartWrapperType, to distinguish a block's ObjCBlockBase<...> type from its wrapper type.
Ffigen's codegenned typedefs for blocks have changed. For FooBlock defined in ObjC, we used to generate a Dart typedef called DartFooBlock which referred to the block wrapper type. Now DartFooBlock refers to ObjCBlockBase<...>, and I added a WrapperFooBlock that refers to the block wrapper type.

If people were using, for example, DartFooBlock.fromFunction, they now have to use WrapperFooBlock.fromFunction.

Generally, I'd now recommend that users pass blocks around using the ObjCBlockBase<...> type, instead of the wrapper type. The only reason you'd need an instance of the wrapper type now is to access the call operator, to invoke the block from Dart (which I don't think many people actually do). I added a constructor for the wrapper that takes ObjCBlockBase<...>, to support this case. So foo.getBlock()(bar) => ObjCBlock_Bar(foo.getBlock())(bar).

On that last point, a more drastic breaking change we could do is to change the wrapper type to be an unconstructible class that just holds static methods for creating ObjCBlockBase<...>. Users would never hold references to the wrapper type, just ObjCBlockBase<...>. We'd have to change the call method on the wrapper type to a static method that takes the block as the first arg: static Ret invoke(ObjCBlockBase<...> block, args...). Slightly cleaner since now there's just ObjCBlockBase<...>, but it's a bigger breaking change, and makes calling the block from Dart less ergonomic.
Fixes https://github.com/dart-lang/native/issues/1416

coverage: 64.847%. first build
when pulling 7fbd2a5c497e278552fcabff59bf09e560f0d7a9 on block_inherit
into 4eaec5a18977e215b3d37a6293564d1911137cef on main.

❤  For a very clear PR description! 🙏
High level sgtm to tracking block subtyping with a signature in the type argument. (We do the same with Pointer to NativeFunction.) Also sgtm to track the Dart wrapper types instead of the native types. (Should we worry about different int-sizes in blocks though?)

On that last point, a more drastic breaking change we could do is to change the wrapper type to be an unconstructible class that just holds static methods for creating ObjCBlockBase<...>. Users would never hold references to the wrapper type, just ObjCBlockBase<...>. We'd have to change the call method on the wrapper type to a static method that takes the block as the first arg: static Ret invoke(ObjCBlockBase<...> block, args...). Slightly cleaner since now there's just ObjCBlockBase<...>, but it's a bigger breaking change, and makes calling the block from Dart less ergonomic.

When reviewing I was thinking maybe the other way around: Can we make the Wrapper classes the only public API for users? (See my long comment.) And if we can drop the Wrapper part of the name and the typedefs then the layering doesn't get exposed to our users in the generated API from FFIgen.
WDYT? Does that work? Or did I miss some constraints?

Should we worry about different int-sizes in blocks though?

Oh, yeah, ObjCBlockBase's type arg should probably use the FFI types, not the Dart types.

When reviewing I was thinking maybe the other way around: Can we make the Wrapper classes the only public API for users? (See my long comment.) And if we can drop the Wrapper part of the name and the typedefs then the layering doesn't get exposed to our users in the generated API from FFIgen.
WDYT? Does that work? Or did I miss some constraints?

That works, but it means that you won't get a typedef for the ObjCBlockBase<...>. That means that the typedef will never be used in the generated API. Methods that take/return a block will still use the ObjCBlockBase<...>, even if there's a typedef for it. That's probably fine though, since ObjCBlockBase<...> is readable enough. This approach also means the typedef changes are not breaking, so I can remove that bit in the changelog.

See my long comment.

Not seeing any other comments. Did you forget to submit a review?

Should we worry about different int-sizes in blocks though?

Oh, yeah, ObjCBlockBase's type arg should probably use the FFI types, not the Dart types.

If you also want a call method though, you probably also need the Dart signature. Then you'd have two type arguments.

If you also want a call method though, you probably also need the Dart signature. Then you'd have two type arguments.

I don't think so. The call method doesn't live on the ObjCBlockBase. It can't, since Dart's generics aren't powerful enough. It has to live on the codegenned wrapper, where the type arg doesn't really matter.

Hi! Trying out this branch to fix issues when trying to build the bindings for AVFoundation. Seems to work for fixing the override issues, however, there seems to be a bug with the produced objc bindings file - all of the #import statements are placed into one line, causing just the first #import to be recognized, and all others are ignored:
#include <stdint.h>

#import <CoreMIDI/MIDICapabilityInquiry.h>#import <AVFoundation/AVFoundation.h>#import <AVFoundation/AVAssetTrackSegment.h>#import <AVFoundation/AVAssetExportSession.h>#import <AVFoundation/AVMediaFormat.h>
typedef void  (^ListenerBlock)(NSDictionary* , struct _NSRange , BOOL * );
ListenerBlock wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool(ListenerBlock block) {
  ListenerBlock wrapper = [^void(NSDictionary* arg0, struct _NSRange arg1, BOOL * arg2) {
    block([arg0 retain], arg1, arg2);
  } copy];

  ...

Not sure whether this is also present on the main branch. Manually adding newlines fixes the build issues

Not sure whether this is also present on the main branch. Manually adding newlines fixes the build issues

That's probably also a bug at HEAD, since this PR didn't touch anything to do with that. But I'll fix it in here.

authors: coveralls dcharkes kekland liamappelbe


text:
v0.16.0+1 Build error - bad state: No element

I have a working polymer project and get the error message below when I first start the project, or add child polymer elements.
Child Elements are using new @HtmlImport('home_view.html') annotation.
To fix it, I take out the imports statements, which builds successfully.  Then insert the import statements for the children elements and app runs successfully.
import 'package:app/home_view.dart'; import 'package:app/contact_view.dart';
Error:
`Transform polymer (PolymerBootstrapTransformer) on app|web/index.html threw error: Bad state: No element
dart:collection/list.dart 133                                            Object&ListMixin.firstWhere
package:initialize/transformer.dart 452:30                               InitializerData.annotationNode
package:web_components/build/html_import_annotation_recorder.dart 30:52  HtmlImportAnnotationRecorder.shouldApply
package:initialize/transformer.dart 279:60                               _BootstrapFileBuilder._buildNewEntryPoint.
dart:collection/list.dart 127                                            Object&ListMixin.firstWhere
package:initialize/transformer.dart 279:39                               _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 195:68                               _BootstrapFileBuilder.run
package:initialize/transformer.dart 35:28                                generateBootstrapFile
package:web_components/build/web_components.dart 32:50                   generateWebComponentsBootstrap
package:polymer/src/build/polymer_bootstrap.dart 55:68                   PolymerBootstrapTransformer.apply..
dart:async/zone.dart 1155                                                _RootZone.runUnary
dart:async/future_impl.dart 484                                          _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 567                                          _Future._propagateToListeners
dart:async/future_impl.dart 550                                          _Future._propagateToListeners.handleWhenCompleteCallback.
dart:async/zone.dart 1155                                                _RootZone.runUnary
dart:async/future_impl.dart 484                                          _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 567                                          _Future._propagateToListeners
dart:async/future_impl.dart 358                                          _Future._completeWithValue
dart:async/future_impl.dart 412                                          _Future._asyncComplete.
dart:async/schedule_microtask.dart 41                                    _asyncRunCallbackLoop
dart:async/schedule_microtask.dart 48                                    _asyncRunCallback
dart:isolate-patch/isolate_patch.dart 96                                 _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 143                                _RawReceivePortImpl._handleMessage
dart:collection                                                          Object&ListMixin.firstWhere
package:initialize/transformer.dart 452:30                               InitializerData.annotationNode
package:web_components/build/html_import_annotation_recorder.dart 30:52  HtmlImportAnnotationRecorder.shouldApply
package:initialize/transformer.dart 279:60                               _BootstrapFileBuilder._buildNewEntryPoint.
dart:collection                                                          Object&ListMixin.firstWhere
package:initialize/transformer.dart 279:39                               _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 195:68                               _BootstrapFileBuilder.run
package:initialize/transformer.dart 35:28                                generateBootstrapFile
package:web_components/build/web_components.dart 32:50                   generateWebComponentsBootstrap
package:polymer/src/build/polymer_bootstrap.dart 55:68                   PolymerBootstrapTransformer.apply..
dart:isolate                                                             _RawReceivePortImpl._handleMessage`

Got a separate report about this as well, but haven't been able to track it down yet. Do you have any code you can post or a github repo you can link?

Here's a github repo that shows the issue,
https://github.com/terrywarwar/core-pages-google-map-example .
main_app.dart has the import statements.
On Fri, Mar 13, 2015 at 8:27 AM, Jacob MacDonald notifications@github.com
wrote:

Got a separate report about this as well, but haven't been able to track
it down yet. Do you have any code you can post or a github repo you can
link?
—
Reply to this email directly or view it on GitHub
https://github.com/dart-lang/polymer-dart/issues/33#issuecomment-78626386
.

--
+61 2 8208 8877
+64 3 442 6944

Thanks, this is a much smaller/better repro than the other one I had. Hopefully we can figure this out pretty soon.

Interesting, so commenting out import 'package:google_maps/google_maps.dart'; (and all code that uses it) from map_view.dart fixes the issue as well... not sure exactly what to make of that.

Ok, this should be fixed in https://github.com/dart-lang/initialize/commit/12c867d43519e5324366805cd52a4edfea6fd270. Can you do a pub upgrade (make sure you get initialize 0.5.1+5) and confirm?

This has fixed the issue for me.
However, I now get loads of console messages of the following form and my app doesn't run:
Attributes on switch-control were data bound prior to Polymer upgrading the element. This may result in incorrect binding types. (:1)

Any chance you can post a repro of that? One thing that comes to mind, If you are calling initPolymer manually make sure that you aren't creating any polymer elements until after that completes (it now returns a Future instead of a Zone).

Pub upgrade (initialize 0.5.1+6) fixed the issue.  Thanks.

I'm still trying to isolate the above ...data bound prior to Polymer upgrading the element... issue. It seems however, that it is to do with the ordering of <link rel="import" href="..."> statements. Is it now absolutely critical to get these in the right order so that all child elements are included before parent elements, even across files?

I have a repro on this, it looks like a bug in the transformer. As a workaround for now you can add a dart import from each of  your elements to all the other elements that they are using internally. This ensures that your dependencies are registered first.

OK - thanks. I'll give that a try.
Is that a standard import of the dart file as in:
import 'my-component.dart';
rather than the new @HtmlImport thing?

Yes, a standard dart import. The issue is with the order in which things get registered if they are only included via a script tag in an html import. By adding the regular dart import it ensures that anything within that import will get registered before the importing library.

Fwiw, I expect the fix for this to land sometime today so you can just wait if you prefer.

should be fixed now if you do a pub upgrade (make sure you get 0.5.1+7 of the initialize  package)

This doesn't seem to have made any difference for me. I still get loads of:
Attributes on <element-name> were data bound prior to Polymer upgrading the element. This may result in incorrect binding types. (:1)
errors in my app.
Switching back to pre 0.16 Polymer is the only way I can seem to get rid of them,

Actually, I filed a new bug for this https://github.com/dart-lang/polymer-dart/issues/38

authors: jakemac53 markhats terrywarwar

repo: dart-lang/polymer-dart


text:
make polymer's build.dart smarter about entrypoints

 Issue by sigmundch
Originally opened as dart-lang/sdk#20396

Now that the information is also in the pubspec.yaml, let's read it from there and not specify it twice.
This should make it very easy to write a build.dart as a single line Dart script:
  export 'package:polymer/builder.dart'

 Comment by sigmundch

Agree - that's my long term goal too. This bug is to get one step closer and make build.dart as small as it can be, and get rid of the redundancy we have with the pubspec file until we reach that point.

 Comment by justinfagnani

I'd rather get rid of build.dart altogether. Transformers should have a better contract with the analyzer.

 Comment by zoechi

Why is build dart needed anyway. Shouldn't this all be done by the analyzer?

 Comment by sigmundch

The analyzer is not aware of most of the polymer logic, so we use build.dart to show nice error messages in the DartEditor that we discover in our linter. One day we hope the analyzer will allow to have plugins so we can include polymer-specific logic that way.

 Comment by jakemac53

Fixed in dart-lang/sdk@eb1c71078a4e5f327e1c244a355a601802f3d79d

Added Fixed label.

 Comment by jakemac53

Set owner to @jakemac53.


text:
Remove IDF weight from token weights.

fixes the location vs. geolocation issue in https://github.com/dart-lang/pub-dartlang-dart/issues/1553
other search results seem to be fine with the change

Okay, I understand a bit better after reading #1553 more carefully.

authors: isoos sortie

repo: dart-lang/pub-dartlang-dart


text:
Show upgrade reports in pub get/build/serve when it regenerated the lockfile

Those commands will occasionally need to regenerate the lockfile if it turns out to be out of date. In that case, it would be good if it also showed the upgrade report.

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

authors: DartBot munificent

repo: dart-lang/sdk


text:
WebGL demo fails to work in IE11

This issue was originally filed by jdav...@pcprogramming.com

What steps will reproduce the problem?

http://rhulha.github.io/ChronosGL/examples/orbitCam.html
works on chrome 39
won't work on IE11

What is the expected output? What do you see instead?
The demo should work w/ IE11, doesn't work.
What version of the product are you using? 1.8.3
On what operating system? win 8.1
What browser (if applicable)? chrome 39 and ie11
Please provide any additional information below.

Closing this since IE11 is no longer supported by our web targets.

authors: DartBot Markzipan


text:
get rid of unnecessary DOM interceptors

It seems there are still several cases where the CPS IR is introducing interceptors where SSA is not. Debugging some tests I ran into this case:
import 'dart:html';
main() {
  document.createElement('object').setAttribute('form', 'form_id');
}

SSA generates:
t1.createElement("object").setAttribute("form", "form_id")

CPSIR generates:
J.setAttribute$2$x(document.createElement("object"), "form", "form_id");

// where:
J.setAttribute$2$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).setAttribute$2(receiver, a0, a1);
};

J.getInterceptor$x = function(receiver) {
    if (receiver == null)
      return receiver;
    if (typeof receiver != object) {
      if (typeof receiver == function)
        return J.JavaScriptFunction.prototype;
      return receiver;
    }
    if (receiver instanceof P.Object)
      return receiver;
    return J.getNativeInterceptor(receiver);
};
 ...

Note that we generate the same code as SSA if the source-program is written as:
new ObjectElement().setAttribute(...);

It was a problem with the inliner: https://codereview.chromium.org/1685643002/

cool - good find!

authors: asgerf sigmundch


text:
Encountered a Dart Analysis Server error.

Analyzer Feedback from IntelliJ
Version information

IDEA AI-182.5107.16.33.5264788
2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36
AI-182.5107.16.33.5264788, JRE 1.8.0_152-release-1248-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080

Exception
Dart analysis server, SDK version 2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36, server version , FATAL error: NoSuchMethodError: The getter 'path' was called on null.
Receiver: null
Tried calling: path
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      Driver._getSdkPath (package:analysis_server/src/server/driver.dart:733:9)
#2      Driver.start (package:analysis_server/src/server/driver.dart:378:28)
#3      main (file:///E:/b/rr/tmpxc66kk/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
<asynchronous suspension>
#4      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:298:32)
#5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

rest of report.txt:
1551351311633 started analysis server:
  M:\flutter\bin\cache\dart-sdk\bin\dart.exe M:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot --client-id=Android-Studio --client-version=AI-182.5107.16 --useAnalysisHighlight
1551351345616 started analysis server:
  M:\flutter\bin\cache\dart-sdk\bin\dart.exe M:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot --client-id=Android-Studio --client-version=AI-182.5107.16 --useAnalysisHighlight
1551351350264 started analysis server:
  M:\flutter\bin\cache\dart-sdk\bin\dart.exe M:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot --client-id=Android-Studio --client-version=AI-182.5107.16 --useAnalysisHighlight
1551351362070 started analysis server:
  M:\flutter\bin\cache\dart-sdk\bin\dart.exe M:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot --client-id=Android-Studio --client-version=AI-182.5107.16 --useAnalysisHighlight

this error only occurs if dart-sdk/flutter is in a network drive
if installed in C: drive as the doc says, it works.

seems this problem also exist for flutter:
flutter will throw error "could not ensure the target project location exists and is accessible" when creating projects under a network drive.

Duplicate of #35226


text:
Dart Analysis Server crash on flutter plugin development

I'm developing a new plugin for flutter framework. When I do a pod install, which create a .symlinks into example/ios folder, it crashes the Dart Analysis Server.
Is there a way to prevent the analyzer to follow the .symlinks folder?.
Analyzer Feedback from IntelliJ
Version information

IDEA AI-183.6156.11.34.5522156
2.3.0-edge.a1668566e563aef64025d0af88a099cbbe847b7e
AI-183.6156.11.34.5522156, JRE 1.8.0_152-release-1343-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.5, screens 1680x1050  Retina

Exception
Dart analysis server, SDK version 2.3.0-edge.a1668566e563aef64025d0af88a099cbbe847b7e, server version 1.26.0, error: FileSystemException(path=/Users/leone/Development/Workspaces/Other/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/wallet_core/example/ios/.symlinks/plugins/path_provider/example/android/app/src/main/java/io/flutter/plugins/pathproviderexample/MainActivity; message=Directory listing failed)
#0      _PhysicalFolder.getChildren (package:analyzer/file_system/physical_file_system.dart:334:7)
#1      _OverlayFolder.getChildren (package:analyzer/file_system/overlay_file_system.dart:334:10)
#2      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1144:32)
#3      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#4      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#5      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#6      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#7      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#8      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#9      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#10     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#11     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#12     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#13     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#14     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#15     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#16     ContextManagerImpl

This is the same issue as https://github.com/dart-lang/sdk/issues/36919.

It turns out this issue is fixed, but the fix hasn't made the Flutter stable channel. You could try switching to beta/dev as a short-term fix until the fix reaches stable.

authors: DanTup leoneparise