Would a PR for plugin support for Logging Libraries (winston, bunyan, pino, etc) be accepted?

Hello,
Just wondering whether, if I ported over the plugin/instrumentation for some of the logging libraries in dd-trace-js, such as winston or bunyan, would a PR be accepted against opentelemetry-js-contrib?
Winston, for example: https://github.com/DataDog/dd-trace-js/blob/master/packages/datadog-plugin-winston/src/index.js
more info: https://datadoghq.dev/dd-trace-js/interfaces/plugins.winston.html
Essentially all it's doing is injecting the trace_id and span_id into the json logs emitted by these logging libraries. This helps users correlate logs emitted by their application with traces that were active at the time the log was emitted. The dd-trace-js implementations have some vendor specific details that would need to be to abstracted away/modified (so instead of injecting keys like dd.trace_id it could be otel.trace_id or <arbitrary_user_supplied_option_with_reasonable_default>.trace_id But otherwise the use case has value for any user and is relatively vendor agnostic imo. So i'd love to have it be something anyone can find in js-contrib, but i'm not sure if the behavior it achieves would too significantly off-spec to have it land there. In which case, no worries, can always host elsewhere and try to just have it referenced in the otel registry.
Is there currently anything in the Otel Spec for this?

I have not seen anything in the spec. Previously, @obecny had created a similar plugin PR, but it was not merged at that time.
The issue I have with such a plugin is that it modifies user program behavior by modifying log output. At the very least, I would not want this installed/enabled by default without some user intervention saying that yes they do want a behavior change. Some logging libraries (including winston I think) already have support for plugins/formatters that can inject fields. Maybe it would be better to release a winston Format which uses the public API methods to inject fields?

Maybe we can get some guidance from the @open-telemetry/technical-committee here?

FYI, I still have it in case there is desire to have it so it will be a matter of read that and fixing conflicts ;)

According to the readme, http and grpc plugins are included directly in this repo, while all others are in contrib. I can understand http if it's based on stdlib, but why was grpc singled out?
I would recommend placing all plugins (unless they are for stdlib) into contrib.

@yurishkuro http(s) is language built-in so it is in main, and gRPC from what I understand was identified early as an important plugin that MUST be supported by all SDKs, so it was also kept here. It can easily be moved to contrib though if it doesn't have the special status that I thought it did.
The question here though is about logging plugins. Is it acceptable to have an autoistrumentation which modifies logging output to include trace ids? If it is acceptable, should it be included in our "all plugins" package?

@yurishkuro fwiw i only opened the PR here for visibility, i didn't really intend to broach the topic of where all the plugins should live.
I tend to agree with @dyladan here.

