Fix #126 improve error messages including classname when possible

Added ViolationDescription, as input for a Violation
Added a description to the ViolationDescription

Only for Expressions where it made sense

I was trying out Arkitect, and it looks like a great tool :smile:. The php config is great, so much better than Yaml.
I bumped into these messages not being quite as descriptive as I'd like. So I picked up this issue.
Let me know if this is something you'd like to merge and if anything needs to be changed :+1:

Hi @annervisser, thanks for this PR.
Before starting the review, can you please fix the coding standards 😄?
Thanks.

@AlessandroMinoccheri done!

reverted the rename of Description -> ExpressionDescription
moved ViolationDescription from Arkitect\Expression -> Arkitect\Rules (to be next to Violation)
renamed ViolationDescription to ViolationMessage to avoid duplicating the term description in classname and method

Thank you @annervisser for your PR! I think that is absolutely necessary to explicit which dependency is raising the error.
I am not sure about the wording:

App\Domain\Model violates rules
depends on App\Services\UserService, but should not depend on classes outside namespace App\Domain because we want protect our domain (on line 14)

It seems that "depends on..." is part of the rule, but it's the opposite, it's the violation :thinking:
Maybe we could write something like this? Other ideas?

App\Domain\Model violates rules
should not depend on classes outside namespace App\Domain because we want protect our domain (it depends on App\Services\UserService on line 14)

@fain182 I agree the wording is a bit weird right now.
I would be okay with your suggestion of putting it at the end with the line number
An alternative would be to change the wording to make it clear that they're violations (change <fqcn> violates rules to for example <fqcn>  has <n> violations
Maybe we could even group the messages per violation? like this: (though this is probably out of scope for this PR)
App\Domain\Model has 2 violations:
  rule: should not depend on classes outside namespace App\Domain because we want protect our domain
    - depends on App\Services\UserService (on line 14)
    - depends on App\Services\OtherService (on line 26)

As you said the current wording implies we're outputting rules, despite actually outputting violations. Currently this is already noticeable through the fact that a rule can be listed multiple times per file (when a rule has multiple violations)
What do you think?
My suggestion would be to change the wording to make it clear we're listing violations rather than rules, and follow up in a future PR to group violations per rule

I agree with your idea @annervisser, we are showing violations, not rules right now  :+1:

@fain182 done in c9b3be0 (#281)

Codecov Report

Merging #281 (6817886) into main (db9c74b) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #281      +/-   ##
============================================
+ Coverage     93.62%   93.73%   +0.11%
- Complexity      370      376       +6
============================================
  Files            57       58       +1
  Lines           988     1006      +18
============================================
+ Hits            925      943      +18
  Misses           63       63

Impacted Files
Coverage Δ

...ession/ForClasses/DependsOnlyOnTheseNamespaces.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/DocBlockContains.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/DocBlockNotContains.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/Extend.php
91.66% <100.00%> (ø)

src/Expression/ForClasses/HaveAttribute.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/HaveNameMatching.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/Implement.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/IsAbstract.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/IsFinal.php
100.00% <100.00%> (ø)

src/Expression/ForClasses/IsNotAbstract.php
100.00% <100.00%> (ø)

... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Add option to choose whether requirejs is used or not

I'll admit this is a bit of an edge case:
We have a JavaScript library which we're loading on our clients sites. We don't control our clients sites, but do control ours (of course).
We recently added loglevel to our library to help with diagnosing issues, and found that it works great (thx!), except on one client who uses RequireJS. Our workaround was to therefore strip out the bit of loglevel that adds requirejs, amd and so forth. Our log level now starts:
!function(a,b){a.log=b()}(this ....

Instead of:
 !function(a,b){"object"==typeof module&&module.exports&&"function"==typeof require?module.exports=b():"function"==typeof define&&"object"==typeof define.amd?define(b):a.log=b()}(this ....

It would therefore be useful for us to disable the "load via RequireJS/AMD/etc" feature (in favour of loading 'normally') via a flag or something. Open to suggestions!
Thanks!

Interesting, ok. I do think this is a bit of a strange case, so I'm not too keen to support it directly. There should be a few different things you can do to handle it yourself though:

Use loglevel within require. Add it as a dep to the relevant code, or put in new blocks depending on it where necessary. This is definitely the 'right' way of doing it, if you can.

require(['./path/to/loglevel.js', function (log) {
   log.warn("hi");
});

Use require to make Loglevel global. Bit messy (nicer to just use loglevel with require directly), but quick and effective. Does have some async gotchas that you'll have to watch out for (log won't be available immediately, until the indeterminate time when RequireJS is finished loading it and setting it up.

require(['./path/to/loglevel.js', function (log) {
  window.log = log;
});

Disable Require briefly when loading loglevel, either with the below, or by just putting the script tag for loglevel above the script tag for RequireJS.

<script>
window.disabledDefine = define;
window.define = undefined;
</script>
<script src="/path/to/loglevel.js"></script>
<script>
window.define = disabledDefine;
</script>

Does that help at all?

Interesting ideas. Totally agree this is an edge case, but good to have some ideas to think about.
Here's some thoughts:

Agree this is the correct way, but only one of our N clients uses require. We'd have to have something in our code saying if require do x, if amd do y, if neither do z. So it's slightly more complicated, but probably the correct way for us to do it.

We're actually using it in noConflict mode (we're creating one Global and everything we add to our clients resides within that, including the logging), but I like this is a potential alternative. I might give this one a try as it's the simplest for our use case.

We can't change the order of the scripts, because our client will decide that. But it's interesting to think of disabling it temporarily. This feels like quite a nice backup plan if 2 doesn't work.

Thank you for the ideas, I'm happy for you to close this if you're unlikely to support it.

Closing this; I don't think I want to support this directly. If you do find a nice way to do this, either externally or in a small clean way within loglevel I'd be interested to hear it, but otherwise I'm going to leave this be for now. Thanks for raising it though, definitely an interesting point.


GNY-237 Add SDK support for cert issuer, domain registrar

Description
https://qadium.atlassian.net/browse/GNY-237
Added SDK support for cert issuer, domain registrar
Motivation and Context
Flesh out the SDK
How Has This Been Tested?
Running the SDK locally.
New tests using pytest-vcr
Types of changes

New feature (non-breaking change which adds functionality)

Checklist

[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes if appropriate.
[ ] All new and existing tests passed.

@cachukwu looks like the black command step failed - you can run black xpanse/api/assets/__init__.py (the file that's failing) to fix ti
the check in our PR check runs black --check xpanse/, which only checks files. The above command will actually fix the issue.


jakttest: Make sure selfhost binary is being built if not

run-all.sh script doesn't check for if selfhost binary is
already built when comparing if it is updated or not. This
results with tests failing without ever using the selfhosted
binary. Building selfhost before running the tests fixes
the issue.

LGTM, good catch ;). Maybe a better name for the commit would be Build selfhost if binary does not exist.

Yeah, yours is much clear to understand. I would change the title but I'm new to git to do complicated changes.

To change the previous commit's title and message, you use git commit --amend. Then when you're done, git push --force to replace the existing commit here. :^)

Thanks @AtkinsSJ :)

You're welcome!


Incorrect offset of children's children when using addElement in a BlockParser eager parser

Here is a representative example of my eager parser (BlockParser['parser']) code:
/** Returns a `MarkdownConfig` extension that adds a line-start based syntax using the given string.
 *  @example const ext = line('#', 'Heading1') */
function line(str: string, name: string, { interrupt, consume }: LineOpts): MarkdownConfig {

  const mark = name + 'Mark'
  const chars = toPoints(str)

  const parse = (cx: BlockContext, line: Line) => {
    if (matches(chars, line.pos, line)) {
      const start = cx.lineStart + line.pos
      const len = chars.length
      const offset = start + len

      // starting marker (e.g. '//' in a line comment)
      const children = [cx.elt(mark, start, offset)]
      if (!consume) children.push(...cx.parseInline(line.text.slice(len), offset))

      cx.nextLine()
      cx.addElement(cx.elt(name, start, cx.prevLineEnd(), children))

      return true
    }
    return false
  }

  return {
    defineNodes: [{ name, block: true }, mark],
    parseBlock: [{
      name,
      parse,
      endLeaf: !interrupt ? undefined : (_, line) => matches(chars, line.pos, line),
      before: 'Blockquote'
    }]
  }
}

The intention of this code is to generically support 'line' syntax, like ATX headings or JS line comments.
The way this malfunctions is as following:
// this is added as an extension
const ext = line('//', 'LineComment', { interrupt: true })

// given the following input (truncated):
/*
Markdown Test Page
***
// `inline code`
*/

// I get this in the tree:
/*
└─ Document [0..22192]
   ├─ Paragraph [0..18]: 'Markdown Test Page'
   ├─ HorizontalRule [19..22]: '***'
   ├─ LineComment [23..39]
   │  ├─ LineCommentMark [23..25]: '//'
   │  └─ InlineCode [26..39]
   │     ├─ CodeMark [75..76]: 'i'
   │     └─ CodeMark [87..88]: ''
*/

As you can probably see, the 'children's children' have incorrect offsets. I've done some poking around, and while I'm still not sure why this is happening, I am fairly confident that the issue is not within the cx.inlineParse function.

This is console.log(children). To me, everything seems correct here - I think the issue is with addElement.

if (!consume) children.push(...cx.parseInline(line.text.slice(len), offset))

That seems like it should be slice(line.pos + len).
But that doesn't seem to be the issue here—I was able to reproduce this, and attached patch should help.

That seems like it should be slice(line.pos + len).
But that doesn't seem to be the issue here—I was able to reproduce this, and attached patch should help.

Thank you, nice catch.


Adding a Uniform Format Function

As you may know, machineid is often used to generate globally unique serial numbers such as order number, flow number, transaction version number. Therefore, it would be helpful to have a standardized format for the output, and the hashed_id you provide may not suit many scenarios. I think the uuid format is a good option, and I have written a demo for you.You can amend the code according to your preferences and requirements.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

This PR is pretty hard to review since you've reformatted the entire code base. But regardless, I think this falls into preference territory, so I don't think it makes sense to include another format. The raw ID and hashed ID give you the bytes needed to do this custom format yourself.

This PR is pretty hard to review since you've reformatted the entire code base. But regardless, I think this falls into preference territory, so I don't think it makes sense to include another format. The raw ID and hashed ID give you the bytes needed to do this custom format yourself.

@ezekg I think it's still important to add a uuid format, as a reply on StackOverFlow said

Machine id has a more standardised format - see RFC4122.

The text can be found at https://stackoverflow.com/a/63148464/22123364
As for the formatting, I can resubmit a non-reformatted PR if you like.
Thanks for your support and understanding!

Aren't all of these IDs already GUIDs? For example, macOS's IOPlatformUUID is a UUID; Window's device IDs, e.g. MachineGuid and Win32_ComputerSystemProduct.UUID, are UUIDs; Linux's /etc/machine-id is a UUID, OpenBSD's smbios.system.uuid is a UUID. What is the purpose of re-encoding these as a GUID when they already are? The only exception here would be the Docker container IDs, which seem to be SHA digests.
Like I said before, I just don't see this as a wide enough problem to make it a core part of this library.

Aren't all of these IDs already GUIDs? For example, macOS's IOPlatformUUID is a UUID; Window's device IDs, e.g. MachineGuid and Win32_ComputerSystemProduct.UUID, are UUIDs; Linux's /etc/machine-id is a UUID, OpenBSD's smbios.system.uuid is a UUID. What is the purpose of re-encoding these as a GUID when they already are? The only exception here would be the Docker container IDs, which seem to be SHA digests.
Like I said before, I just don't see this as a wide enough problem to make it a core part of this library.

@ezekg My source for this PR is that on my Ubuntu system, I receive the following output when utilizing this library. I am curious as to whether you can repro it.
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import machineid
>>> machineid.id()
'e8e117f5633f4017850ff73ff65ce223\n'

Ah, you're right. I was running in a WSL subsystem so my machine ID showed up as my Window's machine ID.
Just tried it in a Linux container and got the following:
import machineid
print(machineid.id())
# => 8f849e001c660d01914728f8bd46a0546143af30521b5a2ed0ae96a199fb4534

Regardless, I still don't think adding this makes sense. It's easy enough to do outside of this library, as needed. To me, it seems like a rather niche use-case and I don't want to complicate this library if it's not required for the majority use-case.

Ah, you're right. I was running in a WSL subsystem so my machine ID showed up as my Window's machine ID.
Just tried it in a Linux container and got the following:
import machineid
print(machineid.id())
# => 8f849e001c660d01914728f8bd46a0546143af30521b5a2ed0ae96a199fb4534

Regardless, I still don't think adding this makes sense. It's easy enough to do outside of this library, as needed. To me, it seems like a rather niche use-case and I don't want to complicate this library if it's not required for the majority use-case.

Thank you for your response. I comprehend your perspective, but I maintain that it is logical to include this feature. This feature would simplify the process of obtaining the formalised machine ID for users, eliminating the need for additional code to be written by them. This requirement is not niche, but rather a frequent occurrence, for example, in determining distinct nodes in a decentralised system. I do not believe this feature will complicate the library since it is merely an optional parameter that does not impact the customary use of other features. I would appreciate it if you would reconsider my proposal. Thank you.

I don't see how using machineid.id() or machineid.hashed_id() would not already accomplish those requirements,. There's nothing in those requirements that requires the UUID format. In most systems, a fingerprint is an opaque, reproducible string.
Why specifically do you need a UUID format? Why not a SHA digest? Why not an opaque string?


The ConnectorError cached plan must not change result type periodically appears (Postgres).

Bug description
I've got several test suites for the graphql API (built with ApolloServer & Prisma).
The tests basically run some queries against the API endpoint with the apollo client. They are standalone (imitate user queries to the API). API uses a dev database (local Postgres docker container) and a locally running server.
An error occurs periodically, I can run 1 test file a few times and it passes, then this error occurs, after that again the tests pass.
console.error src/tests/utils/ErrorLog.ts:7
    Exception: {
      errors: [
        {
          message: '\n' +
            'Invalid `prisma.company.create()` invocation:\n' +
            '\n' +
            '\n' +
            '  Error occurred during query execution:\n' +
            'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("0A000"), message: "cached plan must not change result type", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("plancache.c"), line: Some(722), routine: Some("RevalidateCachedQuery") }) }) })',
          locations: [],
          path: [Array]
        }
      ],
      stacktrace: [
        'Error: ',
        'Invalid `prisma.company.create()` invocation:',
        '',
        '',
        '  Error occurred during query execution:',
        'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("0A000"), message: "cached plan must not change result type", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("plancache.c"), line: Some(722), routine: Some("RevalidateCachedQuery") }) }) })',
        '    at new CombinedError (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/errors.ts:90:5)',
        '    at Object.checkResultAndHandleErrors (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/errors.ts:111:11)',
        '    at CheckResultAndHandleErrors.transformResult (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/CheckResultAndHandleErrors.ts:15:12)',
        '    at /Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/transforms.ts:37:45',
        '    at Array.reduce (<anonymous>)',
        '    at applyResultTransforms (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/transforms.ts:35:21)',
        '    at /Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/delegateToSchema.ts:104:12',
        '    at step (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:32:23)',
        '    at Object.next (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:13:53)',
        '    at fulfilled (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:4:58)'
      ]
    }

OR this error occurs if some tests pass in the suite
console.error src/tests/utils/ErrorLog.ts:7
    Exception: {
      errors: [
        {
          message: '\n' +
            'Invalid `prisma.salesDomain.create()` invocation:\n' +
            '\n' +
            '\n' +
            '  Error occurred during query execution:\n' +
            'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("0A000"), message: "cached plan must not change result type", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("plancache.c"), line: Some(722), routine: Some("RevalidateCachedQuery") }) }) })',
          locations: [],
          path: [Array]
        }
      ],
      stacktrace: [
        'Error: ',
        'Invalid `prisma.salesDomain.create()` invocation:',
        '',
        '',
        '  Error occurred during query execution:',
        'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("0A000"), message: "cached plan must not change result type", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("plancache.c"), line: Some(722), routine: Some("RevalidateCachedQuery") }) }) })',
        '    at new CombinedError (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/errors.ts:90:5)',
        '    at Object.checkResultAndHandleErrors (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/errors.ts:111:11)',
        '    at CheckResultAndHandleErrors.transformResult (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/CheckResultAndHandleErrors.ts:15:12)',
        '    at /Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/transforms.ts:37:45',
        '    at Array.reduce (<anonymous>)',
        '    at applyResultTransforms (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/transforms/transforms.ts:35:21)',
        '    at /Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/src/stitching/delegateToSchema.ts:104:12',
        '    at step (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:32:23)',
        '    at Object.next (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:13:53)',
        '    at fulfilled (/Users/jackiejo/main/smidyo/smidyo-monorepo/quoting-portal/api/node_modules/apollo-server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:4:58)'
      ]
    }

Also this periodically appears on postgres log in docker
dev-postgres_postgres_1 | 2021-06-15 14:09:35.072 UTC [35] ERROR: cached plan must not change result type

How to reproduce
Please refer to this repository:
https://github.com/JackieJoo/prisma-error-sample
Expected behavior
No response
Prisma information

Environment & setup

OS: Mac OS
Database: PostgreSQL
Node.js version: v14.15.1

Prisma Version
2.24.1

Similar case reported in private Slack channel: https://prisma.slack.com/archives/GSH2PPNBF/p1623935918001400

I can reproduce this after running the reproduction twice. It doesn't seem to happen if I add &statment_cache_size=0 to the connection string so looks like a bug in the statement cache implementation. Add this to the connection string as a workaround for now.
You need to enable mode using DEBUG=* to see these error logs. I am marking this as confirmed bug.

Is that first error message a follow up error to the query failing or how is this related?

I fixed the order. First query fails with cached plan must not change result type which in turns fails another query because it received null instead of a valid id.

@pantharshit00 OMG thank you for your comment about the &statement_cache_size=0 workaround!
I've been futsin around with trying to get end-to-end tests working in GitHub Actions for two days and been stuck on this issue and this has solved it for me 🙏
We've also seen this error here and there when we have the API running and do a yarn prisma migrate reset. In our CI environment we were getting this error 100% of the time.  I'm not sure what Prisma can do to fix this at runtime, but would love to see it resolved for good!
In the off-chance I can help another poor wondering soul, here's a bit of information on my situation.
Prisma Migration
We have a table called "FormPrototype" and it has a column that is an enum called "status". We have quite a few prisma generated migration files now and one of them has the following:
Note: this was generated when we removed a status from the enum
-- AlterEnum
BEGIN;
CREATE TYPE "FormPrototypeStatus_new" AS ENUM ('DRAFT', 'ACTIVE', 'ARCHIVED');
ALTER TABLE "FormPrototype" ALTER COLUMN "status" DROP DEFAULT;
ALTER TABLE "FormPrototype" ALTER COLUMN "status" TYPE "FormPrototypeStatus_new" USING ("status"::text::"FormPrototypeStatus_new");
ALTER TYPE "FormPrototypeStatus" RENAME TO "FormPrototypeStatus_old";
ALTER TYPE "FormPrototypeStatus_new" RENAME TO "FormPrototypeStatus";
DROP TYPE "FormPrototypeStatus_old";
ALTER TABLE "FormPrototype" ALTER COLUMN "status" SET DEFAULT 'DRAFT';
COMMIT;

Postgres Error
I believe that migration code in collaboration with how Postgres does caching is the cause for the following error that I was getting from the postgres container logs in my CI environment:
2022-04-18 07:06:21.482 UTC [1] LOG:  database system is ready to accept connections
 2022-04-18 07:08:56.418 UTC [74] ERROR:  cache lookup failed for type 17062
 2022-04-18 07:08:56.418 UTC [74] STATEMENT:  SELECT "public"."FormPrototype"."id",
"public"."FormPrototype"."name"
FROM "public"."FormPrototype"
WHERE "public"."FormPrototype"."status" = $1
OFFSET $2

Prisma Error
/home/runner/work/our-repo/our-repo/api/node_modules/@prisma/client/runtime/index.js:38707
          throw new PrismaClientUnknownRequestError(message, this.prisma._clientVersion);
                ^
Error:
Invalid `prisma.formPrototype.findMany()` invocation in
/home/runner/work/our-repo/our-repo/api/src/events/notifications.ts:15:45

  12 console.log("Sending notifications...");
  13 const currentDate = new Date();
  14
→ 15 const quests = await prisma.formPrototype.findMany(
  Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("XX000"), message: "cache lookup failed for type 17062", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("lsyscache.c"), line: Some(2851), routine: Some("getTypeBinaryInputInfo") }) }) })
    at cb (/home/runner/work/our-repo/our-repo/api/node_modules/@prisma/client/runtime/index.js:38707:17)
    at /home/runner/work/our-repo/our-repo/api/src/context.ts:40:18
    at /home/runner/work/our-repo/our-repo/api/src/context.ts:32:18
    at PrismaClient._request (/home/runner/work/our-repo/our-repo/api/node_modules/@prisma/client/runtime/index.js:40859:18)
    at Object.notificationEventHandler (/home/runner/work/our-repo/our-repo/api/src/events/notifications.ts:15:18)