it modifies user program behavior by modifying log output. At the very least, I would not want this installed/enabled by default without some user intervention saying that yes they do want a behavior change. `

If logging plugins were to land in js-contrib, they should be something that's explicitly enabled. This is the case in dd-trace-js currently fwiw (you pass in config flag or env var to enable).
That being said, if there's a reasonable way to do this already that doesn't end up bumping up against Spec, or fits within an existing otel convention, i'm fine with that approach rather than having something that's problematic, even if it requires slightly more user configuration (one of the benefits of a plugin is that user config is as simple as a config flag/env var). I think what you mentioned re: winston format is a very reasonable (i'll admit i need to learn a bit more about it and also investigate if bunyan has something similar). If that's the approach that's preferred i'd be happy to document the appropriate config/formatting required, but it would be nice to have this land somewhere such as /docs where users can discover it

but it would be nice to have this land somewhere such as /docs where users can discover it

Or the registry?

In bunyan it is very easy. We would have something like this:
import { trace } from "@opentelemetry/api";
import { format } from "logform";

const tracer = trace.getTracer("@opentelemetry/logform", "0.3.2");

/*
 * Returns a new instance of the OpenTelemetry Trace Context Format which adds an OpenTelemetry Trace Context
 */
export const TraceContextFormatter = format((info) => {
    const { traceId, spanId, traceFlags } = tracer.getCurrentSpan().context();
    info.traceContext = {
        traceId,
        spanId,
        sampled: !!(traceFlags & 0x1)
    };
    return info;
});

And usage would look like this:
import { TraceContextFormatter } from "@opentelemetry/logform"
import { createLogger, transports, format } from "winston";

const logger = createLogger({
    format: format.combine(
        traceContextFormatter(),
        format.json()
    ),
    transports: [new transports.Console()],
})

logger.info("some log message")
// OUTPUT: {"message":"hey","level":"info","traceContext":"[traceId=0 spanId=0 sampled=0]"}

I haven't tested this code, but it should require only very little if any modification to get working.

        traceContextFormatter(),

This is README worthy imho, and examples for pino and winston would be nice as well.
What's !!(traceFlags & 0x1) do btw?

I know that this was recently merged in the specs, don't know if it should apply to 3rd party logger or only to the future logs-sdk

That bunyan example is docs worthy imho, and examples for pino and winston would be nice as well.
What's !!(traceFlags & 0x1)is a tad obscure imho, what's it do exactly?
is !! essentially Boolean()?

!! casts to Boolean yes. It is a slightly more esoteric way to do it I guess. ! is not, so !! is not-not.
traceFlags & 0x1 checks to see if the first bit is set by doing a bitwise AND operation on traceflags and 00000001. The idea is that the trace flag is only the first bit, so any traceFlags value with that bit set should still return true such as 1, 3, 5, etc (any odd number has the first bit set).

I know that this was recently merged in the specs, don't know if it should apply to 3rd party logger or only to the future logs-sdk

The idea behind the data model is that you should be able to convert any existing known logging data and convert it to our own data model so it can be ingested by backends. It should be losslessly convertible in both directions (conversion from source logs like syslog to our model and back to the source format should be "perfect").

BTW I am today doing something similar with https://github.com/pinojs/pino
I leave the traceFlags key as provided from context though, @dyladan any particular reason you modify it to sampled ?
import tracer from './tracer'
import * as pino from 'pino';

export default pino({
  formatters: {
    log(object) {
      return {...object, ...tracer.getCurrentSpan()?.context()};
    },
  },
});

Also worth noting, for the http request logger https://github.com/pinojs/pino-http I also replace reqId with spanId as such:
import tracer from './lib/tracer';
import logger from './lib/logger';
import * as pinoHttp from 'pino-http';

app.use(
  pinoHttp({
    logger,
    genReqId: () => {
      const spanId = tracer.getCurrentSpan()?.context().spanId;
      return spanId ?? 'no span id!';
    },
  })
);

@dyladan any particular reason you modify it to sampled ?

I think sampled=1 is more readable to most people than TraceFlags=1. Sampled doesn't require previous knowledge of Trace Context spec and the associated TraceFlags.

As we have winston, bunyan, pino instrumentations now I'm going to guess the answer was yes and this can be closed? @dyladan


extract makePlaceholder function

Coverage decreased (-34.9%) to 47.594% when pulling 9d5a1e3541c2bf576f4909c0a7710b96920932cb on makePlaceholder into 30efb77cde94304a5038d9f5c3457243256616e3 on master.


⚠ BCR Bot has degraded performance

In ea1d4d0, BCR Bot (https://bcr.alternativasinteligentes.com/BCRApi/web/chatbot) experienced degraded performance:

HTTP code: 200
Response time: 5993 ms

Resolved: BCR Bot performance has improved in 23eae69.


Starting shape

I need to change the starting shape of the chart. Right now it must be a decision shape, but my process almost never start with a decision. Please help. Thanks

U can't start with decision shape.


Remove gulp

Description
Attempts to replace outdated gulp-tape plugin that prevents contributors from using JSX syntax.

Replace gulp with package.json scripts.
Replace jshint with eslint

Fixes/addresses #178
Type of change
Please delete options that are not relevant.

[X] New feature (non-breaking change which adds functionality)

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] Any dependent changes have been merged and published in downstream modules
[ ] Changes have been manually tested (please provide information on test platform using the fields below)

Test / Development Platform Information

Operating system and version
Avrgirl Arduino version
NodeJS version
Arduino Board being used

Coverage decreased (-0.3%) to 44.211% when pulling ac8873489bbdf9f7ba87ea9ba3f8b25136f2c5ed on knitcodemonkey:remove-gulp into 1dfd9c12f12a3076ad131199952e23543f15e9fd on noopkat:master.

Coverage decreased (-0.3%) to 44.211% when pulling ac8873489bbdf9f7ba87ea9ba3f8b25136f2c5ed on knitcodemonkey:remove-gulp into 1dfd9c12f12a3076ad131199952e23543f15e9fd on noopkat:master.

this is really good thank you! I looked at the current NodeJS support timelines and NodeJS versions  6 & 7 are not end of life, so I think we can go ahead and:

remove them from our travis yaml config
bump the next version of avrgirl-arduino to a major release with these changes in it

I'll test with physical hardware before merging this but it should all be fine 🌈
Thanks again for bring this library into the present day after being stuck in the past.

Thank you for looking at this PR, @noopkat. I have removed node 6 and 7 from the yaml file, and bumped the version to 4.0.0. Even if this doesn't bring you all the way up to date, it certainly makes the last of the updates easier!

hey @knitcodemonkey this doesn't look like it's going to merge properly as far as Github is concerned but thank you for much for removing gulp and leveling up our test and linting framework!


Use BinaryData.Empty instead of bespoke solution in SCM and Azure.Core

Fixes https://github.com/Azure/azure-sdk-for-net/issues/41034

API change check
API changes are not detected in this pull request.


SHOW COLUMNS table not working

SHOW COLUMNS returns nothing, here's the example: https://jsfiddle.net/12mdj8q6/1/

UPDATE: sorry, the example above was actually working, HOWEVER, if I insert values from a javascript object into an alasql table, then  #SHOW COLUMNS fails, see here: https://jsfiddle.net/cwz5gves/

SHOW COLUMNS will give you information about columns defined for the table.
In your example you are not defining any columns - only inserting data.
Please replace
CREATE TABLE Cities;

with
CREATE TABLE Cities (City string, Population int);

to make SHOW COLUMNS  work
WOrking example: http://jsfiddle.net/v1e4ep5m/

My question was rather pointing out the fact that SHOW COLUMNS doesn't seem to work if I use the SELECT * INTO table method - without explicitly defining the columns.
When you insert data into a table, shouldn't it automatically create those columns?

Good point.
I missed that...

When you insert data into a table, shouldn't it automatically create those columns?

Trying to guess that data the user is putting in for each insert would would be time consuming. Asking "Show data" to check every row for every peace of data would be time consuming.
I have a feeling the best approach would be to make a function that takes a SELECT * FROM ... and itterates over each row to fetch all column names.

Sorry for dragging this out, but I'm still trying to figure something out in my code, and another idea came to me.
I understand what you wrote about the time issue, it makes sense.
However, when I explicitly SELECT columns FROM another table INTO a new table, couldn't those columns be created automatically in the new table? I mean there's no need to loop through anything, the columns to be created are already there in the SELECT.
See my example here: http://jsfiddle.net/dqpkvgod/1/ (forked from yours)

I agree. Lets put it on the list of things to be implemented.


Relicense under dual MIT/Apache-2.0

This issue was automatically generated. Feel free to close without ceremony if
you do not agree with re-licensing or if it is not possible for other reasons.
Respond to @cmr with any questions or concerns, or pop over to
#rust-offtopic on IRC to discuss.
You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0" and
the repository field pointing here.
TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be nice
for GPLv2 projects to use your code.
Why?
The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library in
use. The Apache license does not have this drawback. However, this is not the
primary motivation for me creating these issues. The Apache license also has
protections from patent trolls and an explicit contribution licensing clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project.
Some ask, "Does this really apply to binary redistributions? Does MIT really
require reproducing the whole thing?" I'm not a lawyer, and I can't give legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it.
But, again, the copyright notice redistribution is not the primary motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.
How?
To do this, get explicit approval from each contributor of copyrightable work
(as not all contributions qualify for copyright, due to not being a "creative
work", e.g. a typo fix) and then add the following to your README:
## License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

and in your license headers, if you have them, use the following boilerplate
(based on that used in Rust):
// Copyright 2016 rustless Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

It's commonly asked whether license headers are required. I'm not comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.
Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust repo for a plain-text
version.
And don't forget to update the license metadata in your Cargo.toml to:
license = "MIT OR Apache-2.0"

I'll be going through projects which agree to be relicensed and have approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!
Contributor checkoff
To agree to relicensing, comment with :
I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

Or, if you're a contributor, you can check the box in this repo next to your
name. My scripts will pick this exact phrase up and check your checkbox, but
I'll come through and manually review this issue later as well.

[ ] @badboy
[x] @doabit
[x] @flaub
[x] @globin
[x] @killercup
[x] @mkovalchik
[ ] @s-panferov
[ ] @syakhmi

I license past and future contributions under the dual MIT/Apache-2.0
license, allowing licensees to chose either at their option.
cmr<EMAIL_ADDRESS>schrieb am So., 10. Jan. 2016 um 20:44:

This issue was automatically generated. Feel free to close without
ceremony if
you do not agree with re-licensing or if it is not possible for other
reasons.
Respond to @cmr https://github.com/cmr with any questions or concerns,
or pop over to
#rust-offtopic on IRC to discuss.
You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0"
and
the repository field pointing here.
TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be
nice
for GPLv2 projects to use your code.
Why?
The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library
in
use. The Apache license does not have this drawback. However, this is not
the
primary motivation for me creating these issues. The Apache license also
has
protections from patent trolls and an explicit contribution licensing
clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only
for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project https://robigalia.org.
Some ask, "Does this really apply to binary redistributions? Does MIT
really
require reproducing the whole thing?" I'm not a lawyer, and I can't give
legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it
https://www.quora.com/Does-the-MIT-license-require-attribution-in-a-binary-only-distribution
.
But, again, the copyright notice redistribution is not the primary
motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.
How?
To do this, get explicit approval from each contributor of copyrightable
work
(as not all contributions qualify for copyright, due to not being a
"creative
work", e.g. a typo fix) and then add the following to your README:
License
Licensed under either of

Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.
and in your license headers, if you have them, use the following
boilerplate
(based on that used in Rust):
// Copyright 2016 rustless Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
It's commonly asked whether license headers are required. I'm not
comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.
Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust https://github.com/rust-lang/rust repo for a plain-text
version.
And don't forget to update the license metadata in your Cargo.toml to:
license = "MIT OR Apache-2.0"
I'll be going through projects which agree to be relicensed and have
approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!
Contributor checkoff
To agree to relicensing, comment with :
I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.
Or, if you're a contributor, you can check the box in this repo next to
your
name. My scripts will pick this exact phrase up and check your checkbox,
but
I'll come through and manually review this issue later as well.

@badboy https://github.com/badboy
@doabit https://github.com/doabit
@flaub https://github.com/flaub
@globin https://github.com/globin
@killercup https://github.com/killercup
@mkovalchik https://github.com/mkovalchik
@s-panferov https://github.com/s-panferov
@syakhmi https://github.com/syakhmi

—
Reply to this email directly or view it on GitHub
https://github.com/rustless/rustless/issues/55.

r+

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

I license past and future contributions under the dual MIT/Apache-2.0
license, allowing licensees to chose either at their option.
On Sun, Jan 10, 2016 at 11:44:56AM -0800, cmr wrote:

This issue was automatically generated. Feel free to close without ceremony if
you do not agree with re-licensing or if it is not possible for other reasons.
Respond to @cmr with any questions or concerns, or pop over to
#rust-offtopic on IRC to discuss.
You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0" and
the repository field pointing here.
TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be nice
for GPLv2 projects to use your code.
Why?
The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library in
use. The Apache license does not have this drawback. However, this is not the
primary motivation for me creating these issues. The Apache license also has
protections from patent trolls and an explicit contribution licensing clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project.
Some ask, "Does this really apply to binary redistributions? Does MIT really
require reproducing the whole thing?" I'm not a lawyer, and I can't give legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it.
But, again, the copyright notice redistribution is not the primary motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.
How?
To do this, get explicit approval from each contributor of copyrightable work
(as not all contributions qualify for copyright, due to not being a "creative
work", e.g. a typo fix) and then add the following to your README:
## License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

and in your license headers, if you have them, use the following boilerplate
(based on that used in Rust):
// Copyright 2016 rustless Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

It's commonly asked whether license headers are required. I'm not comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.
Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust repo for a plain-text
version.
And don't forget to update the license metadata in your Cargo.toml to:
license = "MIT OR Apache-2.0"

I'll be going through projects which agree to be relicensed and have approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!
Contributor checkoff
To agree to relicensing, comment with :
I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

Or, if you're a contributor, you can check the box in this repo next to your
name. My scripts will pick this exact phrase up and check your checkbox, but
I'll come through and manually review this issue later as well.

[ ] @badboy
[ ] @doabit
[ ] @flaub
[ ] @globin
[ ] @killercup
[ ] @mkovalchik
[ ] @s-panferov
[ ] @syakhmi

Reply to this email directly or view it on GitHub:
https://github.com/rustless/rustless/issues/55


Fix warnings related to accessing mime types via constants

xref - https://github.com/rails/rails/pull/21869 and https://github.com/rails/rails/commit/efc6dd550ee49e7e443f9d72785caa0f240def53.

@schneems There are some more warnings https://gist.github.com/prathamesh-sonpatki/bfef67f03381086ff197. I will fix those in separate PR.

Tests failed for Ruby 1.9, I opened #19 to drop support for 1.9 :smile:


flutter build web error

import but not used(check platform type, skip if web).
Error: Only JS interop members may be 'external'.
  external int wBitsPerSample;
....
....
/D:/tmp/.pub/cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/combase.dart:24:37:
Error: Only JS interop members may be 'external'.
  external Pointer<Pointer<IntPtr>> lpVtbl;
                                    ^
Error: Compilation failed.

Turn's out, It's another plugin problem, not this one.

@sleepreading how did you find out which plugin? I have quite a lot of dependencies, tried removing which I thought were the issue but no luck

@varunbhalerao56  I use this plugin https://github.com/leanflutter/launch_at_startup/issues/2#event-5946585105.
As the author said he has fixed this issue.


how to export the output of getColoredPathway?

according to the example
writeLines(svg, "pathway.svg") is the way to export the image file.
somehow it does not work on my machine. i also tried other image format.
i managed to do to using rsvg
i wonder if anybody met this issue as well?

to use the same example in the help file, this seems work.
svg = getColoredPathway(pathway = "WP554",  graphId = c("ef1f3","e68e0"), color=c("FF0000", "0000FF"), fileType = "svg")
rsvg::rsvg_pdf("ppp.svg","out.pdf")

This method was using the webservice, but that was causing trouble on the service and was deprecated. Please see https://bioconductor.org/packages/release/bioc/vignettes/rWikiPathways/inst/doc/Pathway-Analysis.html for the current approach.


Heap Interface ThreadSafe?

I'm trying to walk a large heap in parallel to speed things up. Is the Heap interface threadsafe?

Heap interface is single threaded. Unless your heap is rather small to fit disk cache, IO is going to be your bottleneck anyway.


Pivot columns

How to get pivot columns like I have post_id, term_id, content
I want to get content data in there. How to get it?
$this->pivot_result = $pivot_query->result_array();

Have you found a solution yet ? Because I have the same problem


Removed bug from footer

Hey, @Rajdip019 I have successfully removed the bug from the footer. Please review it and merge my pr if everything is fine. Thank you!

Before

After

Congrats @sumitkr2000 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow this steps.

Star this repository. ⭐

SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.

Link to my clueless community profile:-
https://www.clueless.tech/profile/admin/100724979634523141185
@Debajyoti14


Add session id to events so that they can be used in session duration analysis

Because there are no session ids on events they cannot be used for session duration analysis.
The current session duration analysis only cares that an event exists, has a timestamp, and has a $session_id property

Similar to https://github.com/PostHog/posthog-android/issues/28

Any update on this issue?

Not yet, it depends on https://github.com/PostHog/posthog-flutter/pull/60 which adds the PH Android SDK v3, but the session_id is still missing on iOS, coming next.


Fix extraction script to handle additonal examples

Upstream put new examples per operation, this makes sure to ignore them and
just extract the main ones.

Codecov Report

Merging #124 (542b8ae) into master (52da3fa) will decrease coverage by 2.92%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
- Coverage   39.05%   36.13%   -2.93%
==========================================
  Files         707      707
  Lines       60744    60760      +16
==========================================
- Hits        23724    21955    -1769
- Misses      37020    38805    +1785

Impacted Files
Coverage Δ

...ib/datadog_api_client/v2/api/incident_teams_api.rb
10.81% <0.00%> (-68.25%)
:arrow_down:

...datadog_api_client/v2/api/incident_services_api.rb
10.81% <0.00%> (-68.25%)
:arrow_down:

lib/datadog_api_client/v2/api/incidents_api.rb
10.88% <0.00%> (-68.03%)
:arrow_down:

lib/datadog_api_client/v2/api/roles_api.rb
8.90% <0.00%> (-62.91%)
:arrow_down:

lib/datadog_api_client/v2/api_error.rb
28.57% <0.00%> (-57.15%)
:arrow_down:

lib/datadog_api_client/v2/api/users_api.rb
9.67% <0.00%> (-55.65%)
:arrow_down:

lib/datadog_api_client/v2/api/processes_api.rb
20.00% <0.00%> (-55.00%)
:arrow_down:

lib/datadog_api_client/v2/api/logs_api.rb
32.96% <0.00%> (-47.26%)
:arrow_down:

lib/datadog_api_client/v1/api/ip_ranges_api.rb
26.66% <0.00%> (-46.67%)
:arrow_down:

lib/datadog_api_client/v2/models/roles_type.rb
63.63% <0.00%> (-36.37%)
:arrow_down:

... and 94 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52da3fa...542b8ae. Read the comment docs.


Better logo?

This aims to make the logo a little cleaner
Before

After

Alternative

Since, this is vector based, any high resolution size image can be generated from it's original svg. Also I didn't know the font face so I used the closest open free font I could find Rubik One Regular.

@afzalsayed96 Hello 👋
I apologize for the late response.
I've definitely thought about ways to improve the logo. When I made the current one, I wasn't exactly satisfied with it myself. Though, to be honest, I didn't really mind the sharp corner and left it in there. However, I really appreciate your work to try and improve it. 🙌
Something I've thought about in the past is making a gopher logo (like bettercap or gitrob). If we keep the sf thing, maybe getting rid of the the three lines overall.
➡ We could get some more input from @Mzack9999, @codingo and @Ice3man543.
Either way, I'd love for this to be sorted out for sure once this research work is merged into the subfinder master branch. Thanks for brining it up!


User parameters for peak calling

Add new user parameters for MANORM selection, distance in peak calling, contrast manifest

resolved with commit 98189d53cef6d8b6f15278fd48e8549a04f35fb3


Avoid unconditional getrandom syscall creating a WasiCtx

This commit updates the default random context inserted into a WasiCtxt to be seeded from thread_rng rather than the system's entropy. This avoids an unconditional syscall on the creation of all WasiCtx structures shouldn't reduce the quality of the random numbers produced.

It does reduce quality when forking processes or entire vm's. For cloning vm's acpi allows the virtual machine monitor to tell the vm that a clone has happened, which on linux causes the system csprng to be reseeded. See https://lwn.net/Articles/887207/

Wasmtime hasn't really been written for fork-safety, and otherwise fork-safety seems like it would be part of the rand or cap-rand crate, if anything, so I'm going to go ahead and merge this.


BIGTOP-4083. Upgrade Hive to 4.0.1.

https://issues.apache.org/jira/browse/BIGTOP-4083

bumped hive to 4.0.1
removed obsolete patches.
added excludes to rat check for files placed on deb packaging.
added JDBC URL param since hive CLI is wrapper of beeline now.

I want to merge this first then address further nits in follow-up JIRAs.

smoke-tests passed on Ubuntu 22.04 x86_64.

+1 also tested with Debian 11 on x86_64. Thanks @iwasakims.


{"Object reference not set to an instance of an object."}

When i try get a response like that:
`WebhoseRequest clientRequest = new WebhoseRequest(APIKEY);
WebhoseResponse response = clientRequest.getResponse("minecraft");`

Your getting this error because the clientRequest is null.
Please check your APIKEY that he is the right one and then try again.

No. Not about APIKEY. I found and handle it. There was no null control in WebhosePost.cs for post["persons"] and post["locations"] and post["organizations"]. I added null controls. And now everything working fine.

Yeah same here , I just added some null checks , and its working fine.

https://github.com/Buzzilla/webhose-dotnet/pull/5


google-api-nodejs-client vs. google-auth-library-nodejs – core difference ?

Hi, as casual Node.js user , I am curious what's the difference between two i.e.: google-api-nodejs-client and google-auth-library-nodejs ?
Thank you.

That helps a lot , thanks ! 💯


Tailwind CSS classes not working

I just successfully installed webpack, and am now trying to follow along in chapter 5, styling the header and footer. I'm using the /web/themes/custom/alps_trips_templates/weather/alps-weather-forecast.html.twig template, but am not seeing any CSS being applied. I have verified that the template itself is working by temporarily removing a Tailwind CSS class and adding a bit of inline CSS to one of the headings. I was able to change the text color and make other styling changes this way, so I know that the template is working. However, the Tailwind CSS classes (for example,
) or
 are not producing any effect.

One of the things that I found is that the Nord colors that were added for Storybook were not added to the alps_trips theme.  As a result, areas of the site that relied on those colors were not shown.  To deal with this I copied the theme ... colors section of the tailwind.config.js file from the storybook directory to the file in the alps_trips directory.   After recompiling Tailwind and clearing cache things looked much better.

Thanks. I'll try that and will let you know, but I'm not sure if it will work. It's not only Nord colors which aren't working for me -- I'm not getting any CSS styling whatsoever.

I suggest checking the paths in the content section of tailwind.config.css  There a lot of ../ and perhaps one was missed. Also check the plugins section of  postcss.config.js  Make you are generating a styles.css file in the build directory when you compile Tailwind

Thanks so much for your suggestions.
The first line of the content array reads './templates/**/*.html.twig', the second line is '../../../../storybook/stories/**/*.html.twig', and the third line is './us/**/*.js',. All three seem correct.
I don't have a clear enough understanding of things to be able to tell if the styles.css file is being generated. This file reads:
let tailwindcss = require('tailwindcss'); module.exports = {     plugins: [         tailwindcss('./tailwind.config.js'),         require('autoprefixer')     ] }
I suspect that the problem may be here, but don't have enough of a background to be able to tell what actually is happening or if anything is going wrong.
Thanks again for your suggestions.

The third line should be     './js/**/*.js'  Looks like you have a typo.
As for the styles.css file when you were generating the assets in the Chapter 2 webpack section there was a paragraph that said:
Now, if you look at the build folder, you should find four new files:
• main.js
• main.js.map
• styles.css
• styles.css.map
Make sure that actually happened.
In addition make sure that you are successfully updating these files when you make changes. I call it compiling tailwind.
As Chapter 2 suggests yarn run build:dev but I find it's necessary to do ddev yarn run build:dev from the alps_trips directory.
An alternative is to ddev theme start:dev in a separate terminal session to monitor for changes.

main.css file doesn't exist, it should be tailwind.css, we've reported everything here: https://github.com/PacktPublishing/Modernizing-Drupal-10-Theme-Development/blob/main/ERRATA.md#chapter-2


Stop injecting extension everywhere

Restrict it per domain since we load player per domain as well.
It's polluting logs and being injected for no reasons

I'm not sure about this one.
We still want to have an universal remote whatever the domain you are on.
Easy fix could be to override console.log in production


Blazor WebAssembly Hosted on ASP.NET Core - Issue

[EDIT by guardrex to change the metadata]
I have a Blazor WebAssembly app hosted using ASP.NET Core server. I have added a Razor page to Pages folder of the ASP.NET Core server project - which should also be able to recognize a logged in user, but it doesn't.
I followed the override path method, but it doesn't work. Relevant sections of my Startup.cs are as follows:-
   `public void ConfigureServices(IServiceCollection services)
    {
        services.AddDbContext<ApplicationDbContext>(options => options
            .UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))
            .EnableSensitiveDataLogging());

        services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
            .AddRoles<IdentityRole>()
            .AddEntityFrameworkStores<ApplicationDbContext>()
            .AddClaimsPrincipalFactory<AppClaimsPrincipalFactory>();

        services.AddIdentityServer()
            .AddApiAuthorization<ApplicationUser, ApplicationDbContext>(options =>
            {
                options.IdentityResources["openid"].UserClaims.Add("role"); // Roles
                options.ApiResources.Single().UserClaims.Add("role");

                options.IdentityResources["openid"].UserClaims.Add("First_Name"); // Custom Claim
                options.ApiResources.Single().UserClaims.Add("First_Name");

                options.IdentityResources["openid"].UserClaims.Add("Last_Name"); // Custom Claim
                options.ApiResources.Single().UserClaims.Add("Last_Name");

                options.IdentityResources["openid"].UserClaims.Add("Organization"); // Custom Claim
                options.ApiResources.Single().UserClaims.Add("Organization");

                options.IdentityResources["openid"].UserClaims.Add("Domain"); // Custom Claim
                options.ApiResources.Single().UserClaims.Add("Domain");

                options.IdentityResources["openid"].UserClaims.Add("Email"); // Custom Claim
                options.ApiResources.Single().UserClaims.Add("Email");
            });

        //JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("role");

        //services.AddTransient<IProfileService, ProfileService>();

        services.AddAuthentication()
            .AddIdentityServerJwt();

        var keysFolder = Path.Combine(hostingEnvironment.ContentRootPath, "KeyRing");
        services.AddDataProtection()
            .PersistKeysToFileSystem(new DirectoryInfo(keysFolder))
            .SetApplicationName("MY_APP_NAME");

        services.ConfigureApplicationCookie(options => {
            options.Cookie.Name = ".AspNet.SharedCookie";
            options.Cookie.Path = "/";
        });

        services.AddControllersWithViews();
        services.AddRazorPages();

        services.AddSwaggerGen(c =>
        {
            c.SwaggerDoc("v1", new OpenApiInfo
            {
                Version = "v1",
                Title = "ToDo API",
                Description = "A simple example ASP.NET Core Web API",
                TermsOfService = new Uri("https://example.com/terms"),
                Contact = new OpenApiContact
                {
                    Name = "Shayne Boyer",
                    Email = string.Empty,
                    Url = new Uri("https://twitter.com/spboyer"),
                },
                License = new OpenApiLicense
                {
                    Name = "Use under LICX",
                    Url = new Uri("https://example.com/license"),
                }
            });
        });
    }`

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 9638772f-0f1e-c2a9-8a58-ae8c3e37ae28
Version Independent ID: 7a5b169e-08cb-cdba-4501-88d3da2723bb
Content: Secure an ASP.NET Core Blazor WebAssembly hosted app with Identity Server
Content Source: aspnetcore/blazor/security/webassembly/hosted-with-identity-server.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @fornax76 ... That's close (sans the cookie and DP bits) to what's published in the hosted Blazor with IdS topic at https://docs.microsoft.com/aspnet/core/blazor/security/webassembly/hosted-with-identity-server. Did you create your app (or an earlier app) exactly per that guidance and hit this problem? If not, you might try creating an app via the topic's guidance with the scenarios you need (e.g., profile service, custom user factory, etc.) and see if page auth behavior works as expected. If so, see how deltas may explain your app's behavior. If not, I'll need to test our guidance here to see if I can repro the behavior. If I can repro the behavior (page auth not working as expected), then we'd ask engineering to have a look. AFAIK (and there aren't reports from the community AFAIK), the guidance in that topic will result in an app that works with ordinary ASP.NET Core+IdS auth.

I have a Blazor WA + ASP.NET Core hosted solution here, which followed the IdS setup doc link you mentioned above. Here is the specific ask I want to achieve:-

In the server project under Pages folder, I created a razor page named Index.
I want to enable cookie authentication for this folder / file, but unable to do so using the suggested cookie config changes.

Repo
https://github.com/fornax76/IdentityDemo
Cookie config change commit
https://github.com/fornax76/IdentityDemo/commit/1f5299e1f45155b8561a3a90284e813f4bf769a1
Index razorpage source code: https://github.com/fornax76/IdentityDemo/blob/1f5299e1f45155b8561a3a90284e813f4bf769a1/IdentityDemo/Server/Pages/Index.cshtml.cs
What am I doing wrong? I simply followed the WA Ids configration and cookie customization, but still unable to get the Index page authenticated. Would appreciate any help.

and cookie customization ... using the suggested cookie config changes

I didn't know that there would be a problem for that scenario. This is the first report that we've had in the docs issues on this scenario. If you don't see an existing issue on this in the engineering issues, open a new issue for them.
Start looking with these filters (open and closed Blazor issues) ...
https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+label%3Aarea-blazor+
... try filtering that down with some search terms (e.g., cookie). If nothing related comes up, then open a new issue there and please add a cc: @guardrex to your opening comment so that I can follow the discussion. I'll re-open and work on this depending on what they say.


Address not thrown Get-DynamicDistributionGroup error

Issue:
Customer reported an error in the script. It was an unhandled error caused by Get-DynamicDistributionGroup. For some reason the cmdlet wasn't honoring the ErrorAction of stop to get thrown into the catch.
Reason:
To avoid false positive issues.
Fix:
Did a loop error catch around the cmdlet.
Validation:
Lab tested, couldn't repro the issue. Pending customer confirmation.

Feedback was provided that the information about HC running into a problem was addressed, but they still see the error show up to the screen at the time of execute. Not a way around this if the catch doesn't work or we use the filter parameter option.
For now, just going to merge, if more issues pop up will address at that time.


[BBC iPlayer] Not downloaded with the tag "Signed"

Checklist

[X] I'm reporting a bug unrelated to a specific site
[X] I've verified that I'm running yt-dlp version 2022.02.04. (update instructions)
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Description
The problem with the video is marked on the site as "This is a Signed version of this program. In the browser this program is playing normally. Other programs without the "Signed" mark are downloading without any problems.
Verbose log
[debug] Command-line config: ['--cookies-from-browser', 'firefox:1q9pamb6.TunnelBears', '--add-metadata', '--add-chapters', '--extractor-retries', '1000', '-R', '1000', '--write-subs', '--sub-format', 'ttml', 'https://www.bbc.co.uk/iplayer/episode/m000slpt/gardeners-world-winter-specials-episode-3', '-vU']
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\glock\AppData\Roaming\Mozilla\Firefox\Profiles\1q9pamb6.TunnelBears\cookies.sqlite"
[Cookies] Extracted 655 cookies from firefox
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, err utf-8, pref cp1251
[debug] yt-dlp version 2022.02.04 [c1653e9] (win_dir)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg 2022-02-17-git-2812508086-full_build-www.gyan.dev (setts), ffprobe 2022-02-17-git-2812508086-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [bbc.co.uk] Extracting URL: https://www.bbc.co.uk/iplayer/episode/m000slpt/gardeners-world-winter-specials-episode-3
[bbc.co.uk] m000slpt: Downloading video page
[bbc.co.uk] m000slpt: Downloading playlist JSON
ERROR: local variable 'programme_id' referenced before assignment
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1381, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1451, in __extract_info
  File "yt_dlp\extractor\common.py", line 612, in extract
  File "yt_dlp\extractor\bbc.py", line 580, in _real_extract
  File "yt_dlp\extractor\bbc.py", line 477, in _download_playlist
UnboundLocalError: local variable 'programme_id' referenced before assignment

I also get an error for BBC World Service (I don't know if it is the same thing)
/m/d/82_Audiobooks [1] 🃅 yt.ogg -v https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads
[debug] Command-line config: ['-i', '--youtube-skip-dash-manifest', '--download-archive', '/home/xk/.local/share/yt_archive.txt', '--retries', 'infinite', '--extractor-retries', 'infinite', '-f', 'bestaudio', '--extract-audio', '-v', 'https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads', '--exec', 'ffmpeg -hide_banner -loglevel panic -y -i {} -c:a libopus -ac 2 -b:a 128k -vbr constrained -filter:a loudnorm=i=-18:lra=17 "`echo {} | cut -f 1 -d \'.\' | sed \'s/$/n.opus/\'`" && rm {} ']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.10.2 (CPython 64bit) - Linux-5.16.11-200.fc35.x86_64-x86_64-with-glibc2.34
[debug] exe versions: ffmpeg 4.4.1 (setts), ffprobe 4.4.1
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] Loading archive file '/home/xk/.local/share/yt_archive.txt'
[debug] [bbc.co.uk:playlist] Extracting URL: https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads
[bbc.co.uk:playlist] p01rcrn6: Downloading webpage
[download] Downloading playlist: BBC World Service - Elements - Downloads
[bbc.co.uk:playlist] playlist BBC World Service - Elements - Downloads: Downloading 31 videos
[download] Downloading video 1 of 31
[debug] [bbc.co.uk] Extracting URL: http://www.bbc.co.uk/programmes/p02rqfk1
[bbc.co.uk] p02rqfk1: Downloading video page
[bbc.co.uk] p02rqfk1: Downloading playlist JSON
ERROR: local variable 'programme_id' referenced before assignment
Traceback (most recent call last):
  File "/home/xk/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1381, in wrapper
    return func(self, *args, **kwargs)
  File "/home/xk/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1451, in __extract_info
    ie_result = ie.extract(url)
  File "/home/xk/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 612, in extract
    ie_result = self._real_extract(url)
  File "/home/xk/.local/lib/python3.10/site-packages/yt_dlp/extractor/bbc.py", line 580, in _real_extract
    programme_id, title, description, duration, formats, subtitles = self._download_playlist(group_id)
  File "/home/xk/.local/lib/python3.10/site-packages/yt_dlp/extractor/bbc.py", line 477, in _download_playlist
    return programme_id, title, description, duration, formats, subtitles