error Command failed with exit code 1.

End-to-end setup
We are using GitHub Actions and using the services feature specifying a Postgres container. Nothing too special here.
We have a start bash script that does the following to prepare and start our API:
export DATABASE_URL="postgresql://app_test:app_test@localhost:5432/app_test?schema=public"

yarn install --frozen-lockfile
yarn prisma migrate reset --force # no difference when using `migrate dev`
yarn start # ts-node --transpile-only src/index.ts

Can reproduce on the repo https://github.com/JackieJoo/prisma-error-sample with 2.25.0
console.error src/tests/utils/ErrorLog.ts:5
    Exception: {
      clientVersion: '2.25.0',
      stacktrace: [
        'Error: ',
        'Invalid `prisma.user.create()` invocation:',
        '',
        '',
        '  Error occurred during query execution:',
        'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("XX000"), message: "cache lookup failed for type 19972", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("lsyscache.c"), line: Some(2696), routine: Some("getTypeBinaryInputInfo") }) }) })',
        '    at cb (/Users/j42/Repros/prisma-error-sample/node_modules/@prisma/client/runtime/index.js:33820:17)',
        '    at processTicksAndRejections (node:internal/process/task_queues:96:5)'
      ]
    }
....

and on 4.3.1 as well
console.error src/tests/utils/ErrorLog.ts:5
    Exception: {
      clientVersion: '4.3.1',
      stacktrace: [
        'Error: ',
        'Invalid `ctx.prisma.user.create()` invocation in',
        '/Users/j42/Repros/prisma-error-sample/src/resolvers/user/mutations/index.ts:3:26',
        '',
        '  1 export function createUser (_, args, ctx) {',
        '  2   if(args.data.post)',
        '→ 3   return ctx.prisma.user.create(',
        'Error occurred during query execution:',
        'ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(EXX000), message: "cache lookup failed for type 20310", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("lsyscache.c"), line: Some(2696), routine: Some("getTypeBinaryInputInfo") }) }) })',
        '    at RequestHandler.handleRequestError (/Users/j42/Repros/prisma-error-sample/node_modules/@prisma/client/runtime/index.js:29913:13)',
        '    at RequestHandler.request (/Users/j42/Repros/prisma-error-sample/node_modules/@prisma/client/runtime/index.js:29892:12)',
        '    at PrismaClient._request (/Users/j42/Repros/prisma-error-sample/node_modules/@prisma/client/runtime/index.js:30864:16)'
      ]
    }

Is there any news on this thread?

this happens after reseting the database with prisma migrate reset and renders the app broken

What seemed to fix it for me was adding prismaClient.$disconnect() in the afterEach hook.

This is an issue for us as well. With long running connections it appears the prepared statement cache can be poisoned and/or the cache is not accounting for plan invalidation responses from postgres.

Internal occurrence of the error message: https://prisma-company.slack.com/archives/C04FDERNP32/p1683568637783869

What seemed to fix it for me was adding prismaClient.$disconnect() in the afterEach hook and reinstating the prismaClient in beforeEach.

@DimosthenisK could you please share the snippet?

Ocorrência interna da mensagem de erro: https://prisma-company.slack.com/archives/C04FDERNP32/p1683568637783869

@DimosthenisK  could you please share the snippet?