UnboundLocalError: local variable 'programme_id' referenced before assignment

These both occur because http://www.bbc.co.uk/programmes/%s/playlist.json' % playlist_id is returning a JSON object whose allAvailableVersions member is an empty list. Apparently this didn't happen before but the code is obviously unsafe in assuming that the list must be populated. Unfortunately the existing fallback doesn't help in getting the desired playlist data (404), so the extraction would crash anyway.
yt-dl goes for the defaultAvailableVersion member, instead of trying each of allAvailableVersions, but that's null, so the result is equally bad.

Yeah, that was my change, since sometimes BBC messes up and defaultAvailableVersion ends up being an SD-only audio-described version.

https://www.bbc.co.uk/iplayer/episode/m000slpt/gardeners-world-winter-specials-episode-3 has expired on iPlayer (last shown a year ago).
https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads is more interesting. It seems to be a WS Podcast page with embedded links like this https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download/proto/https/vpid/p02rqfk4.mp3. These items can't be found with the Media Availability Tool because the Mediaset audio-nondrm-download is not in the pull-down, and doesn't appear to work when pasted into the URL query parameters.
Looking at p01rcrn6, it has a programmes page and the 58 episodes can be found by going to https://www.bbc.co.uk/programmes/p01rcrn6/episodes/player and paging through the list until the 'Next>' element
...
 contains no link. Unlike p01rcrn6, each episode (eg "Iron" https://www.bbc.co.uk/programmes/p036q92j) has a playlist.json. However there are no version details, causing the error as reported. Instead, there are two not necessarily exclusive tactics:

the metadata can be extracted from the page (probably the best target is the ld+json element of type RadioEpisode) and the media URL (mp3) can pulled from the 'Podcast' link https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads (but this is a playlist -- perhaps just use special knowledge to construct the open.live mp3 link);
the metadata and media URLs (m4a) can be collected using the 'Listen now' Sounds link https://www.bbc.co.uk/sounds/play/p036q92j.

Currently, for both yt-dl and yt-dlp:

https://www.bbc.co.uk/programmes/p01rcrn6/ fails 'unable to download XML';
the pagination isn't working on https://www.bbc.co.uk/programmes/p01rcrn6/episodes/player, but the episodes on the actual page are found;
an episode (eg "Iron" https://www.bbc.co.uk/programmes/p036q92j) is found;
a Sounds link (eg https://www.bbc.co.uk/sounds/play/p036q92j) works;
the podcast playlist link https://www.bbc.co.uk/programmes/p01rcrn6/episodes/downloads fails, as reported.

see also https://github.com/yt-dlp/yt-dlp/issues/6965#issuecomment-1529938381


[go_router] choose in redirect method if push or go

I would like to choose in redirect method if i want to clear a navigation history (as it is in context.go), even if i started navigation with context.push.
Use case
On application start i have a few configuration pages that user setup once, and finally ends up in dashboard page.
Possible navigation flows (depend on what user already setup, and what skipped in the past):
'/' -> '/dashboard'
'/' -> '/language' -> '/dashboard'
'/' -> '/welcome'/ -> '/dashboard'
'/' -> '/welcome'/ -> '/language' -> '/dashboard'

In language page i want to have a back button in appbar and be able to pop page. When i ends up in dashboard i would like to have a clear navigation history.
Proposal

There could be a Redirection class, with clearHistory parameter (false by default).

GoRoute(
      path: '/language,
      builder: (_, __) => const LanguagePage(),
      redirect: (_, __) {
          final skipToDashboard = ...;
          if (skipToDashboard) {
              return Redirection('/dashboard', clearHistory: true);
          }

          return null;
      }
    ),

Add clearHistory method to GoRouter class.

Hello @dzziwny. Thank you for filing this request. Labelling the issue for visibility and insights from the team

you can have a top level route and use go to clear the history.

You mean, the top route over setup pages, like for ex. /setup/language? But if i go from /setup/welcome to /setup/language i need to use push anyway, right? The problem is that i don't want to decide from any setup page wether to use push or go - I am doing it now and have a separated service that resolves the next step and decide which method to use - it works but looks ugly and redirect lost any sense.

Sometimes redirect does a popUntil. Demonstrated in #116164.
Could we add a way to choose between push, go, and popUntil too?

I have a similar request, that would require a redirect action to perform push instead of go.
I need to have routes under /account "guarded" with login check - so if user is not logged in - a sign in page shows up in root navigator (so over the StackRoute and BottomNavigationBar).
However I also need the /user/login to be regular route that can be called from anywhere and would behave the same.
Below is a code sample that parially works. By partially I mean that redirect works - it opens the /user/login route, it covers the screen, but there is no "back" arrow and the "back" action just closes the app.

main.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(const MyApp());

// #region Router
final _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
final _shellNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'shell');

final _router = GoRouter(
  navigatorKey: _rootNavigatorKey,
  initialLocation: '/',
  redirect: (context, state) {
    if (state.location == "/account") return "/user/login";
    return null;
  },
  routes: [
    ShellRoute(
      navigatorKey: _shellNavigatorKey,
      builder: (context, state, child) {
        return ScaffoldWithNavBar(child: child);
      },
      routes: [
        GoRoute(
          path: "/",
          builder: (_, __) => const HomePage(),
        ),
        GoRoute(
          path: "/account",
          // redirect: (_, __) => "/user/login",

          pageBuilder: (BuildContext context, GoRouterState state) => MaterialPage<void>(
            key: state.pageKey,
            child: const AccountPage(),
          ),
        ),
      ],
    ),
    // I want this route to cover the entire screen (including bottom nav) - this works
    // However, I want to be able to get back from the redirect
    // So if user decides to NOT sign-in - he can go back to previous route
    // I assume that currently go_router uses .go, while I need push on redirect
    GoRoute(
      parentNavigatorKey: _rootNavigatorKey,
      path: "/user/login",
      builder: (_, __) => const LoginPage(),
    ),
  ],
);
// #endregion

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      title: 'Go Router Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routerConfig: _router,
    );
  }
}

class ScaffoldWithNavBar extends StatelessWidget {
  final Widget child;

  const ScaffoldWithNavBar({
    required this.child,
    super.key,
  });

  static int _calculateSelectedIndex(BuildContext context) {
    final location = GoRouterState.of(context).location;
    if (location.startsWith('/home')) return 0;
    if (location.startsWith('/account')) return 1;

    return 0;
  }

  void _onItemTapped(int index, BuildContext context) {
    switch (index) {
      case 0:
        GoRouter.of(context).go('/home');
        break;
      case 1:
        GoRouter.of(context).go('/account');
        break;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: child,
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'Home',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.person),
            label: 'Account',
          ),
        ],
        currentIndex: _calculateSelectedIndex(context),
        onTap: (int idx) => _onItemTapped(idx, context),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("HomePage")),
    );
  }
}

class AccountPage extends StatelessWidget {
  const AccountPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("AccountPage")),
    );
  }
}

class LoginPage extends StatelessWidget {
  const LoginPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("LoginPage")),
      body: const Center(child: Text("This screen should cover the bottom nav bar, and have the 'back' arrow in AppBar.")),
    );
  }
}

Hello @exaby73 ,
Any updates on this issue?
final GoRouter router = GoRouter(   routes: <RouteBase>[     GoRoute(       path: LoginMainPage.route,       builder: (BuildContext context, GoRouterState state) {         return LoginMainPage();       },       redirect: (BuildContext context, GoRouterState state) async {         String appState = await AppFunctions.getAppState();         if (state.fullpath == LoginMainPage.route) {           if (appState == AppConstants.dashboard) {             return DashboardMainPage.route;           }         }         return null;       },       routes: <RouteBase>[         GoRoute(           path: 'register',           builder: (BuildContext context, GoRouterState state) {             return RegisterMainPage();           },         ),         GoRoute(           path: 'dashboard',           builder: (BuildContext context, GoRouterState state) {             return DashboardMainPage();           },           routes: <RouteBase>[             GoRoute(               path: 'profile',               builder: (BuildContext context, GoRouterState state) {                 return const UpdateProfileMainPage();               },             ),             GoRoute(               path: 'questions',               builder: (BuildContext context, GoRouterState state) {                 return QuestionMainPage();               },             ),             GoRoute(               path: 'result',               builder: (BuildContext context, GoRouterState state) {                 return AssessmentMainPage();               },             )           ],         ),       ],     ),   ], );