Same problem with Prisma 5.0.0.
statement_cache_size=0 is a workaround.
Already got prismaClient.$disconnect() in the afterEach hook but the problem appeared.
Btw for those asking :
 beforeEach(() => {     // Generate the Prisma schema in the DB     execSync(${prisma_binary} db push --skip-generate`, {
env: {
...process.env,
DATABASE_URL: generateDatabaseURL(schema_id),
},
});
});
afterEach(async () => {
// Drop the Prisma schema in the DB
await prisma.$executeRawUnsafe(
DROP SCHEMA IF EXISTS "${schema_id}" CASCADE;,
);
await prisma.$disconnect();
});
`

I can confirm this is still happening with the original reproduction with Prisma 5: https://github.com/JackieJoo/prisma-error-sample
(I just needed to use npm install -force, then npm install prisma@latest @prisma/client@latest --force and npm install -g nodemon - and then the documented individual steps. npm run migrate now also produces a small, additional migration - but that is not relevant either. Latest at third run of npm run test I got a failure.)
Does anyone have an actual theory what is happening here?
It's clear this is reproducible with the example, but why is it happening?
(I'll try to simplify the reproduction to just use Prisma directly now, no Apollo server etc.)

My current understanding:
Our PostgreSQL driver caches the type information about the enums when a connection is opened and put into the connection pool. This makes queries faster. Before and after the test run, @JackieJoo executes npx prisma migrate reset --force under the hood, which drops the database/schema and recreates it. As the Prisma Client runs in the GraphQL server application though, the connections stay open - including the previous types cache. The PostgreSQL driver then later references the cached data (type 19972 etc) in a query - but the referenced was replaced (and just looks the same as before on a fundamental level). And💥
This StackOverflow question is of a similar setup and problem: https://stackoverflow.com/questions/51086421/npgsql-postgresexception-0x80004005-xx000-cache-lookup-failed-for-type-20785
This also explains why await prisma.$disconnect() works - but only for the ones of you where the Prisma Client runs in the same instance as the tests, and not a long running server like in @JackieJoo's case. If you have a separate running app, you would need to $disconnect() in there, or restart the app.
I am not sure of what the best solution is in our case.
The SO question above mentions a method NpgsqlConnection.ReloadTypes() in Npgsql, that would also work for our case - but of course is not the most obvious. We should probably also catch the errors and link to documentation that explains what is going on.
Do you all actually want to reset the database and re-migrate it or are you using it more as a way to ensure the database is empty? Then us offering a proper "truncate" method might actually be a workaround as well. With that the connection can keep using the old types cache.

Do you all actually want to reset the database and re-migrate it or are you using it more as a way to ensure the database is empty? Then us offering a proper "truncate" method might actually be a workaround as well. With that the connection can keep using the old types cache.

I personally need a complete remigration, as I add static data that wouldn't make sense to be added through seeding (entity permissions with entities that are added during the apps dev cycle)

I'm seeing this same error message when I

Have an existing model with a TEXT column
Have a node app that queries for that model on that column

Service is running, queries work as expected

Run a migration (via prisma migrate deploy) that changes the data type of that column to CITEXT
Queries now fail

up

I encountered a similar issue when I modified the data type of my columns after creating a table.
To resolve this problem, I simply cleared the cached plans in PostgreSQL by executing the DEALLOCATE ALL command. This action effectively removed all prepared queries from the cache, addressing the issue.

In my case DISCARD ALL helped.


experiment: try to only use tokio::mpsc in iroh-net

I am failing to implement the send_blocking, if anyone has ideas, I would love to hear them

Pushed a fix. But this isn't really send_blocking, more like send_blocking without runtime and send_detached or whatever in case a runtime is found.
It might be that this is OK in most cases. But then the fn should be called send_sync or something and return just unit to signal that it is fire and forget / best effort.

As you mention, the calls to send_blocking can be replaced by a normal send call just by making some fns async. So should we just do that?
send_blocking works now, except that it is not really blocking in the case where a runtime is found. But we don't need it at all in iroh-net.

As you mention, the calls to send_blocking can be replaced by a normal send call just by making some fns async. So should we just do that?

yes, we should try and do that

closing in favor of #2620


Showing authors might be problamatic

It has been brought forth that the showcase of authors might be problamatic for a few things.

The idea that you can see the author doesn't add any value to the article
If there are many authors it will be more chaos than anything
If you see an author, you might not want to screw his work up
If you see an author you don't like, you might want to screw up his work

My suggestion will be to rather have a link to a "authors" page or simply remove it all together

Two years on, this doesn't seem to be a problem, as far as I can tell. Close issue?

Agree


1.1.2 凑零钱问题 | Computer Cookbook School Recruitment

https://books.grayson.top/school-recruitment/docs/algorithm/1算法框架/1.1-动态规划/1.1.2-凑零钱问题/

测试


Clear canvas on RN Web

fixes #1106

@elliotwaite thks for catching this

@chrfalch I added tests for it but it's obviously not testing the bug fix (cpu vs webgl backend)


[Bug]: Deploy App (without running dev server) > App Url in Partners links to 404 page

Please confirm that you have:

[X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
[X] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?
Extension
Expected behavior
Typically, the App Url would be set to an ngrok url if you ran npm run dev or yarn dev before deploying and creating the app through the CLI. In this case, if you don't ever run an app locally, a default App Url appears to be set. When a defauIt URL is used, it should resolve to a page that does not 404.
In addition to this, it would be helpful if this linked to a page to tell me that I need to either deploy the App to a public URL or run the app locally in order to generate a functional merchant install link.
Actual behavior
The link for the App Url in the Partners app is https://shopify.github.io/shopify-cli/help/start-app/ which goes to a 404 page.
Stack trace
No response
Reproduction steps

Create a new app using yarn create @shopify/app --template node.
Scaffold a new extension using yarn scaffold extension.
Deploy WITHOUT running yarn dev. Use yarn deploy to deploy and create a new app.
Navigate to the partners link and you'll see the App URL field is set to https://shopify.github.io/shopify-cli/help/start-app/ which is a 404 page.

Operating System
Mac OS Monterey
Shopify CLI version (check your project's package.json if you're not sure)
3.0.24
Shell
zsh
Node version (run node -v if you're not sure)
v18.0.0
What language and version are you using in your application?
Node

Hi @jamesvidler -- I believe this issue is resolved via https://github.com/Shopify/cli/pull/153. Do let us know if I'm missing something and your need is a different one.


DirectDatabaseQuery: Allow for heredoc and nowdoc.

Includes unit tests.

@westonruter @JDGrimes :tada: We're on a roll! 1 day after release, 7 new PRs created, reviewed AND merged one after the other! Thanks for the speedy collaboration!


Adds llvm_lock event

Based on https://github.com/numba/numba/pull/6626
Externally depends on https://github.com/numba/llvmlite/pull/690

The PR expected to fail until a https://github.com/numba/llvmlite/pull/690 is merged and a dev build is uploaded.

The PR expected to fail until a https://github.com/numba/llvmlite/pull/690 is merged and a dev build is uploaded.

I've tested this manually with:
from numba import njit, literal_unroll
import numpy as np
import string

a = tuple(string.ascii_letters)

@njit
def bar(x):
    acc = 0
    for i in literal_unroll(a):
        if i in {'1': x}:
            acc += 1
        else:
            acc += np.sqrt(x[0, 0])
    return np.linalg.svd(x), acc

@njit
def foo(x):
    return bar(np.zeros((x, x)))

foo(1)

def print_timers(fn):
    md = fn.get_metadata(fn.signatures[0])
    lock_duration = md['timers']
    import pprint
    pprint.pprint(lock_duration)

print_timers(foo)
print_timers(bar)

gives:
----------------CPUDispatcher(<function foo at 0x7fa530443170>)-----------------
{'llvm_pass_timings': <numba.misc.llvm_pass_timings.PassTimingsCollection object at 0x7fa51a864a90>,
 'parfor_diagnostics': ParforDiagnostics,
 'parfors': {},
 'pipeline_times': {'nopython': OrderedDict([('0_translate_bytecode',
                                              pass_timings(init=3.884000761900097e-06, run=0.00137490599990997, finalize=2.4960008886409923e-06)),
                                             ('1_fixup_args',
                                              pass_timings(init=2.0819989003939554e-06, run=3.573000867618248e-06, finalize=1.2540003808680922e-06)),
                                             ('2_ir_processing',
                                              pass_timings(init=1.8900009308708832e-06, run=0.0002782669998850906, finalize=1.7879992810776457e-06)),
                                             ('3_with_lifting',
                                              pass_timings(init=1.9620001694420353e-06, run=0.0002597189995867666, finalize=1.8360005924478173e-06)),
                                             ('4_inline_closure_likes',
                                              pass_timings(init=1.9500002963468432e-06, run=0.0007219620001706062, finalize=1.9859999156324193e-06)),
                                             ('5_rewrite_semantic_constants',
                                              pass_timings(init=2.12700069823768e-06, run=5.476300066220574e-05, finalize=1.5599998732795939e-06)),
                                             ('6_dead_branch_prune',
                                              pass_timings(init=1.8930004443973303e-06, run=7.23569992260309e-05, finalize=1.7370002751704305e-06)),
                                             ('7_generic_rewrites',
                                              pass_timings(init=1.8689988792175427e-06, run=0.0009645000009186333, finalize=2.139000571332872e-06)),
                                             ('8_make_function_op_code_to_jit_function',
                                              pass_timings(init=2.220000169472769e-06, run=1.5782001355546527e-05, finalize=1.5480000001844019e-06)),
                                             ('9_inline_inlinables',
                                              pass_timings(init=1.8299997464055195e-06, run=8.286200136353727e-05, finalize=1.6560006770305336e-06)),
                                             ('10_dead_branch_prune',
                                              pass_timings(init=1.8989994714502245e-06, run=6.423300146707334e-05, finalize=1.724998583085835e-06)),
                                             ('11_find_literally',
                                              pass_timings(init=2.007000148296356e-06, run=3.8479998693219386e-05, finalize=1.6350004443665966e-06)),
                                             ('12_literal_unroll',
                                              pass_timings(init=1.9019989849766716e-06, run=1.2708000213024206e-05, finalize=1.3230001059127972e-06)),
                                             ('13_reconstruct_ssa',
                                              pass_timings(init=1.7460006347391754e-06, run=0.0006813579984736862, finalize=2.007000148296356e-06)),
                                             ('14_nopython_type_inference',
                                              pass_timings(init=2.0669995137723163e-06, run=17.191314925999905, finalize=3.086001015617512e-06)),
                                             ('15_annotate_types',
                                              pass_timings(init=2.3480006348108873e-06, run=0.00044779600102629047, finalize=1.9050003174925223e-06)),
                                             ('16_strip_phis',
                                              pass_timings(init=1.965001501957886e-06, run=0.0002615100002003601, finalize=1.7670008674031124e-06)),
                                             ('17_inline_overloads',
                                              pass_timings(init=1.9499984773574397e-06, run=0.00010386099893366918, finalize=1.586999132996425e-06)),
                                             ('18_nopython_rewrites',
                                              pass_timings(init=2.0099996618228033e-06, run=0.000897025000085705, finalize=2.094000592478551e-06)),
                                             ('19_ir_legalization',
                                              pass_timings(init=1.9889994291588664e-06, run=0.00037822000012965873, finalize=1.947000782820396e-06)),
                                             ('20_nopython_backend',
                                              pass_timings(init=1.9859999156324193e-06, run=1.32253759500054, finalize=3.9719998312648386e-06)),
                                             ('21_dump_parfor_diagnostics',
                                              pass_timings(init=2.426999344606884e-06, run=1.2623999282368459e-05, finalize=1.4069992175791413e-06))])},
 'prune_stats': PruneStats(basicblock=13, diamond=0, fanout=0, fanout_raise=0),
 'timers': {'compiler_lock': 18.639617048998844,
            'llvm_lock': 1.1438000001362525e-05}}
Printing pass timings for JITCodeLibrary('foo')
Total time: 1.0487
== #0 Function passes on '_ZN8__main__7foo$241Ex'
 Percent: 0.4%
 Total 0.0037s
 Top timings:
   0.0027s ( 74.2%) SROA #62
   0.0007s ( 19.8%) Early CSE #47
   0.0001s (  2.5%) Simplify the CFG #57
   0.0000s (  0.8%) Prune NRT refops #41
   0.0000s (  0.7%) Dominator Tree Construction #220
== #1 Function passes on '_ZN7cpython8__main__7foo$241Ex'
 Percent: 0.2%
 Total 0.0018s
 Top timings:
   0.0009s ( 51.2%) Branch Probability Basic Block Placement #32
   0.0005s ( 30.5%) Early CSE #48
   0.0002s (  8.9%) Simplify the CFG #58
   0.0000s (  2.1%) Post-Dominator Tree Construction #41
   0.0000s (  1.9%) Prune NRT refops #42
== #2 Function passes on 'cfunc._ZN8__main__7foo$241Ex'
 Percent: 0.1%
 Total 0.0007s
 Top timings:
   0.0003s ( 42.0%) Early CSE #49
   0.0002s ( 32.4%) SROA #63
   0.0001s ( 12.2%) Simplify the CFG #59
   0.0000s (  2.9%) Post-Dominator Tree Construction #42
   0.0000s (  2.8%) Dominator Tree Construction #224
== #3 Module passes (cheap optimization for refprune)
 Percent: 6.1%
 Total 0.0640s
 Top timings:
   0.0502s ( 78.5%) Combine redundant instructions
   0.0055s (  8.6%) Function Integration/Inlining
   0.0012s (  1.8%) Loop-Closed SSA Form Pass
   0.0010s (  1.6%) Natural Loop Information
   0.0010s (  1.5%) Post-Dominator Tree Construction #2
== #4 Module passes (full optimization)
 Percent: 45.1%
 Total 0.4727s
 Top timings:
   0.0303s (  6.4%) Combine redundant instructions #9
   0.0298s (  6.3%) Combine redundant instructions #4
   0.0288s (  6.1%) Combine redundant instructions #7
   0.0241s (  5.1%) Combine redundant instructions #6
   0.0241s (  5.1%) Global Value Numbering
== #5 Finalize object
 Percent: 48.2%
 Total 0.5058s
 Top timings:
   0.2271s ( 44.9%) X86 DAG->DAG Instruction Selection #25
   0.0475s (  9.4%) Greedy Register Allocator #23
   0.0228s (  4.5%) Machine Instruction Scheduler #36
   0.0217s (  4.3%) Loop Strength Reduction #15
   0.0101s (  2.0%) Live Variable Analysis #24
----------------CPUDispatcher(<function bar at 0x7fa5303dbb90>)-----------------
{'llvm_pass_timings': <numba.misc.llvm_pass_timings.PassTimingsCollection object at 0x7fa519e475d0>,
 'parfor_diagnostics': ParforDiagnostics,
 'parfors': {},
 'pipeline_times': {'nopython': OrderedDict([('0_translate_bytecode',
                                              pass_timings(init=3.707998985191807e-06, run=0.004354344000603305, finalize=2.4000000848900527e-06)),
                                             ('1_fixup_args',
                                              pass_timings(init=2.139000571332872e-06, run=3.598999683163129e-06, finalize=1.1489992175484076e-06)),
                                             ('2_ir_processing',
                                              pass_timings(init=1.9620001694420353e-06, run=0.0010898910004470963, finalize=1.9799990695901215e-06)),
                                             ('3_with_lifting',
                                              pass_timings(init=1.9799990695901215e-06, run=0.0012261070005479269, finalize=2.098999175359495e-06)),
                                             ('4_inline_closure_likes',
                                              pass_timings(init=2.025000867433846e-06, run=0.002832796000802773, finalize=2.0579991542035714e-06)),
                                             ('5_rewrite_semantic_constants',
                                              pass_timings(init=1.9620001694420353e-06, run=8.512700151186436e-05, finalize=1.6409994714194909e-06)),
                                             ('6_dead_branch_prune',
                                              pass_timings(init=1.9679991964949295e-06, run=0.00014567000107490458, finalize=1.8060000002151355e-06)),
                                             ('7_generic_rewrites',
                                              pass_timings(init=1.9019989849766716e-06, run=0.0029645329996128567, finalize=1.9859999156324193e-06)),
                                             ('8_make_function_op_code_to_jit_function',
                                              pass_timings(init=2.041999323409982e-06, run=2.9675000405404717e-05, finalize=1.51799940795172e-06)),
                                             ('9_inline_inlinables',
                                              pass_timings(init=2.003000190597959e-06, run=0.00013398900046013296, finalize=1.8976999854203314e-05)),
                                             ('10_dead_branch_prune',
                                              pass_timings(init=1.977001375053078e-06, run=0.00014881199967931025, finalize=1.844000507844612e-06)),
                                             ('11_find_literally',
                                              pass_timings(init=2.0189982024021447e-06, run=7.755799924780149e-05, finalize=1.6650010365992785e-06)),
                                             ('12_literal_unroll',
                                              pass_timings(init=1.8629998521646485e-06, run=7.097167625999646, finalize=2.790000507957302e-06)),
                                             ('13_reconstruct_ssa',
                                              pass_timings(init=2.327999027329497e-06, run=0.7080779040006746, finalize=5.642999894917011e-06)),
                                             ('14_nopython_type_inference',
                                              pass_timings(init=2.3929987946758047e-06, run=0.7409665329996642, finalize=3.522000042721629e-06)),
                                             ('15_annotate_types',
                                              pass_timings(init=2.2759995772503316e-06, run=0.605863254999349, finalize=4.386000000522472e-06)),
                                             ('16_strip_phis',
                                              pass_timings(init=2.2050007828511298e-06, run=0.137269902999833, finalize=4.613999408320524e-06)),
                                             ('17_inline_overloads',
                                              pass_timings(init=2.5320005079265684e-06, run=0.03821146299924294, finalize=2.2040003386791795e-06)),
                                             ('18_nopython_rewrites',
                                              pass_timings(init=2.3030006559565663e-06, run=0.31330970900125976, finalize=5.228001100476831e-06)),
                                             ('19_ir_legalization',
                                              pass_timings(init=2.4540004233131185e-06, run=0.1464166549994843, finalize=4.208000973449089e-06)),
                                             ('20_nopython_backend',
                                              pass_timings(init=2.253000275231898e-06, run=7.375183551999726, finalize=4.100998921785504e-06)),
                                             ('21_dump_parfor_diagnostics',
                                              pass_timings(init=2.369999492657371e-06, run=1.18650004878873e-05, finalize=1.4879988157190382e-06))])},
 'prune_stats': PruneStats(basicblock=436, diamond=0, fanout=0, fanout_raise=16),
 'timers': {'compiler_lock': 17.18676733600114,
            'llvm_lock': 1.2938999134348705e-05}}
Printing pass timings for JITCodeLibrary('bar')
Total time: 2.5922
== #0 Function passes on '_ZN8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 36.8%
 Total 0.9532s
 Top timings:
   0.9065s ( 95.1%) SROA #59
   0.0305s (  3.2%) Early CSE #44
   0.0105s (  1.1%) Simplify the CFG #54
   0.0019s (  0.2%) Prune NRT refops #38
   0.0010s (  0.1%) Post-Dominator Tree Construction #37
== #1 Function passes on '_ZN7cpython8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 0.1%
 Total 0.0021s
 Top timings:
   0.0010s ( 47.5%) SROA #60
   0.0008s ( 35.8%) Early CSE #45
   0.0002s (  8.4%) Simplify the CFG #55
   0.0000s (  1.8%) Prune NRT refops #39
   0.0000s (  1.7%) Dominator Tree Construction #210
== #2 Function passes on 'cfunc._ZN8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 0.0%
 Total 0.0008s
 Top timings:
   0.0003s ( 41.7%) Early CSE #46
   0.0003s ( 32.5%) SROA #61
   0.0001s ( 12.4%) Simplify the CFG #56
   0.0000s (  2.8%) Dominator Tree Construction #212
   0.0000s (  2.8%) Post-Dominator Tree Construction #39
== #3 Module passes (cheap optimization for refprune)
 Percent: 15.2%
 Total 0.3928s
 Top timings:
   0.1669s ( 42.5%) Combine redundant instructions
   0.1575s ( 40.1%) Rotate Loops
   0.0361s (  9.2%) Function Integration/Inlining
   0.0145s (  3.7%) Loop-Closed SSA Form Pass
   0.0031s (  0.8%) Natural Loop Information
== #4 Module passes (full optimization)
 Percent: 29.8%
 Total 0.7723s
 Top timings:
   0.1104s ( 14.3%) Value Propagation
   0.0448s (  5.8%) SROA #2
   0.0417s (  5.4%) Combine redundant instructions #2
   0.0317s (  4.1%) Combine redundant instructions #4
   0.0309s (  4.0%) Combine redundant instructions #3
== #5 Finalize object
 Percent: 18.2%
 Total 0.4710s
 Top timings:
   0.2209s ( 46.9%) X86 DAG->DAG Instruction Selection #24
   0.0316s (  6.7%) Greedy Register Allocator #22
   0.0221s (  4.7%) Machine Instruction Scheduler #35
   0.0132s (  2.8%) Loop Strength Reduction #14
   0.0099s (  2.1%) Live Variable Analysis #23
18.60user 1.47system 0:20.12elapsed

Things which make immediate sense:

20.12s wall clock time total. 18.63 is spent inside the compile lock according to foo and 17.18 according to bar, this seems ok as foo contains little compilation work and bar is orchestrated to stress the Numba compiler passes, also that the lock compile condition for foo would encapsulate bar.

Things I'm not sure about:

The LLVM lock time seems alarmingly fast, ~1e-5s for both functions, how does this correlate with the respective LLVM pass timings "Total time"(s) of 1.0487(foo) and 2.5922 (bar)? The Numba compiler pass 20_nopython_backend does more reasonably reflect these "Total time"(s) at 1.32(foo) 7.37(bar), which makes sense as bar has considerably more Numba IR lowering to do than foo and it's slower than LLVM lowering, LLVM's effort on bar would expectedly be higher, but I guess for foo there's still some effort as there's inlining and creating the actual ELF. I suspect I'm missing something?

I've tested this manually with:
from numba import njit, literal_unroll
import numpy as np
import string

a = tuple(string.ascii_letters)

@njit
def bar(x):
    acc = 0
    for i in literal_unroll(a):
        if i in {'1': x}:
            acc += 1
        else:
            acc += np.sqrt(x[0, 0])
    return np.linalg.svd(x), acc

@njit
def foo(x):
    return bar(np.zeros((x, x)))

foo(1)

def print_timers(fn):
    md = fn.get_metadata(fn.signatures[0])
    lock_duration = md['timers']
    import pprint
    pprint.pprint(lock_duration)

print_timers(foo)
print_timers(bar)

gives:
----------------CPUDispatcher(<function foo at 0x7fa530443170>)-----------------
{'llvm_pass_timings': <numba.misc.llvm_pass_timings.PassTimingsCollection object at 0x7fa51a864a90>,
 'parfor_diagnostics': ParforDiagnostics,
 'parfors': {},
 'pipeline_times': {'nopython': OrderedDict([('0_translate_bytecode',
                                              pass_timings(init=3.884000761900097e-06, run=0.00137490599990997, finalize=2.4960008886409923e-06)),
                                             ('1_fixup_args',
                                              pass_timings(init=2.0819989003939554e-06, run=3.573000867618248e-06, finalize=1.2540003808680922e-06)),
                                             ('2_ir_processing',
                                              pass_timings(init=1.8900009308708832e-06, run=0.0002782669998850906, finalize=1.7879992810776457e-06)),
                                             ('3_with_lifting',
                                              pass_timings(init=1.9620001694420353e-06, run=0.0002597189995867666, finalize=1.8360005924478173e-06)),
                                             ('4_inline_closure_likes',
                                              pass_timings(init=1.9500002963468432e-06, run=0.0007219620001706062, finalize=1.9859999156324193e-06)),
                                             ('5_rewrite_semantic_constants',
                                              pass_timings(init=2.12700069823768e-06, run=5.476300066220574e-05, finalize=1.5599998732795939e-06)),
                                             ('6_dead_branch_prune',
                                              pass_timings(init=1.8930004443973303e-06, run=7.23569992260309e-05, finalize=1.7370002751704305e-06)),
                                             ('7_generic_rewrites',
                                              pass_timings(init=1.8689988792175427e-06, run=0.0009645000009186333, finalize=2.139000571332872e-06)),
                                             ('8_make_function_op_code_to_jit_function',
                                              pass_timings(init=2.220000169472769e-06, run=1.5782001355546527e-05, finalize=1.5480000001844019e-06)),
                                             ('9_inline_inlinables',
                                              pass_timings(init=1.8299997464055195e-06, run=8.286200136353727e-05, finalize=1.6560006770305336e-06)),
                                             ('10_dead_branch_prune',
                                              pass_timings(init=1.8989994714502245e-06, run=6.423300146707334e-05, finalize=1.724998583085835e-06)),
                                             ('11_find_literally',
                                              pass_timings(init=2.007000148296356e-06, run=3.8479998693219386e-05, finalize=1.6350004443665966e-06)),
                                             ('12_literal_unroll',
                                              pass_timings(init=1.9019989849766716e-06, run=1.2708000213024206e-05, finalize=1.3230001059127972e-06)),
                                             ('13_reconstruct_ssa',
                                              pass_timings(init=1.7460006347391754e-06, run=0.0006813579984736862, finalize=2.007000148296356e-06)),
                                             ('14_nopython_type_inference',
                                              pass_timings(init=2.0669995137723163e-06, run=17.191314925999905, finalize=3.086001015617512e-06)),
                                             ('15_annotate_types',
                                              pass_timings(init=2.3480006348108873e-06, run=0.00044779600102629047, finalize=1.9050003174925223e-06)),
                                             ('16_strip_phis',
                                              pass_timings(init=1.965001501957886e-06, run=0.0002615100002003601, finalize=1.7670008674031124e-06)),
                                             ('17_inline_overloads',
                                              pass_timings(init=1.9499984773574397e-06, run=0.00010386099893366918, finalize=1.586999132996425e-06)),
                                             ('18_nopython_rewrites',
                                              pass_timings(init=2.0099996618228033e-06, run=0.000897025000085705, finalize=2.094000592478551e-06)),
                                             ('19_ir_legalization',
                                              pass_timings(init=1.9889994291588664e-06, run=0.00037822000012965873, finalize=1.947000782820396e-06)),
                                             ('20_nopython_backend',
                                              pass_timings(init=1.9859999156324193e-06, run=1.32253759500054, finalize=3.9719998312648386e-06)),
                                             ('21_dump_parfor_diagnostics',
                                              pass_timings(init=2.426999344606884e-06, run=1.2623999282368459e-05, finalize=1.4069992175791413e-06))])},
 'prune_stats': PruneStats(basicblock=13, diamond=0, fanout=0, fanout_raise=0),
 'timers': {'compiler_lock': 18.639617048998844,
            'llvm_lock': 1.1438000001362525e-05}}
Printing pass timings for JITCodeLibrary('foo')
Total time: 1.0487
== #0 Function passes on '_ZN8__main__7foo$241Ex'
 Percent: 0.4%
 Total 0.0037s
 Top timings:
   0.0027s ( 74.2%) SROA #62
   0.0007s ( 19.8%) Early CSE #47
   0.0001s (  2.5%) Simplify the CFG #57
   0.0000s (  0.8%) Prune NRT refops #41
   0.0000s (  0.7%) Dominator Tree Construction #220
== #1 Function passes on '_ZN7cpython8__main__7foo$241Ex'
 Percent: 0.2%
 Total 0.0018s
 Top timings:
   0.0009s ( 51.2%) Branch Probability Basic Block Placement #32
   0.0005s ( 30.5%) Early CSE #48
   0.0002s (  8.9%) Simplify the CFG #58
   0.0000s (  2.1%) Post-Dominator Tree Construction #41
   0.0000s (  1.9%) Prune NRT refops #42
== #2 Function passes on 'cfunc._ZN8__main__7foo$241Ex'
 Percent: 0.1%
 Total 0.0007s
 Top timings:
   0.0003s ( 42.0%) Early CSE #49
   0.0002s ( 32.4%) SROA #63
   0.0001s ( 12.2%) Simplify the CFG #59
   0.0000s (  2.9%) Post-Dominator Tree Construction #42
   0.0000s (  2.8%) Dominator Tree Construction #224
== #3 Module passes (cheap optimization for refprune)
 Percent: 6.1%
 Total 0.0640s
 Top timings:
   0.0502s ( 78.5%) Combine redundant instructions
   0.0055s (  8.6%) Function Integration/Inlining
   0.0012s (  1.8%) Loop-Closed SSA Form Pass
   0.0010s (  1.6%) Natural Loop Information
   0.0010s (  1.5%) Post-Dominator Tree Construction #2
== #4 Module passes (full optimization)
 Percent: 45.1%
 Total 0.4727s
 Top timings:
   0.0303s (  6.4%) Combine redundant instructions #9
   0.0298s (  6.3%) Combine redundant instructions #4
   0.0288s (  6.1%) Combine redundant instructions #7
   0.0241s (  5.1%) Combine redundant instructions #6
   0.0241s (  5.1%) Global Value Numbering
== #5 Finalize object
 Percent: 48.2%
 Total 0.5058s
 Top timings:
   0.2271s ( 44.9%) X86 DAG->DAG Instruction Selection #25
   0.0475s (  9.4%) Greedy Register Allocator #23
   0.0228s (  4.5%) Machine Instruction Scheduler #36
   0.0217s (  4.3%) Loop Strength Reduction #15
   0.0101s (  2.0%) Live Variable Analysis #24
----------------CPUDispatcher(<function bar at 0x7fa5303dbb90>)-----------------
{'llvm_pass_timings': <numba.misc.llvm_pass_timings.PassTimingsCollection object at 0x7fa519e475d0>,
 'parfor_diagnostics': ParforDiagnostics,
 'parfors': {},
 'pipeline_times': {'nopython': OrderedDict([('0_translate_bytecode',
                                              pass_timings(init=3.707998985191807e-06, run=0.004354344000603305, finalize=2.4000000848900527e-06)),
                                             ('1_fixup_args',
                                              pass_timings(init=2.139000571332872e-06, run=3.598999683163129e-06, finalize=1.1489992175484076e-06)),
                                             ('2_ir_processing',
                                              pass_timings(init=1.9620001694420353e-06, run=0.0010898910004470963, finalize=1.9799990695901215e-06)),
                                             ('3_with_lifting',
                                              pass_timings(init=1.9799990695901215e-06, run=0.0012261070005479269, finalize=2.098999175359495e-06)),
                                             ('4_inline_closure_likes',
                                              pass_timings(init=2.025000867433846e-06, run=0.002832796000802773, finalize=2.0579991542035714e-06)),
                                             ('5_rewrite_semantic_constants',
                                              pass_timings(init=1.9620001694420353e-06, run=8.512700151186436e-05, finalize=1.6409994714194909e-06)),
                                             ('6_dead_branch_prune',
                                              pass_timings(init=1.9679991964949295e-06, run=0.00014567000107490458, finalize=1.8060000002151355e-06)),
                                             ('7_generic_rewrites',
                                              pass_timings(init=1.9019989849766716e-06, run=0.0029645329996128567, finalize=1.9859999156324193e-06)),
                                             ('8_make_function_op_code_to_jit_function',
                                              pass_timings(init=2.041999323409982e-06, run=2.9675000405404717e-05, finalize=1.51799940795172e-06)),
                                             ('9_inline_inlinables',
                                              pass_timings(init=2.003000190597959e-06, run=0.00013398900046013296, finalize=1.8976999854203314e-05)),
                                             ('10_dead_branch_prune',
                                              pass_timings(init=1.977001375053078e-06, run=0.00014881199967931025, finalize=1.844000507844612e-06)),
                                             ('11_find_literally',
                                              pass_timings(init=2.0189982024021447e-06, run=7.755799924780149e-05, finalize=1.6650010365992785e-06)),
                                             ('12_literal_unroll',
                                              pass_timings(init=1.8629998521646485e-06, run=7.097167625999646, finalize=2.790000507957302e-06)),
                                             ('13_reconstruct_ssa',
                                              pass_timings(init=2.327999027329497e-06, run=0.7080779040006746, finalize=5.642999894917011e-06)),
                                             ('14_nopython_type_inference',
                                              pass_timings(init=2.3929987946758047e-06, run=0.7409665329996642, finalize=3.522000042721629e-06)),
                                             ('15_annotate_types',
                                              pass_timings(init=2.2759995772503316e-06, run=0.605863254999349, finalize=4.386000000522472e-06)),
                                             ('16_strip_phis',
                                              pass_timings(init=2.2050007828511298e-06, run=0.137269902999833, finalize=4.613999408320524e-06)),
                                             ('17_inline_overloads',
                                              pass_timings(init=2.5320005079265684e-06, run=0.03821146299924294, finalize=2.2040003386791795e-06)),
                                             ('18_nopython_rewrites',
                                              pass_timings(init=2.3030006559565663e-06, run=0.31330970900125976, finalize=5.228001100476831e-06)),
                                             ('19_ir_legalization',
                                              pass_timings(init=2.4540004233131185e-06, run=0.1464166549994843, finalize=4.208000973449089e-06)),
                                             ('20_nopython_backend',
                                              pass_timings(init=2.253000275231898e-06, run=7.375183551999726, finalize=4.100998921785504e-06)),
                                             ('21_dump_parfor_diagnostics',
                                              pass_timings(init=2.369999492657371e-06, run=1.18650004878873e-05, finalize=1.4879988157190382e-06))])},
 'prune_stats': PruneStats(basicblock=436, diamond=0, fanout=0, fanout_raise=16),
 'timers': {'compiler_lock': 17.18676733600114,
            'llvm_lock': 1.2938999134348705e-05}}
Printing pass timings for JITCodeLibrary('bar')
Total time: 2.5922
== #0 Function passes on '_ZN8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 36.8%
 Total 0.9532s
 Top timings:
   0.9065s ( 95.1%) SROA #59
   0.0305s (  3.2%) Early CSE #44
   0.0105s (  1.1%) Simplify the CFG #54
   0.0019s (  0.2%) Prune NRT refops #38
   0.0010s (  0.1%) Post-Dominator Tree Construction #37
== #1 Function passes on '_ZN7cpython8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 0.1%
 Total 0.0021s
 Top timings:
   0.0010s ( 47.5%) SROA #60
   0.0008s ( 35.8%) Early CSE #45
   0.0002s (  8.4%) Simplify the CFG #55
   0.0000s (  1.8%) Prune NRT refops #39
   0.0000s (  1.7%) Dominator Tree Construction #210
== #2 Function passes on 'cfunc._ZN8__main__7bar$242E5ArrayIdLi2E1C7mutable7alignedE'
 Percent: 0.0%
 Total 0.0008s
 Top timings:
   0.0003s ( 41.7%) Early CSE #46
   0.0003s ( 32.5%) SROA #61
   0.0001s ( 12.4%) Simplify the CFG #56
   0.0000s (  2.8%) Dominator Tree Construction #212
   0.0000s (  2.8%) Post-Dominator Tree Construction #39
== #3 Module passes (cheap optimization for refprune)
 Percent: 15.2%
 Total 0.3928s
 Top timings:
   0.1669s ( 42.5%) Combine redundant instructions
   0.1575s ( 40.1%) Rotate Loops
   0.0361s (  9.2%) Function Integration/Inlining
   0.0145s (  3.7%) Loop-Closed SSA Form Pass
   0.0031s (  0.8%) Natural Loop Information
== #4 Module passes (full optimization)
 Percent: 29.8%
 Total 0.7723s
 Top timings:
   0.1104s ( 14.3%) Value Propagation
   0.0448s (  5.8%) SROA #2
   0.0417s (  5.4%) Combine redundant instructions #2
   0.0317s (  4.1%) Combine redundant instructions #4
   0.0309s (  4.0%) Combine redundant instructions #3
== #5 Finalize object
 Percent: 18.2%
 Total 0.4710s
 Top timings:
   0.2209s ( 46.9%) X86 DAG->DAG Instruction Selection #24
   0.0316s (  6.7%) Greedy Register Allocator #22
   0.0221s (  4.7%) Machine Instruction Scheduler #35
   0.0132s (  2.8%) Loop Strength Reduction #14
   0.0099s (  2.1%) Live Variable Analysis #23
18.60user 1.47system 0:20.12elapsed

Things which make immediate sense:

20.12s wall clock time total. 18.63 is spent inside the compile lock according to foo and 17.18 according to bar, this seems ok as foo contains little compilation work and bar is orchestrated to stress the Numba compiler passes, also that the lock compile condition for foo would encapsulate bar.

Things I'm not sure about:

The LLVM lock time seems alarmingly fast, ~1e-5s for both functions, how does this correlate with the respective LLVM pass timings "Total time"(s) of 1.0487(foo) and 2.5922 (bar)? The Numba compiler pass 20_nopython_backend does more reasonably reflect these "Total time"(s) at 1.32(foo) 7.37(bar), which makes sense as bar has considerably more Numba IR lowering to do than foo and it's slower than LLVM lowering, LLVM's effort on bar would expectedly be higher, but I guess for foo there's still some effort as there's inlining and creating the actual ELF. I suspect I'm missing something?

Fixed bug in https://github.com/numba/numba/pull/6636#issuecomment-760168944
Add checks for lingering listeners

Fixed bug in https://github.com/numba/numba/pull/6636#issuecomment-760168944
Add checks for lingering listeners

Thanks for the feedback. I've applied all suggestions.

Thanks for the feedback. I've applied all suggestions.

Typo fixed in 8d1a4bb. Patch looks good, thanks for the fixes, waiting on CI then this can be merged.

Typo fixed in 8d1a4bb. Patch looks good, thanks for the fixes, waiting on CI then this can be merged.


postgres: do not copy and linearize received data when it is not going to be used

Commit Message:
When the decoder analyzes postgres messages in order to produce statistics, the message body needs to be linearized and copied to the internal buffer.
From around 40 types of postgres messages, only about 8-10 are used to produce stats, but linearization and copying to internal buffer was done for all messages. Code in this PR checks if linearization and copying is needed.
Also, after linearization, the decoder stored the linearized message until the next message arrived instead of releasing the memory immediately after processing. Code in this PR releases memory after the message has been processed.
Additional Description:
Risk Level: Low
Testing: Adjusted unit test to verify that memory is released after processing the message.
Docs Changes: No
Release Notes: No
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

Looks good. Asking help from @zuercher for senior maintainer review. Thanks!

@cpakulski, sorry, seems like docs build is hanging. See if merging main could help.

@zuercher I need your "lgtm" again. Nothing really changed from the last review. I had to remove one mock method because it was removed from the base class. Thanks!

/retest

/retest


Add vehicle-attributes-recognition-barrier-0042 model

2 @vladimir-dudnik :
Valdimir, please, take a look

2 @vladimir-dudnik :
Vladimir, I'm sorry, but I see a lot of similar errors in documentation in the files which I did not change.
Example:
22:37:42  [Error] Found broken links in intel/pedestrian-and-vehicle-detector-adas-0001/description/pedestrian-and-vehicle-detector-adas-0001.md

Jenkins please retry a build

It turned out that several my github comments to this PR were in pending state. 🙁
(and this my comment was accidentally gone to another PR, sorry)
Now I sent them and applied all the suggested changes
2 @eizamaliev , @eaidova :
Could you check if everything is OK now? can this PR be merged?

NB: the documentation build reports errors in the files that were not changed by me!

2 @eizamaliev , @eaidova :
Could you check if everything is OK now? can this PR be merged?

I approved, let's wait @eizamaliev  decision

NB: the documentation build reports errors in the files that were not changed by me!

Yes, looks like one of outdated reid  model was removed from docs


"Unguriu" and "Ojasca" are listed in the drop-down menu

Description:
"Unguriu" and "Ojasca" are listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 1
Type "Unguriu" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Unguriu, BUZĂU (Unguriu)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Type "Ojasca" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Ojasca, BUZĂU (Unguriu)".


Fix sonic mania display settings

There are several problems with the display settings for Sonic Mania.
Listing them one by one:

awk does not return a boolean value, so what it returns cannot be used in an if statement. The current if will always use the else branch at the moment, therefore. I have fixed this by using an inline awk if else
pixWidth in the grep and sed was set to PixWidth with a capital P when it needs to be lowercase.
Settings.ini has an uppercase S, it was in the script as settings.ini, with a lowercase s
When doing a sed to set the fsWidth and fsHeight, the pixWidth line was just being replaced repeatedly (except it wasn't of course, as uppercase PixWidth was being used)

~The Settings.ini was actually missing fsWidth and fsHeight - I have added these~

White space changes were made by my shell formatter - but I left them as they seemed reasonable. Happy to revert them if wanted

I tested this on my rp5 and it works well. Good work! Only a few minor tweaks suggested now.

Do you mind terribly if you throw Sonic 1, 2, and CD into this PR as well? They all have a similar display settings modification in sh.

Absolutely! I'll add that in the next day or so!


Regexp error when using bump-formula-pr

[x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
[ ] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
[x] ran brew update and can still reproduce the problem?
[x] ran brew doctor, fixed all issues and can still reproduce the problem?
[x] ran brew config and brew doctor and included their output with your issue?

I was trying to submit a version bump PR for youtube-dl and received the following output:
brew bump-formula-pr --strict youtube-dl --tag=2018.05.30 --revision=e425710554f1ed96504389fb526b898a942012dd
Already up-to-date.
==> replace nil with "2018.05.30"
Error: wrong argument type nil (expected Regexp)
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/extend/string.rb:39:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/extend/string.rb:39:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:355:in `block (2 levels) in inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:351:in `each'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:351:in `block in inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:26:in `block in inreplace'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:22:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:22:in `inreplace'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:350:in `inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:233:in `bump_formula_pr'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in `<main>'

brew config:
HOMEBREW_VERSION: 1.6.6-32-g0f65758
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0f65758f855712b02a1fc87f4903851810a622a2
Last commit: 8 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b1814bda721b02d0d196065cd79184afb47f9410
Core tap last commit: 53 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/bin/ruby
Clang: 9.1 build 902
Git: 2.17.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.4-x86_64
CLT: <IP_ADDRESS>.1.1521514116
Xcode: N/A
XQuartz: N/A

brew doctor:
brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  node
  gnupg

I think this is happening because youtube-dl has a url and not a :tag / :revision pair. The tool could probably use some logic to detect nil and at the very least print a better error message.

Thanks peoples 😄

@fentie You're welcome!


Automated Package Upgrade

:tada: This PR is included in version 25.3.310 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


How to dual boot with windows laptop?

im trying to setup a dual boot so it doesnt wipe my windows partition but i dont want to use another drive just for bazite.

I'm also interested in this, currently my set-up:
Miniforum Hx99g with Ryzen 9 6900hx (with igpu) and Radeon rx6600m 16gb DDR5 and two drives inside:
1tb - windows 11 pro
2tb - chimeraOS
Because chimeraOS doesn't support secure boot I'm interested in jumping into bazzite (as far as I found is supports secure boot)
May i ask for any instructions to install bazzite on 2 TB drives to maintain windows 11 on second drive and to have fast (2-3 sec) grub window with auto select of bazzite gamepad mode and option to select windows 11 in it ?
I'm worried about installation of fedora how not to mess up with efi partitions... (Or rather how to do it properly)

Please review this documentation and attempt the process in there. If you have any issues, please reopen the issue!


[New Port Request] Steam Audio

Library name
Steam Audio
Library description
Advanced spatial audio simulating solution developed by Valve Corporation for games and VR applications.
Source repository URL
https://github.com/ValveSoftware/steam-audio
Project homepage (if different from the source repository)
https://valvesoftware.github.io/steam-audio/
Anything else that is useful to know when adding (such as optional features the library may have that should be included)
Repository also contains sources of integration plugins for FMOD/Unity/Unreal, these things is out-of-scope for this port. Sources of library itself contained at /core.

Bump

bump

bump


Multisample texture error when using Post Processing package in Unity 2020

Steps to reproduce:

Create a new Unity project with Unity 2020.3 (2020.3.2f1 used in my testing)
Install the XR Plugin Management package (v4.0.1 verified), the Post Processing package (v3.1.0 verified), and the latest SteamVR Unity Plugin (v2.7.3 used in my testing)
In a new scene (issue happens with a default scene with a static camera, but also reproducible with the tracked CameraRig prefab), enter play mode. Observe that the console is free of errors, and an image is visible in the HMD.
Now add Post-process Layer component onto the camera game object (either the "Main Camera" object in a new scene or the "Camera" object in the SteamVR CameraRig prefab.
Enter play mode again. Observe that the headset now displays a solid grey instead of the scene and the console is now spammed with the following error:

A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader.

Expected behavior:

We should be able to use the SteamVR Unity plugin with the XR Plugin Management system in Unity 2020.3 and the Post Processing package. The HMD should show the correct camera image, and there should be no errors in the console.

Note:

Disabling or removing the Post-process Layer component turns off post-processing and stops the issue from happening; enabling/re-adding it reproduces the issue. This happens even at runtime when toggling the enabled state of the Post-process Layer component in play mode.
One can verify that this is an issue with the SteamVR plugin, not with Unity: If you uncheck the "SteamVR Loader" XR plug-in provider and instead install and check a different plug-in provider (for example, OpenXR), XR tracking and rendering works fine while also using the Post Processing package.

Tested with Unity 2020.3.2f1, SteamVR Unity Plugin v2.7.3 (sdk 1.14.15)

Oh, and one other crucial detail: This only happens in the default (and most common) Single Pass Instanced stereo rendering mode. If you switch that setting in Project Settings->XR Plug-in Management->OpenVR->Stereo Rendering Mode to Multi Pass, then the Post-process layer works as expected without errors and the HMD shows a valid image. However, most users will need to use Single Pass Instanced rendering.


Building errors

Environment:
$ cd /tmp
$ git clone https://github.com/cenotelie/hime.git
$ git clone https://github.com/cenotelie/hime-grams.git
$ cd hime/

[1]
$ sh .releng/build.sh
[INFO] ------------------------------------------------------------------------
-- Building Hime Redist for Rust --
    Updating crates.io index
   Compiling hime_redist v3.4.2 (/tmp/hime/runtime-rust)
warning: unnecessary parentheses around block return value
  --> runtime-rust/src/ast.rs:81:9
   |
81 |         (self.data & 0x3FFF_FFFF)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:22:5
   |
22 |     (u16::from(buffer[index + 1]) << 8 | u16::from(buffer[index]))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/ast.rs:81:9
   |
81 |         (self.data & 0x3FFF_FFFF)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:27:5
   |
27 | /     (u32::from(buffer[index + 3]) << 24
28 | |         | u32::from(buffer[index + 2]) << 16
29 | |         | u32::from(buffer[index + 1]) << 8
30 | |         | u32::from(buffer[index]))
   | |___________________________________^
   |
help: remove these parentheses
   |
27 |     u32::from(buffer[index + 3]) << 24
28 |         | u32::from(buffer[index + 2]) << 16
29 |         | u32::from(buffer[index + 1]) << 8
30 |         | u32::from(buffer[index])
   |

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:22:5
   |
22 |     (u16::from(buffer[index + 1]) << 8 | u16::from(buffer[index]))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:27:5
   |
27 | /     (u32::from(buffer[index + 3]) << 24
28 | |         | u32::from(buffer[index + 2]) << 16
29 | |         | u32::from(buffer[index + 1]) << 8
30 | |         | u32::from(buffer[index]))
   | |___________________________________^
   |
help: remove these parentheses
   |
27 |     u32::from(buffer[index + 3]) << 24
28 |         | u32::from(buffer[index + 2]) << 16
29 |         | u32::from(buffer[index + 1]) << 8
30 |         | u32::from(buffer[index])
   |

    Finished test [unoptimized + debuginfo] target(s) in 3.08s
     Running target/debug/deps/hime_redist-3f0928c9fec829ef

running 4 tests
test text::test_read_utf8 ... ok
test text::test_text_lines ... ok
test text::test_text_substring ... ok
test utils::biglist::test_big_list ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests hime_redist

running 2 tests
test src/lib.rs -  (line 35) ... ok
test src/utils/iterable.rs - utils::iterable::Iterable (line 29) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

-- Building Test Executor for Rust --
error: current package believes it's in a workspace when it's not:
current:   /tmp/hime/tests-executor-rust/Cargo.toml
workspace: /tmp/hime/Cargo.toml

this may be fixable by adding `tests-executor-rust` to the `workspace.members` array of the manifest located at: /tmp/hime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
error: current package believes it's in a workspace when it's not:
current:   /tmp/hime/tests-executor-rust/Cargo.toml
workspace: /tmp/hime/Cargo.toml

this may be fixable by adding `tests-executor-rust` to the `workspace.members` array of the manifest located at: /tmp/hime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
error: current package believes it's in a workspace when it's not:
current:   /tmp/hime/tests-executor-rust/Cargo.toml
workspace: /tmp/hime/Cargo.toml

this may be fixable by adding `tests-executor-rust` to the `workspace.members` array of the manifest located at: /tmp/hime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
cp: cannot stat '/tmp/hime/tests-executor-rust/target/release/tests_executor_rust': No such file or directory
[INFO] Hime.SDK <IP_ADDRESS>

[2]
sh .releng/release.sh
Generating /tmp/hime/runtime-java/target/apidocs/help-doc.html...
[INFO] Building jar: /tmp/hime/runtime-java/target/hime-redist-3.4.2-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ hime-redist ---
gpg: skipped<EMAIL_ADDRESS>No secret key
gpg: signing failed: No secret key
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.333 s
[INFO] Finished at: 2020-04-20T13:04:22+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project hime-redist: Exit code: 2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
-- Building Hime Redist for Rust --
    Updating crates.io index
   Compiling hime_redist v3.4.2 (/tmp/hime/runtime-rust)
warning: unnecessary parentheses around block return value
  --> runtime-rust/src/ast.rs:81:9
   |
81 |         (self.data & 0x3FFF_FFFF)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:22:5
   |
22 |     (u16::from(buffer[index + 1]) << 8 | u16::from(buffer[index]))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

warning: unnecessary parentheses around block return value
  --> runtime-rust/src/utils/bin.rs:27:5
   |
27 | /     (u32::from(buffer[index + 3]) << 24
28 | |         | u32::from(buffer[index + 2]) << 16
29 | |         | u32::from(buffer[index + 1]) << 8
30 | |         | u32::from(buffer[index]))
   | |___________________________________^
   |
help: remove these parentheses
   |
27 |     u32::from(buffer[index + 3]) << 24
28 |         | u32::from(buffer[index + 2]) << 16
29 |         | u32::from(buffer[index + 1]) << 8
30 |         | u32::from(buffer[index])
   |

    Finished release [optimized] target(s) in 4.56s
   Packaging hime_redist v3.4.2 (/tmp/hime/runtime-rust)
-- Building Package --
cp: cannot stat '/tmp/hime/runtime-rust/target/package/*.crate': No such file or directory
.releng/release.sh: 121: .releng/release.sh: zip: not found

It looks like the latest change broke the build by introducing a workspace for Rust projects.
This should be fix now with 488dfb0.
As to the errors with the release script, it requires the PGP signing key as it is used to produce the release artifacts. It is not surprising that it fails without it.

@woutersl , with new version from github and with hime_redist = "3.4.1" :
$ sh .releng/build.sh
[INFO] 2289 tests executed, 0 failed, 0 errors
...
-- Building Hime Redist for Rust --
    Updating crates.io index
   Compiling hime_redist v3.4.2 (/tmp/hime/runtime-rust)
    Finished release [optimized] target(s) in 4.46s
   Packaging hime_redist v3.4.2 (/tmp/hime/runtime-rust)
-- Building Package --
cp: cannot stat '/tmp/hime/runtime-rust/target/package/*.crate': No such file or directory
.releng/release.sh: 121: .releng/release.sh: zip: not found

find /tmp -name hime_redist-3.4.2.crate
/tmp/hime/target/package/hime_redist-3.4.2.crate

$cat ./.releng/release.sh | grep crate
cp $ROOT/runtime-rust/target/package/*.crate                                    "$RELENG/hime-$VERSION/rust/"

I think this line should be:
cp $ROOT/target/package/*.crate                                    "$RELENG/hime-$VERSION/rust/"

Because rust workspace has one shared /target  for all workspace crates:
/target
   /debug
   /release
/crate1
/crate2
Cargo.toml

Yes it is the problem introduced by the usage of the Rust workspace. This should be fixed with 9f71e2a.

Ok, it works now. Thank you! So, I close the issue.


[Enhancement] enable all the rotators for render plane manipulator

Closes: https://github.com/napari-threedee/napari-threedee/issues/164
When I first started using the render plane manipulator I was a bit confused as to the 2 balls.
It's a bit tricky to position the plane how you want because you need to "rotate the manipulator" and then rotate the plane -- even for simple orthogonal rotations.
Here I enable the rotators for all the axes. It's busier, but I i think it's more visually consistent and easier to understand that you can rotate around each axis. For the translator, It does benefit form https://github.com/napari-threedee/napari-threedee/pull/165
to make translator vs. rotator more clear.
Anyhow, here's what it looks like now:

Just throwing this out.

This is fine for me if you think it's more intuitive, @psobolewskiPhD . What do you think @alisterburt ?

Yep works for me! I've seen other people struggle with the manipulator - thanks for spending the time @psobolewskiPhD !


[DO NOT MERGE] Update HttpRecorder and TestFramework

Description

Updating HttpRecorder to <IP_ADDRESS> and TestFramework to <IP_ADDRESS> to bring back an implementation of the Flush method found in HttpMockServer that returns nothing versus the string that is currently returned. These packages will be used locally in PowerShell by projects that still rely on Hyak-generated clients whose tests are currently failing because of this change.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] Please add REST spec PR link to the SDK PR
[ ] I have read the contribution guidelines.
[ ] The pull request does not introduce breaking changes.

General Guidelines

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

SDK Generation Guidelines

[ ] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
[ ] The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
[ ] The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

Sign job: https://azuresdkci.westus2.cloudapp.azure.com/job/NetCore-SDK-Sign/223/


Add collectCoverage as an allowed Jest option

I believe "coverage" should have been "collectCoverage" since Jest lists the option as "collectCoverage". There is no "coverage" option in Jest. In order to keep in line with the valid Jest options, we should accept "collectCoverage".
I'm not entirely sure what "coverage" does, since a boolean true value for it in the .fusionrc.js file doesn't change anything when yarn test is run.
https://jestjs.io/docs/en/configuration#collectcoverage-boolean
This PR also adds coverageThreshold as an allowed option. See the following commit:
https://github.com/fusionjs/fusionjs/pull/724/commits/9000000b8ffe40b883e50c6365a9e1a5b81593dc

@chrisdothtml Thanks for the help.
It is the latest fusion and fusion-cli. Maybe you can help me understand this. I've added Jest options to the .fusionrc file but some of those options are ignored. I had tracked it down to this object which is used to filter out accepted parameters.
The use case is I would like to specify which files and folders to collect coverage from, to enable coverage for yarn test, and provide various other options (doesn't matter what option, anything really).
The scaffold creates a Jest section in the .fusionrc file, but it seemed as though this configuration wouldn't allow certain parameters, such as the "coverage" option.
The question is, should I continue with this change and find out why these parameters in the .fusionrc are being ignored, or should we instead add a jest configuration to the package.json file, thereby overriding what Fusion might otherwise filter out.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.3 out of 5 committers have signed the CLA.:white_check_mark: derekju:white_check_mark: lhorie:white_check_mark: ganemone:x: ajbogh:x: angus-cYou have signed the CLA already but the status is still pending? Let us recheck it.


chore: Bump AWS SAM CLI Version

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

🥰🥰🥰🥰🥰

CONGRATULATIONS 🎉🎉🎉  This is a big milestone

Awesome 👏