I'm trying to push page, instead of go with return.
My case is, in my redirect, I want to push the trial page(where you can start the trial) on top of the home page.
Based on my PurchasesBloc, when my offers are ready, I want to push the trial page wherever the user is.
When I just return /trial, it doesn't have any history and you can't go back with pushing.
I'm new in go_router and not sure if it's the correct place to return page or it's the correct issue, but it would fix my issue if I can push in redirect.

Maczuga

same issue，any solve?

Maczuga

same issue，any solve?

Nope, ended up using stock navigator to create own routing solution cuz none of existing routing libraries were able to fill all my needs after all.

Any updates? redirect is broken on many levels see for example. https://github.com/flutter/flutter/issues/135359

Any update about how redirect using push?

I have a problem with go_router, if I am in
/home/details, where (details has a back button in the application bar) and within details a logout button, when the redirect function is activated.
I expect to go to /home, but what I get is the same location.
/home/details.
What is happening is this the expected behavior?

@patrikheinonen that issue seems to be a different problem.
I don't have a update for this issue, and no one is actively working on this. Something that would be tricky is that, let's say introduce a new redirect API, and that API would have function signature like.
void onRedirect(BuildContext context, GoRouterState state, GoRouter router) {
  // directly call router.go or router.push, or any operations.
}

It needs to be smart enough to know the operation doesn't redirect at this level and need to continue to call the redirect on the subroutes.
It seems like something that will be hard to implement. An alternative is implementing something like web's event.preventDefault or event.stopPropagate, but i don't have anything concrete yet.
I would like to have some suggestion or feedback on what the API should look like

How about make the redirect function return an object indicate next action instead of string?. For eg: we can have: GoAction, PushAction, NoAction. I think that is enough to handle this issue

For eg: we can have: GoAction, PushAction, NoAction. I think that is enough to handle this issue

If we want to go this route, we can have
bool onRedirect(BuildContext context, GoRouterState state, GoRouter router) {
  // return true if redirect is handled
}

the push or go can be done directly in the callback.

For eg: we can have: GoAction, PushAction, NoAction. I think that is enough to handle this issue

If we want to go this route, we can have
bool onRedirect(BuildContext context, GoRouterState state, GoRouter router) {
  // return true if redirect is handled
}

the push or go can be done directly in the callback.

If this is implemented, will it be a replacement for the current redirect, or a new function entirely?

Hi @SilentCatD
I would replace it if we implement this. I don't think this add much boilerplate and can achieve everything redirect can do. Is there a concern if we do this?

Hi @SilentCatD
I would replace it if we implement this. I don't think this add much boilerplate and can achieve everything redirect can do. Is there a concern if we do this?

Not at all, I think this will be really great. Thank you for your reply. This will solve a lot of use cases of in route guarding were it to be implemented, thanks.

For eg: we can have: GoAction, PushAction, NoAction. I think that is enough to handle this issue

If we want to go this route, we can have

bool onRedirect(BuildContext context, GoRouterState state, GoRouter router) {

  // return true if redirect is handled

}

the push or go can be done directly in the callback.

Would it work like this?

 bool onRedirect(BuildContext context, GoRouterState state, GoRouter router) {

bool isLogged = ...;
if (!isLogged) router.go('/login');
return isLogged;

}

If so, then why we need the boolean? Shouldn't GoRouter be smart enough to detect if a .go or .push was called?
This way we can use this "wasCalled" condition to determine if redirect in handled.

For eg: we can have: GoAction, PushAction, NoAction. I think that is enough to handle this issue

If we want to go this route, we can have
bool onRedirect(BuildContext context, GoRouterState state, GoRouter router) {
  // return true if redirect is handled
}

the push or go can be done directly in the callback.

If this is implemented, will it be a replacement for the current redirect, or a new function entirely?

It should be a new function.

I am also staying on top of this feature and would like to know if there is any update.

Any news on this functionality or workaround?

sorry I was on vacation. This issue is still under my radar

If so, then why we need the boolean? Shouldn't GoRouter be smart enough to detect if a .go or .push was called?

I think GoRouter can be smart enough to catch most cases by checking route match list changes, but there may be corner cases. e.g. the route history doesn't change after a series of push/pop. Even worse, some people may think this case should be considered redirect handled, while some people think otherwise.
We may even have cases where people want to mark it handled without doing any actual redirect.

I believe the void redirect(context, state, router) is simpler to understand.
We would simply use the same API we already use to navigate. No extra booleans, "stopProgating" or other complicated API.
Why not start simple and just explain those edge cases?
Starting simple would already cover most cases:

can't choose between push/go
can't set extra.
simpler api

Otherwise this discussion will never ends.

Can we also consider the importance of seeing the requested route's navigation method (push, go, ....)
For example, the requested route must be navigated by the go method. But the route guard (login) will be pushed.
Knowing the navigation methods will allow us to continue the previously requested navigation scheme.

I wrote a design doc. Let me know what you think
http://flutter.dev/go/go-router-redirect

@chunhtai It looks good.
I would choose 2.1. Alternative 1: imperative builder API [currently preferred]
because I don't like SplashBuilder.of(context).builder = splashBuilder; in 2.2

I love the idea of having a list of Guards! The addition of currentState and nextState is also a great feature.
The splash seems something too manual, can't we have a loadingBuilder in the GoRoute to show while all Guards are resolving?
About onEnter/onExit:
The current onExit api has a canExit boolean that we need to return. Since this is already implemented, maybe we can keep the same idea of it by also using a canEnter boolean in replacement of the Resolution.next.
I agree with you, onExit and onEnter could be unified like you suggested at the end (as long as they have the same api). Fewer breaking changes by doing this altogether.
One doubt. What happens if you return Resolution.stop without navigating at all? Will you stay in the previous route or is it an error?
Great work as always @chunhtai. Thanks.

@chunhtai will this solution allow us to go and push from the redirect?
In my case I have a deeplink that goes to a page that's always pushed. But depending on the page the user is now, I don't want to push it, I need to first go to a particular page (a StatefulShellRoute), and then push (so the new page covers the bottom navigation bar inside the StatefulShellRoute as well).
I imagine I could craft some logic inside the go, to add some extra queryParameter and then redirect again with a push, but this is more cumbersome.

Any updates on this one?

@chunhtai regarding your design document, have you converged towards the final design ? It seems like it would solve a lot of issues mentioned.
Are there plans to implement this soon or is this something that's not planned ?

I have the same request


Creating roles fails with 'policy has a statement with no principals'

On applying this module to my AWS account I get the following error:
aws_iam_role.readonly[0]: Creating...
aws_iam_role.admin[0]: Creating...
aws_iam_role.poweruser[0]: Creating...
aws_iam_role.readonly[0]: Still creating... [10s elapsed]
aws_iam_role.admin[0]: Still creating... [10s elapsed]
aws_iam_role.poweruser[0]: Still creating... [10s elapsed]
aws_iam_role.readonly[0]: Still creating... [20s elapsed]
aws_iam_role.admin[0]: Still creating... [20s elapsed]
aws_iam_role.poweruser[0]: Still creating... [20s elapsed]
aws_iam_role.readonly[0]: Still creating... [30s elapsed]
aws_iam_role.admin[0]: Still creating... [30s elapsed]
aws_iam_role.poweruser[0]: Still creating... [30s elapsed]

Error: Error creating IAM Role admin: MalformedPolicyDocument: Invalid principal in policy: com.amazon.balsa.error.InvalidPolicyException: The passed in policy has a statement with no principals!
        status code: 400, request id: 006f33b5-1312-45f2-bc52-7b0d9316191b

  on main.tf line 50, in resource "aws_iam_role" "admin":
  50: resource "aws_iam_role" "admin" {

Error: Error creating IAM Role poweruser: MalformedPolicyDocument: Invalid principal in policy: com.amazon.balsa.error.InvalidPolicyException: The passed in policy has a statement with no principals!
        status code: 400, request id: d404d36c-dfc6-4e7a-be79-99c620e174d2

  on main.tf line 72, in resource "aws_iam_role" "poweruser":
  72: resource "aws_iam_role" "poweruser" {

Error: Error creating IAM Role readonly: MalformedPolicyDocument: Invalid principal in policy: com.amazon.balsa.error.InvalidPolicyException: The passed in policy has a statement with no principals!
        status code: 400, request id: 5da1414f-f349-43b5-bba2-f91c90e57942

  on main.tf line 94, in resource "aws_iam_role" "readonly":
  94: resource "aws_iam_role" "readonly" {

I have a very simple setup:
module "base_roles" {
  source = source = "git::https://github.com/terraform-aws-modules/terraform-aws-iam//modules/iam-assumable-roles?ref=v2.4.0"

  create_admin_role     = true
  create_poweruser_role = true
  create_readonly_role  = true
}

You need to specify the trusted_role_arns
module "base_roles" {
  source = source = "git::https://github.com/terraform-aws-modules/terraform-aws-iam//modules/iam-assumable-roles?ref=v2.4.0"

  create_admin_role     = true
  create_poweruser_role = true
  create_readonly_role  = true

  trusted_role_arns = [
    "arn:aws:iam::307990089504:root",
    "arn:aws:iam::835367859851:user/anton",
  ]
}

@antonbabenko I think this module readme updated, correct me if I am wrong, maybe I did not understand. But I got this error as well but once I put the "trusted_role_arns" input, it works fine. In readme, on the columns, it says that this input is not required. So maybe it should be set to required?

@sanjars You are right, trusted_role_arns is indeed required when role is being created (eg, create_readonly_role = true, or similar). There is no easy way to make that variable required in some conditions. Either required or optional. By default, it is optional.
There is not much we can do.
Closing this issue.


Change the rbg format to hexa or RRGGBBAA??

Jamongusxd
the title says everything

SFML actually does support hexadecimal notation. I'll look into adding this as an alternative option, though RGB will still be the default notation used.

I'm not sure if I'll add this. After some thought I do quite prefer the RGBA format that is used throughout. Using hex or RRGGBBAA seems pointless to me and only makes things harder to read in the config.
This is still something I'll 100% keep in mind, but for now I'm closing this issue.


Hope to join openAOD

Thank you

Hey @perseus6  !!
Welcome to openAOD! I have sent an invite to join our organization. We also recommend joining our Discord server : https://discord.gg/wZ83xSJSsN. If you have any questions regarding contributing or anything else feel free to write here or ping me on Discord. Cheers. Have a great day ahead of you!


Update app-objects-and-service-principals.md

'Security Principal' contains users (user principal) and applications (service principal).

@hochun836 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@hochun836  Thanks for the contribution.  You're right that security principal covers both service principal and user principal.
The section really only deals with service principal objects, though, so I don't think we should actually change the section title to "Security principal".
The first paragraph mentions user principals, but nothing in the rest of the section deals with user principals.  Did you find that confusing?  I can update that paragraph to make it more clear.

@rwike77 Thanks. If there is more description, I think it will be better.


feat(rust/immutable-ledger): block encoding decoding and validation

As per specification
I expect the exact ergonomics of the validation API part to change in the future as we consume it, but it contains all of the validation logic needed regardless.

@cong-or

I assumed the ledger was going to be written as a contiguous block of memory hence thinking purely in bytes rather than types.

Yea, you are right, from the storage perspective it will be how you described.
BTW, I am going to move this immutable_ledger documentation to this repo, so we will have a direct access to the block.cddl file.
What do you think to have as a part of the from_bytes decoding logic to have a strict validation agains the cddl spec. The same as we did with the cip36 registration data ?
Or maybe just validate it in unit tests, but seems to me we need to have a strict check somewhere that this decoding logic conforms to the original design doc.

@cong-or just created a PR https://github.com/input-output-hk/catalyst-libs/pull/72
Also forget to mention, from the testing perspective I think it make sense to make such decoding tests as property tests,
e.g. https://github.com/input-output-hk/catalyst-libs/blob/874b506728745cc52289155f366f97a018ba3628/rust/catalyst-voting/src/vote_protocol/voter/decoding.rs#L88


ORC-1352: [C++] get rid of ORC_NOEXCEPT/ORC_NULLPTR/ORC_OVERRIDE/ORC_…

What changes were proposed in this pull request?
the following macros could be removed from the main source code to make the code neat.
#define ORC_NOEXCEPT noexcept
#define ORC_NULLPTR nullptr
#define ORC_OVERRIDE override
#define ORC_UNIQUE_PTR std::unique_ptr

These macros should only be keeped in the orc-config.hh.in for backward compatiblity(in case any user use these marcros).
Why are the changes needed?
to make the code more readable.
How was this patch tested?
It doesn't introduce new features and passed all test cases.

Also, cc @williamhyun .


RPC call to RAiLaunchAdminProcess failed

Not sure this is an issue, but when I tested this on a very hardened system, I get an "RPR call to RAiLaunchAdminProcess failed" message.  Any suggestions?

Hi, may you give me more details about what do you mean with "a very hardened system"?
Is the user running the  tool member of the Administrator group?
Is the UAC policy set to "Always notify"?


Implement Tarallo.move method

Here's a quick and dirty Python script we made a few days ago to bulk move some items (place numbers in a text file, automatically prepend prefix, move them all to the same place), it may be useful for some stuff:
#!/usr/bin/env python3

import requests
import getpass

rambox = '"RamBox"'

pw = getpass.getpass()

t = requests.Session()
result = t.post("https://<IP_ADDRESS>:8080/v1/session", headers={"Content-Type": "application/json"}, json={"username": "asd", "password": pw})
print(f"Login: {str(result.status_code)}")

with open("ram.txt") as f:
    for line in f:
        code = 'R' + line.strip()
        result = t.put(f"https://tarallo.weeeopen.it/v1/items/{code}/parent", headers={"Content-Type": "application/json"}, data=rambox)
        print(f"Moving {code}: {str(result.status_code)}")


ioctl(0,TIOCSTI,"...") fails w/ ENOTTY

A brief description

I use ioctl() function with TIOCSTI to send commands to terminal in C. In particular it's used
by an utility improving use of history in Bash - https://github.com/dvorka/hstr

Expected results

Command - ioctl() 3rd parameter content - should be passed to terminal's stdin.

Actual results (with terminal output if applicable)

I get error (-1) from ioctl() and errno (25) set to ENOTTY.

Your Windows build number

14393.953

Steps / All commands required to reproduce the error from a brand new installation

Save C source code below as test.c (I intentionally left commented various devices I tried):
#include <stdio.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
  //int fd = 0;
  //int fd = open("/dev/pts/0", O_WRONLY);
  //int fd = open("/dev/tty1", O_WRONLY|O_NONBLOCK);
  //int fd = open("/dev/stdin", O_WRONLY|O_NONBLOCK);

 int a,c;
 for (a=1, c=0; a< argc; c=0 ) {
    while(argv[a][c]) {
        int error=ioctl(0, TIOCSTI, &argv[a][c++]);
        if(error) {
          printf("%d >>> %d\n",error,errno);
        }
    }
    if (++a < argc) {
      ioctl(0, TIOCSTI," ");
    }
  }

  //close(fd);
  return 0;
}

Compile it:
gcc -o test test.c

Run it:
./test ls

Strace of the failing command

Program doesn't fail - instead of printing command to terminal it does nothing - reports error described above:
-1 >>> 25
-1 >>> 25

Hi @dvorka -- I haven't had a chance to try this myself yet, but I would be curious whether this is fixed in the recently-released Creators update (build 15063).  I know a lot of other console (and other) issues have been fixed in the update.
You can download the update here:
https://www.microsoft.com/en-us/software-download/windows10ISO
Alternatively, it will supposedly be released via Windows Update next Tuesday.

This one hasn't come up before. I thought that ioctl had been abandoned decades ago. Best I can tell there isn't even an LTP test case for it. So props for providing one. Anyway, strace on 15063 below for the pedantry of it; though it just shows exactly what the OP was saying.
open("/dev/tty1", O_WRONLY|O_NONBLOCK)  = 3
ioctl(0, TIOCSTI, "l")                  = -1 ENOTTY (Inappropriate ioctl for device)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
brk(NULL)                               = 0xfc1000
brk(0xfe2000)                           = 0xfe2000
write(1, "-1 >>> 25\n", 10)             = 10
ioctl(0, TIOCSTI, "s")                  = -1 ENOTTY (Inappropriate ioctl for device)
write(1, "-1 >>> 25\n", 10)             = 10
exit_group(0)                           = ?

Works on Real Linux, natch.

Thank you  @therealkenc for adding strace!
Ad ioctl: true, however, IMO its use is mainly discouraged for new user/kernel space calls (simplest way, but obviously difficult to maintain) - specific protocols to be written instead (and used IF exist). AFAIK there is no other way/protocol to do what I need. If there is a better and portable solution - passing input to terminal - please let me know and I will be happy to use it.. I just need hstr to work across Linux distributions (+MacOS and +Cygwin)... and add Bash@Windows. Bash@Windows specific solution would help as well (conditional compilation).

@aseering thank you for quick response! Ad console fixes - it's a great news. I will let you know as soon as I do the test.

@dvorka -  My strace above is on Creators (aka 15063) so unfortunately you won't find joy on this specific issue there. I thought for five minutes about a "better and portable solution" when I wrote that abandoned quip, and should have conceded I don't have one. No solution that doesn't resort to extreme measures, anyway, and even then I'd be hand-waving. You've obviously put considerable thought into the problem. The WSL guys will have to look to see what it will take to add support for TIOCSTI. Maybe it won't be too bad. At least you've put it on the books, and that's great. Clever package, by the way.

@therealkenc thank you for testing it on Creators, your comments and thinking about a workaround!

For anybody who might be interested - you may find workaround for ioctl()/TIOCSTI in https://github.com/dvorka/hstr/issues/186.

Any update for this issue?

????? we need this urgent

@Brian-Perkins oh my god thank you so much, I was almost with no hope :-)

So this is not working in
Linux DESKTOP-OSK7EIM 4.4.0-17763-Microsoft #1-Microsoft Fri Sep 14 14:34:00 PST 2018 x86_64 GNU/Linux

So this is not working in ... 17763

This got a 'fixedininsiders' tag in 17713 ( < 17763) so be best to spawn a new issue# with the specifics; notably a do-over of the test case in the OP with /dev/ttyS? (if that is what you are doing).  Whatever was deemed fixed here shipped in 1809 aka 17763, so we'll call whatever you are experiencing "new".

I use https://github.com/junegunn/fzf to complete bash history and files/folders etc.., much better


Bug!!!make: *** No rule to make target `CarlaUE4Editor'.  Stop.

I am currently build it on MacOS and CentOS. Everything is good now after I tackled the dependency and Unreal app problems. But one last thing prevent me from proceeding:
Rebuld.sh ends with
running rule <build_linux> ...
[18/18] Linking CXX executable CarlaServer/test_carlaserver
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libboost_system.a
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libprotobuf.a
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla/carla_server.h
-- Installing: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libcarlaserver.a
-- Installing: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/bin/test_carlaserver
<build_linux> successful!
Cleaning up CARLA Plugin...
Cleaning up CARLAUE4...
Generate Unreal project files...
GenerateLLDBInit.sh ...
GenerateProjectFiles.sh /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/CarlaUE4.uproject

Setting up Unreal Engine 4 project files...

GenerateProjectFiles ERROR: It looks like youre missing some files that are required in order to generate projects.  Please check that youve downloaded and unpacked the engine source code, binaries, content and third-party dependencies before running this script.

I am sure my UE4 engine works well because I can create demo project and download Assets.

There is no Makefile in Unreal/CarlaUE4. And make will throw bugs below

$UE4Editor $PWD/CarlaUE4.uproject
# lack two .dylib files I think it might be compiled to .so so that MacOS users cannot use it
# then I proceed to Unreal/CarlaUE4 to try to modify Makefile
# but there is no Makefile and make simply throws an error
# make: *** No rule to make target `CarlaUE4Editor'.  Stop.

Where is the "makefile" in the folder?

Hi @yiakwy, "Rebuild.sh" is meant for Linux, we don't have support for MacOS or CentOS.
Compiling for MacOS is most probably possible, however you'll have to do some manual work. Please check the instruction to build Unreal Engine from source.

Hello@nsubiron, thanks for your reply. I did compiled Unreal Engine from source and I can run it from Xcode.  I think that there should be a Makefile inside Unreal/Carla. I can generate xcode projects file, does it mean that I can build it inside xcode? I can specify Makefile dependency inside Xcode project.
(1) So the first question, could you show me what the Makefile for Unreal/Carla looks like? Which program generates it?
I got an error threw Source/Carla/SeceneCaptureCamera.cpp Line 27
static constexpr auto DEPTH_MAT_PATH =
#if PLATFORM_LINUX
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'");
#elif PLATFORM_WINDOWS
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'");
#else
#  error No depth material defined for this platform //Line 27
#endif

And another error from the same file, Line 30
static constexpr auto SEMANTIC_SEGMENTATION_MAT_PATH =
    TEXT("Material'/Carla/PostProcessingMaterials/GTMaterial.GTMaterial'");

xcode complains that "Expected expression" at the first token "static".
Could you give me any suggestion to tackle those problems?

Hi,
The Makefile is generated by Unreal Build Tool and it is specific for Linux, in Windows for instance it uses Visual Studio instead of Makefiles. In MacOS I think you build from Xcode, but I have never tried.
And regarding the error, we put it this way because the depth map shader is dependent on the graphics API and we have never tested it in MacOS. You can use one of the two and test, just replace those lines by
static constexpr auto DEPTH_MAT_PATH =
#if PLATFORM_LINUX
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'");
#else
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'");
#endif

@nsubiron that works for moment. And change the default clang c++ gramma to c++1z. errors eliminated.
I didn't build<EMAIL_ADDRESS>locally and use MacOS "brew" to install<EMAIL_ADDRESS>followed by making soft links to clang  at /usr/local/bin.
However, I checked brew formula that macOS<EMAIL_ADDRESS>didn't ship libc++abi component hence I don't have libc++abi.a which stops compilation.
For example in my install_boost_locally_macos.sh (I will source it within Setup.sh), I have
pushd boost-source >/dev/null

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>PY_SYS_PREFIX=$(python-config --exec-prefix)
PYFLAGS="-I${PY_SYS_PREFIX}/include/python3.6m"
LDPYLIB="-L${PY_SYS_PREFIX}/lib"
export PATH="/usr/local/opt/llvm@3.9/bin:$PATH"

BOOST_TOOLSET="clang-3.9"
BOOST_CFLAGS="-fPIC -std=c++1z -stdlib=libc++ ${CPPFLAGS} ${PYFLAGS}"
BOOST_LFLAGS="-stdlib=libc++ ${LDFLAGS} ${LDPYLIB}"

./bootstrap.sh --with-toolset=clang --prefix=../boost-install
./b2 clean
./b2 toolset="${BOOST_TOOLSET}" cxxflags="${BOOST_CFLAGS}" linkflags="${BOOST_LFLAGS}" --prefix="../boost-install" -j 4 stage release
./b2 install toolset="${BOOST_TOOLSET}" cxxflags="${BOOST_CFLAGS}" linkflags="${BOOST_LFLAGS}" --prefix="../boost-install"

It works fine (I am boost users, and I am sure it works well with brew llvm). And I did the similar things for all other dependencies. They all are built locally and look good.
I have following libraries inside plugins
(Py3) ➜  CarlaUE4 git:(master) ✗ ls Plugins/Carla/CarlaServer/lib/
libboost_system.a libcarlaserver.a  libcarlaserverd.a libprotobuf.a

Now Xcode complains that
Showing Recent Issues
clang: error: no such file or directory: '/Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libc++abi.a'

Why libc++abi.a is needed? Is there any workarround

I'm not 100% sure that c++abi is needed, you can try removing it from the Carla plugin dependencies, and see if it compiles without link errors. Just remove the line 111 in the "Carla.Build.cs" file
https://github.com/carla-simulator/carla/blob/9855fe35f9691a4e9346f6a4525de08777c9cbf9/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs#L111
This file sets up the all the dependencies of the Carla plugin and it's used by the Unreal Build Tool to generate and compile the project.

@nsubiron  Build successfully! Even though the editor emit warning. "Mesh" are found. Another suggestion is, we can build Unity separately and build Carla afterward. Hence argument "-engine" is not needed.

The "-engine" argument is there mostly because is the recommended way of building in the Unreal documentation for Linux. Since "make" makes sure only out-of-date files are recompile the engine builds only once. Plus it might come handy when you need to rebuild the engine sources; from time to time after some Linux upgrade you get this nasty error
fatal error: file '/usr/include/linux/version.h' has been modified since the precompiled header '..../SharedPCH.Engine.h.gch' was built

then you need to recompile also engine files, you can easily do it with
$ make CarlaUE4Editor ARGS=-clean
$ make CarlaUE4Editor

takes a lot of time but as far as I know it's necessary.

Get it! Thank you @nsubiron .


please do not hardcode path to awk

please do not hardcode path to awk.
got this message from initial install:
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 128: /usr/bin/awk: No such file or directory

i pressed ctrl+c because did not know how critical that awk error was.
also i suggest to abort whole script on any error (set -e) not to cause bigger damage if some script failed.
remember bumblebee rm -rf / usr?
full log:
➔ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
==> Select the Linuxbrew installation directory
- Enter your password to install to /home/linuxbrew/.linuxbrew (recommended)
- Press Control-D to install to /home/glen/.linuxbrew
- Press Control-C to cancel installation
[sudo] password for glen:
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/glen/.cache/Homebrew/
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/chown glen:glen /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chmod 755 /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chown glen /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chgrp glen /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /home/glen/.cache/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /home/glen/.cache/Homebrew
==> /usr/bin/sudo /bin/chown glen /home/glen/.cache/Homebrew
==> /usr/bin/sudo /bin/chgrp glen /home/glen/.cache/Homebrew
==> Downloading and installing Linuxbrew...
remote: Counting objects: 4901, done.
remote: Compressing objects: 100% (2795/2795), done.
remote: Total 4901 (delta 2883), reused 3289 (delta 1978), pack-reused 0
Receiving objects: 100% (4901/4901), 2.42 MiB | 692.00 KiB/s, done.
Resolving deltas: 100% (2883/2883), done.
From https://github.com/Linuxbrew/brew
 * [new branch]      master     -> origin/master
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.0.2      -> 1.0.2
 * [new tag]         1.0.3      -> 1.0.3
 * [new tag]         1.0.4      -> 1.0.4
 * [new tag]         1.0.5      -> 1.0.5
 * [new tag]         1.0.6      -> 1.0.6
 * [new tag]         1.0.7      -> 1.0.7
 * [new tag]         1.0.8      -> 1.0.8
 * [new tag]         1.0.9      -> 1.0.9
 * [new tag]         1.1.0      -> 1.1.0
 * [new tag]         <IP_ADDRESS>    -> <IP_ADDRESS>
 * [new tag]         1.1.1      -> 1.1.1
 * [new tag]         1.1.10     -> 1.1.10
 * [new tag]         1.1.11     -> 1.1.11
 * [new tag]         1.1.12     -> 1.1.12
 * [new tag]         1.1.13     -> 1.1.13
 * [new tag]         1.1.2      -> 1.1.2
 * [new tag]         <IP_ADDRESS>    -> <IP_ADDRESS>
 * [new tag]         1.1.3      -> 1.1.3
 * [new tag]         1.1.4      -> 1.1.4
 * [new tag]         1.1.5      -> 1.1.5
 * [new tag]         1.1.6      -> 1.1.6
 * [new tag]         1.1.7      -> 1.1.7
 * [new tag]         1.1.8      -> 1.1.8
 * [new tag]         1.1.9      -> 1.1.9
 * [new tag]         1.2.0      -> 1.2.0
 * [new tag]         1.2.1      -> 1.2.1
 * [new tag]         1.2.2      -> 1.2.2
HEAD is now at bb58824 Add Michka Popoff to the maintainers list for Linuxbrew (#413)
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 128: /usr/bin/awk: No such file or directory
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 128: /usr/bin/awk: No such file or directory
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 128: /usr/bin/awk: No such file or directory
==> Tapping homebrew/core
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4483, done.
remote: Compressing objects: 100% (4286/4286), done.
remote: Total 4483 (delta 33), reused 446 (delta 11), pack-reused 0
Receiving objects: 100% (4483/4483), 3.63 MiB | 843.00 KiB/s, done.
Resolving deltas: 100% (33/33), done.
Tapped 4280 formulae (4,516 files, 11.3MB)

^C

-e:81:in `system': Interrupt
        from -e:81:in `system'
        from -e:376:in `block in <main>'
        from -e:355:in `chdir'
        from -e:355:in `<main>'

Where is awk on your system? Please report which -a awk
A pull request would be welcome. You can edit this file
https://github.com/Linuxbrew/brew/blob/master/Library/Homebrew/brew.sh#L128
and replace /usr/bin/awk with awk

also i suggest to abort whole script on any error (set -e) not to cause bigger damage if some script failed.

That's a good suggestion as well. Please open a pull request if you're so inclined. If you also use Homebrew on macOS, you may consider opening this PR there instead. Homebrew is merged into Linuxbrew with every stable release. Do not open the awk PR there; it's by design that they hard-code the path to /usr/bin/awk on macOS.

Fixed by https://github.com/Linuxbrew/brew/pull/417

#417 is not merged yet, so not really fixed.

Issue #416 will be fixed by PR #417, which is waiting on your response.

please read it carefully, the answer where is my awk is given on the day one!