Implement multi-patch support in patch-package

Problem
patch-package is a simple and useful package that we use to implement bug fixes and new features in 3rd-party libraries without creating a fork. However, it's limited in that each package can have only one monolithic patch file. This makes it difficult to keep track of separate changes in a 3rd-party package, which is one of the reasons we've opted for forks in the past. You can track pull requests in the fork in parallel with their upstream equivalent and use that to reconcile all the custom changes we've made to a 3rd-party dependency. This also helps indicate when our code has landed upstream and the fork/patch is no longer needed.
Solution
Upgrade patch-package to support multiple patch files per dependency. To ground this with an example, let's say we wanted to patch an image bug in React Native, and also wanted to build a new feature in the TextInput component.
For each of these features, we could have a separate patch file for each patch, and those patches would be applied in sequence:
patches/react-native+0.72.0+ImageBug.patch
patches/react-native+0.72.0+TextInputFeature.patch

We could have a separate PR in E/App to introduce each of these patches, and those PRs would link to their upstream equivalent.
Furthermore, we should have error reporting on a per-patch basis, and a way to resolve conflicts in specific patches while upgrading the base version.
Additional context

Original slack thread
Upstream issue
Accounting note: Time spent on this should be considered R&D from a CAP SW perspective.

@shannonmccallexfy I'm assigning you here so that you can help make sure this project gets counted as CAP SW. I guess the Accounting auto-assigner doesn't work in E/App

Hi! 👋🏼 I'm David Sheldrick, the author of patch-package.
I had a call with @roryabraham a couple of days ago to hash out a prospective scope for this feature. He asked me to write up the following proposal:
Scope
The project can broadly be broken down into three core features:

Patch sequence application.
This would give the ability to load and apply multiple ordered patches to a single package, and for patch-package to convey to the user which patches failed, if any, during application. This would work the same way as cherry-picking a series of commits in git. The patch files should support semantic descriptions in the filenames, and might look something like:
patches/react-native+0.72.0+01.ImageBug.patch
patches/react-native+0.72.0+02.TextInputFeature.patch

patch-package will attempt to apply all patches, even if one at the start or in the middle of the sequence fails to apply. And it will not leave merge conflicts in files. This matches the current single-patch behavior.

Patch sequence generation.
This would give the ability to generate a new patch file on top of existing patch files, and to amend the 'latest' patch file. This would be achieved with an extra cli option, e.g.:

patch-package react-native --append 'FixPressableEventDispatch' to generate a new patch file with any extra changes added on top of existing patches.
It would create a patch file named something like
patches/react-native+0.72.0+03.FixPressableEventDispatch.patch

patch-package react-native to amend the latest patch file (this syntax mimics the current patch generation behavior)

The existing workflow of simply editing the relevant files inside node_modules and running patch-package to generate the patch file, whether to amend or append, would remain unchanged.

Error recovery via --rebase
Let's say you have a sequence of five patches for react-native which build on one another. If the second patch in the sequence fails to apply after upgrading react-native, but you don't want to simply delete it, you should be given the opportunity to resolve the merge conflicts manually. patch-package can enable this by allowing you to run a command like
patch-package react-native --rebase

Which will

Undo any patches that were previously successfully applied
Re-apply the patches in order until one of them fails
Insert merge conflict markers into any files where conflicts were detected, as git does during merge/rebase.
Print a list of the files with conflicts, and the name of the patch that caused them.
Allow you to run patch-package react-native --rebase-continue to update the failing patch with the resolved changes and continue the rebase.

All features will have appropriate unit and integration tests, in line with the existing patch-package codebase.
Integration with existing patch-package features
The --create-issue flag will not be supported.
The .dev.patch patch file suffix will be supported. This allows patch files created for transitive dev dependencies to be safely ignored if the package is not present in node_modules.
Budget allocation
The total budget for this project is $20,000, and I'd propose allocating it between two milestones as follows

Patch sequence application + generation: $15,000
These two features are the bulk of the work, and it doesn't make sense to ship one without the other so I'd propose combining them.
Error recovery via --rebase: $5,000

This would include a two-month period of asynchronous support + bug fixing while you battle-test the features, starting on the day of final delivery of milestone 2. I can also provide up to 2 hours of synchronous zoom support in the EST time zone over the same two-month period if needed, scheduled ad-hoc and subject to availability.
Timeline
I expect to work on this in 1–2-hour chunks over the period of a month or so. I'll be working on it in my spare time during the height of summer so I can't commit to a fixed timeline, but I believe it's a realistic estimate. I'm obviously happy to keep you updated on my progress on a regular schedule (e.g. on Mondays and Thursdays, or whatever works for you), and I'll do the work in the open on the patch-package repo so you can follow along.
Payment method
If convenient you can pay me via one-time GitHub sponsors donations, which I already have set up on the patch-package repo. Otherwise Rory mentioned that you normally use Upwork, which I am happy to register for.
Thanks,
David

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~015445808e5ddd1173

Patch sequence generation.

@ds300 What if you want to edit a specific patch file rather than the latest one? Maybe there should be three options:

npx patch-package my-package – creates a new patch file if one does not exist, or edits the latest patch if one does exist
npx patch-package my-package --append 'PatchName' – creates a new patch file to be applied after any existing patch files
npx patch-package my-package --update 'PatchName' – looks for any patch file matching PatchName. Fails if no such file exists, otherwise it overwrites that specific patch file.

The use-case for that might be that you introduced a patch associated with an upstream PR, but then you make changes to the upstream and want to apply the same changes to your patch. Rather than creating a second patch associated with the same upstream PR, you would update the existing one.

Integration with existing patch-package features

👍🏼 to both of the items there.

Overall, super excited for this feature, and thrilled that you're ready to build it for us and the whole community. I've assigned this issue to you, which means that we agree to your proposed scope and budget and you can start work whenever you're ready. Thanks! 🙇🏼

First Monday check-in! 🕐
I haven't broken ground yet, planning to get started tonight after dinner.

What if you want to edit a specific patch file rather than the latest one?

I think this would have to be part of the rebase tool, in order to make sure that it works for patches that build on one another sequentially.
Just like git's rebase it could target a particular patch file in the 'history' and roll back to that point.
patch-package react-native --rebase 'PatchName'

When you're done --rebase-continue would update the patch file you specified and then re-apply any subsequent patches.

The works is happening in this PR https://github.com/ds300/patch-package/pull/474

Thanks for the help with this @ds300 , I'll be managing payment.  Our normal process is to issue payment 7 days after PRs hit production, to ensure their aren't any regressions.  I'm unsure if that makes sense here though. Once we get closer to completion we'll discuss payment options, it'd be great to minimize any fees you might have to pay.

Thursday check-in! 🕐
I have finished an initial implementation of patch sequence application and have done some testing for it. It seems to work well but in order to make it usable for patch generation and rebase it will need to be refactored to decouple the patch application bits from the error handling and console logging bits.
I plan to get started on that on Saturday morning.

Monday check-in! 🕐
I got an initial implementation of patch sequence generation working. I need to improve the error reporting a little and do some more integration testing for it. After that I'll do some QA on different OSes, node versions, and package managers. After which I'll merge this PR and ping you. Probably some time later this week. Then I'll get started on the rebase feature.
I published a canary release of this branch on npm. You can do npm install patch-package@canary to try out the --append flag.

No changes since Monday. I expect i'll be able to work on it next on Monday

Monday check-in! 🕐
I did some manual testing on all three platforms, then added and tested some sanity checks. I published a new canary and will merge the PR soon to begin work on the --rebase feature.

Nothing to report today. I'm planning to get started on --rebase on Saturday morning.

Thanks for the consistent updates @ds300!

Monday update 🕐 !
tldr; ran into some unexpected complexity with patch sequence application. It is resolved now.
While sitting down on Saturday to review the current state of the work and plan the --rebase feature I noticed that the new sequenced patch application code was no longer idempotent, and indeed would fail on subsequent attempts if patches build on top of one another in overlapping regions of code.
The patch application idempotency has so far been achieved by the following algorithm:
try to apply patch
  if successful, we're done
  if not successful:
    reverse the patch and see whether it applies (do a dry run)
      if it does the patch was already applied
      if it does not the patch is corrupt or outdated

With a sequence of patches, doing it in this fashion (i.e. trying to 'dryly' apply the sequence backwards) would introduce a good bit of extra complexity.
Also, while thinking about the --rebase feature I realised it would require storing some state on disk the same way git does. So I opted to store a 'state' file already, in the patched package directory, e.g. node_modules/react-native/.patch-package.json which records the hashes of any applied patches the last time patch-package ran. It now checks the state file and the current patch file hashes to see whether or not it needs to run again.
We still use the old algo above if there is only one patch to apply, since it is battle-tested and naturally more robust due to being stateless.
I just finished this off and am now planning to get started on --rebase in earnest tomorrow. I have the day off on Wednesday and I'm planning to get the feature alpha testable by the end of the week.
I also just published a new canary with the idempotency fix.

FWIW it looks like we are going to take a stab at using this feature tomorrow. So @fabioh8010 if you have any feedback on the feature feel free to leave it here

Hi 👋 I was able to use the append feature in this canary version 🎉 . I have one question, in case I want to "edit" a specific patch or the last one, is it possible to do it? I wonder if it's the case for the rebase option which is being developed, but I would want to confirm. Thanks!

@fabioh8010 that's great news! 🎉

I have one question, in case I want to "edit" a specific patch or the last one, is it possible to do it?

It's currently possible to edit only the last patch, by making changes inside node_modules and running patch-package react-native.
The --rebase feature will allow you to edit any of the previous patches, or insert a new patch into the sequence.
🕐 I have nearly finished implementing an initial version of --rebase. I expect to release it in a canary tonight or tomorrow night. I will post here when it's available.

I just published a new canary with an initial version of the --rebase feature.
It still needs some edge case handling and testing but I think the bones are good now. Here's how it works:
Updating an earlier patch
Let's say you have three patch files

patches/react-native+0.72.0+001+FixPressableDispatch.patch
patches/react-native+0.72.0+002+FixTextSelection.patch
patches/react-native+0.72.0+003+FixDatePicker.patch

If you want to update the middle one, you can run
patch-package react-native --rebase patches/react-native+0.72.0+002+FixTextSelection.patch

This will undo the 003+FixDatePicker patch. From that point, you can make any changes you need to inside node_modules/react-native and when you are finished, you can run.
patch-package react-native

This will update the 002+FixTextSelection patch file with your changes, then re-apply the 003+FixDatePicker on top.
Inserting a new patch into the sequence
Again, let's say you have the same three patch files, and you want to add a new one after 001+FixPressableDispatch.

patches/react-native+0.72.0+001+FixPressableDispatch.patch
New one will go here
patches/react-native+0.72.0+002+FixTextSelection.patch
patches/react-native+0.72.0+003+FixDatePicker.patch

You can run
patch-package react-native --rebase patches/react-native+0.72.0+001+FixPressableDispatch.patch

This will undo the 003+FixDatePicker and 002+FixTextSelection patches.
You are then free to make any changes you like inside node_modules/react-native. When you are done and you want to create the new patch file you can run:
patch-package react-native --append 'FixTextRendering'

This will

create a new file called patches/react-native+0.72.0+002+FixTextRendering.patch
rename the 002+FixTextSelection and 003+FixDatePicker patches to 003+FixTextSelection and 004+FixDatePicker respectively
re-apply the 003+FixTextSelection and 004+FixDatePicker patches.

If you want to insert a patch at the start of the sequence you should be able to do patch-package react-native --rebase 0, though I haven't tested this yet.
Let me know if you have any questions.

Hi @ds300 Thanks for your explanation and work on this feature!
Today I came across another situation where I had to remove the last patch applied to the library. I have 3 patches applied to the react-native library:

react-native+0.72.1+001+initial.patch
react-native+0.72.1+002+NumberOfLines.patch
react-native+0.72.1+003+VerticalScrollBarPosition.patch

I tried removing the last file and running npm install, but I got this kind of error:
TypeError: Cannot read properties of undefined (reading 'patchFilename')
    at Object.applyPatchesForApp (/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/patch-package/dist/applyPatches.js:75:102)
    at Object.<anonymous> (/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/patch-package/dist/index.js:77:24)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/patch-package/index.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)

So, I ended up having to remove the object related to react-native+0.72.1+003+VerticalScrollBarPosition.patch in node_modules/react-native/.patch-package.json to get rid of this error.
{
  "version": 0,
  "patches": [
    {
      "patchFilename": "react-native+0.72.1+001+initial.patch",
      "patchContentHash": "c3dfb880c7386f6dfdcedb1a53453a6a1035208055462649a0b85b36e101c9c5",
      "didApply": true
    },
    {
      "patchFilename": "react-native+0.72.1+002+NumberOfLines.patch",
      "patchContentHash": "52e9be0f3e318e39921ddb8e60ef742d37950e228cf8c51c221ca00b5ca9065d",
      "didApply": true
    },
    { // <- I removed this object
      "patchFilename": "react-native+0.72.1+003+VerticalScrollBarPosition.patch",
      "patchContentHash": "d69af356dee71cd82b863995ca79f43ae0b2461ce9b74eeb00e6ca8cce240cd6",
      "didApply": true
    }
  ]
}

@fabioh8010 thanks for the bug report.
When removing a patch file you should reinstall node_modules from scratch rather than merely running npm install. Looks like I need to add extra integrity checks to the state file handling logic to let people know this fact.

Apologies for missing the check-in yesterday.
No changes since Friday. I'm aiming to reach beta for this feature by the end of the week. All that remains is adding and testing some edge cases for the --rebase flow, and then writing some docs.

@ds300 that's great news!

Monday Update!

I also need to add support for optionally inserting conflict markers when a patch fails so I'm planning to do that tonight or on Saturday.

It turns out this isn't easily doable. Git can do it because it has knowledge of the full history of the file in both branches being merged, while we only have one side of that history in our patch files. We could theoretically download previous versions of the package and figure out diffs from that but it'd be a lot more work than I bargained for.
As a simple alternative I can make it apply as many hunks as it can, while writing a log of the hunks that failed to apply (along with clickable links to the relevant files). This should make it a bit easier to reapply the failing hunks manually.
What do you think?

That sounds like a pretty good alternative to me 👍🏼

Thursday update! Hopefully for the last time! 🤞🏼
I added a --partial option which does the thing I described above, along with tests and docs.
I just released a new major version with this feature, 8.0.0.
What's the situation on your end regarding testing/adoption?

@roryabraham any update from your side?

We have started using the feature in production! @fabioh8010 I know you mentioned you have some minor feedback on the feature, can you leave that feedback here please?
That said, I think the remaining issues are minor and we can issue payment for this task. @ds300, thanks so much for working on this! 🚀

@mallenexpensify @ds300 can you work together to complete the payment for this issue please?

Hi @ds300 ! Yes, yesterday I used the 8.0.0 release and noticed 2 minor things, I will create each one in separate messages.

Strange behaviors when we have multi-patch files version mismatch
I've upgraded RN to 0.72.3 and when running npm install I got some repeated messages about the patch file version mismatch.
><EMAIL_ADDRESS>postinstall
> scripts/postInstall.sh

patch-package 8.0.0
Applying patches...
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>(1 initial) ✔
<EMAIL_ADDRESS>(2 NumberOfLines) ✔
<EMAIL_ADDRESS>(3 VerticalScrollBarPosition) ✔
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>✔
<EMAIL_ADDRESS>✔

Warning: patch-package detected a patch file version mismatch

  Don't worry! This is probably fine. The patch was still applied
  successfully. Here's the deets:

  Patch file created for

<EMAIL_ADDRESS>
  applied to

<EMAIL_ADDRESS>
  At path

    node_modules/react-native

  This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package react-native

  to update the version in the patch file name and make this warning go away.

Warning: patch-package detected a patch file version mismatch

  Don't worry! This is probably fine. The patch was still applied
  successfully. Here's the deets:

  Patch file created for

<EMAIL_ADDRESS>
  applied to

<EMAIL_ADDRESS>
  At path

    node_modules/react-native

  This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package react-native

  to update the version in the patch file name and make this warning go away.

Warning: patch-package detected a patch file version mismatch

  Don't worry! This is probably fine. The patch was still applied
  successfully. Here's the deets:

  Patch file created for

<EMAIL_ADDRESS>
  applied to

<EMAIL_ADDRESS>
  At path

    node_modules/react-native

  This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package react-native

  to update the version in the patch file name and make this warning go away.

---
patch-package finished with 3 warning(s).

up to date, audited 47 packages in 494ms

4 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

added 3960 packages, and audited 3961 packages in 1m

398 packages are looking for funding
  run `npm fund` for details

43 vulnerabilities (15 moderate, 25 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
~/Documents/Work/Callstack/Projects/Expensify/expensify-app-rn-update (feature/rn-update-0.72.3) $

As you can see I got three equal warnings about the mismatch with the same instructions to fix it.
When running npx patch-package react-native, instead of renaming my patch files it created a new one based on the last patch file.
~/Documents/Work/Callstack/Projects/Expensify/expensify-app-rn-update (feature/rn-update-0.72.3) $ npx patch-package react-native
patch-package 8.0.0
• Creating temporary folder
• Installing<EMAIL_ADDRESS>with npm
• Diffing your files with clean files
✔ Created file patches/react-native+0.72.3+003+VerticalScrollBarPosition.patch

~/Documents/Work/Callstack/Projects/Expensify/expensify-app-rn-update (feature/rn-update-0.72.3) $

So I ended up having a corrupt multi-patch setup:

To fix it I had to delete node_modules and rename the patch files manually.

Sorry @roryabraham and @ds300 , I was outta commission for a couple weeks.
@roryabraham can you please confirm the payment is $20k? I'm basing it on this post
Has payment method been discussed? @ds300 do you preferences?
Bumping to daily to expedite til paid

@mallenexpensify thanks for picking this up! upwork.com seems like the best payment option for me.
@fabioh8010 that's really useful feedback thanks. I'll plan to fix those issues soon and will report back here.

@mallenexpensify @roryabraham can we get this moving again?

Hey hey sorry for the delay. Yes @mallenexpensify $20,000 was discussed and agreed upon by both parties. internal slack context

@shannonmccallexfy heads-up that this should be coded as R&D

@ds300 , can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~0126b304cc4c67a455
Can you also include a screenshot of your Upwork profile to ensure I'm paying the right person?
Thanks

this is my upwork profile

Proposal
Please re-state the problem that we are trying to solve in this issue.
extending patch-package to support multiple patches for the same package. This will allow users to apply and manage multiple patches to a single package in a straightforward and organized manner. Key features of the proposed solution include:
What is the root cause of that problem?
the implementation of multi-patch support in patch-package is the increasing complexity of modern software projects and the need for more granular and organized management of patches
What changes do you think we should make in order to solve the problem?
To implement multi-patch support in patch-package, the following technical steps should be taken:
Directory Structure: Create a dedicated directory structure within the project to store multiple patches for each package. For example:
patches/

	package-name/

		patch1.diff

			patch2.diff

Command-Line Interface (CLI): Extend the patch-package CLI to include commands for applying, listing, and removing multiple patches for a package.
Patch Ordering: Implement logic to apply patches in the specified order, ensuring that each patch is applied relative to the package's original state.
Version Compatibility: Develop a mechanism to ensure that patches are compatible with different package versions and prevent conflicts when applying patches to packages with varying codebases.
Documentation: Update the patch-package documentation to reflect the new multi-patch functionality, providing clear instructions on how to use it effectively.
Testing: Create comprehensive unit tests and integration tests to verify the functionality of multi-patch support and ensure backward compatibility with existing single-patch use cases.
What alternative solutions did you explore? (Optional)
None.

@ds300 the plan is:

Pay $12,000 USD (max allowable) for a sponsorship via https://github.com/sponsors/ds300
Pay $8,000 USD balance via GH sponsorship (assuming I'm able to after the initial payment)

That sound good? I should be able to handle this week, I'm waiting for my card limit to be raised

Works for me, thanks @mallenexpensify 🙏🏼

@ds300 , I've checked with out accounting team and we need to pay you through Expensify.
Contributor: @ds300 is due $20,000 via Expensify NewDot.
@JmillsExpensify and/or @anmurali can you please issue payment?  What are the steps @ds300 needs to do in order to receive payment, it looks like he's in the UK.

@mallenexpensify Can you add him to the Contributor Payments workspace owned by<EMAIL_ADDRESS>Then he'll need to Request money in his policyExpenseChat.

Thanks @JmillsExpensify I've added @ds300 via their gmail address we've communicated through before. I send these steps, let me know if anything doesn't look correct

Big Green Plus button
Request Money
Manual > Amount ($20,000)
<EMAIL_ADDRESS>Enter https://github.com/Expensify/App/issues/20770 into description

Anyone know what the best payment setup is for someone in the UK?  Wise? Can we do direct transfer/payment to a bank account there?

Posted question in slack here

Please make sure you have added them to the Global Reimbursements beta though and to the Expensify Contributors (Collect) workspace in OD as well as Expensify Contributors workspace in ND
Please make sure they have their default workspace set to the Expensify Contributors (Collect) policy on Old Dot before going to the next step
Instructions for a contributor plus to add their deposit bank account to get paid is here
Instructions for a contributor plus to request a payment is here

Anyone know what the best payment setup is for someone in the UK? Wise? Can we do direct transfer/payment to a bank account there?
They can add their UK bank account or a Wise account, it's their call.

I've been in touch with @ds300 and provided details. Once I've confirmed @ds300 is setup I'll comment here for payment.
I've updated internal documentation in this SO

Contributor: @ds300 is due $20,000 via NewDot.
@ds300 please confirm you've followed the steps to request payment that I sent you via email.

$20,000 payment approved via NewDot based on BZ summary.

@ds300 please confirm you've followed the steps to request payment that I sent you via email.

I confirm

Thanks @ds300.  Can you comment once you've received the payment then I'll close this.

I just received a notification saying that an ACH direct deposit was made, and I should have the money by Oct 4th.
Will post an update here once it's gone through.

The payment went through! Thanks for figuring this out @mallenexpensify and @roryabraham. It's been a pleasure to work with you both.

Great news, thanks for building this awesome feature for us. I hope the open-source community finds it as valuable as we do!

Thanks @ds300 , glad everything worked out!


Unable to change Font Color

Hi There,
Once again a big thanks for the plugin and the regular updates.
I am finding a feature missing that I required the BG color option is available but the font color change option is not available.
Can this be implemented,
The reason is when I change my BG to blend it with the original color which is dark bluest black on the top bar, I cannot see the font or the font is not visible anymore as the default font is black, so when I wanted to change to the white font I am not getting that options.
I am attaching the screenshot for your reference highlighted in red marker.

It would be very much great if that feature is added, thanks in advance
Thanks
Sam

Hi
i am using firefox and SSO and and it is nor working

AWS just did a major revamp of their console, which sucks :'( hope this extension can get ahead of it :).  Might be time for us to chip in on how good it is :)

reverted to adjust the font color against the specified background-color at v2.0.4


docs: Update CONCEPTS.md

 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.

LGTM


No nodes after installing

Hi, i've installed huemagic, but nothing shows in the flow designer.
This is on windows
npm 2.15.9
node 4.6.1
After restarting node-red, i see this in the logfile
9 Sep 03:40:29 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
19 Sep 03:40:29 - [warn] [tail] Not currently supported on Windows.
19 Sep 03:40:29 - [warn] [hue-bridge] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-light] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-group] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-scene] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-motion] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-temperature] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
19 Sep 03:40:29 - [warn] [hue-brightness] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Sorry for the inconveniences… I just released v1.1.1 of HueMagic which should fix this kind of errors/warns on your Node.js environment. For now I will close this issue. If you still have problems after the update please open a new issue thread. Thanks!


XDG Specification

Follow XDG specs and read the config file in the following order:

$XDG_CONFIG_HOME/rtv/rtv.conf
~/.config/rtv/rtv.conf (in case XDG_CONFIG_HOME is not set)
.rtv (for compatibility reasons)

What about "config" as a filename?

Sure, the name of the file is not specified by XDG, so anything sensible is fine.
Since configparsers format is very similar to INI, rtv.ini would also be appropriate.

I'm open to a pull request for this


Google Tag Manager - Fixed dependencies

Fixed dependencies.

Hello! I'm the build bot for the Mono project.
I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done.
Contributors can ignore this message.


Fix: undefined files

When a Cypress test fails, it will automatically generate a screenshot of the test runner with a file path like "cypress/screenshots/<spec_file>/<test_name> (failed).png". cypress-image-diff should not touch these screenshots (i.e. don't copy them over to cypress-visual-screenshots) because they are unrelated to this plugin.
Fortunately, it's easy to filter for these screenshots in the after:screenshot event because they have a property testFailure: true, e.g.
on('after:screenshot', details => {

console.log(details);

// {
//   testAttemptIndex: 0,
//   size: 45868,
//   takenAt: '2022-01-03T00:02:24.148Z',
//   dimensions: { width: 1280, height: 720 },
//   multipart: false,
//   specName: 'image-diff-spec.js',
//   testFailure: true,
//   path: '/code/cypress/screenshots/image-diff-spec.js/Visuals -- should compare screenshot of the entire page (failed).png',
//   scaled: true,
//   blackout: [],
//   duration: 120
// }

}

Let me have a think about this... the only problem I can see is that if people use this plugin alongside with their other test suite setup, it would stop generating failed screenshots for normal tests

I think the author of PR have in mind that cypress-image-diff copies failing screenshot into cypress-visual-screenshots->comparison with "undefined.png" name.

paramter is set:
"env": {
"preserveOriginalScreenshot": true
}

I have tried using "preserveOriginalScreenshot": true but the result is the same. The screenshot for the failed test is moved to the cypress-visual-screenshots folder as undefined.png. This is breaking our integration with Cypress Dashboard.
What is preventing this PR from being merged? It seems perfectly valid 😕 If you have concerns about this @PippoRaimondi, we could hide this behind a flag on Cypress.json. Therefore, only those who really need it (like us) can use it and nothing will break for anyone else.

Hello ! Can we please do something to merge this PR, it is breaking my cypress dashboard as well. Have you guys found a workaround do it without having to merge this PR ?

Took me a while to thoroughly test this. I am finally merging, apologies for the delay @DavicVictor & @pjanaya ...
Thanks a lot for the contribution @narinluangrath

actually, @narinluangrath can you please rebase? if not I would need to create a new PR so it triggers the pipeline...

actually, @narinluangrath can you please rebase? if not I would need to create a new PR so it triggers the pipeline...

Will do after I'm off working hours (5pm PST)!

@PippoRaimondi I accidentally merged instead of rebasing. Looks like it triggered the pipeline. Let me know if you really need a rebase.


Top level Documentation field is not represented in the sent out schema

Description

avro and the generated .cs file is equivalent.
after the serialization of the root class, the top level "doc" field disappear from Schema field of the serialized object.

Schema Field in the generated .cs class:
public static Schema _SCHEMA = Avro.Schema.Parse("{"type":"record","name":"realTime",**"doc":"Version: [4]." +" prediction"**,"namespace":...
Schema field in the sent out object:
Schema	{{"type":"record","name":"realTime","namespace"....
Where is the top level DOC field?
How to reproduce
Checklist
Please provide the following information:

[ ] A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
[<IP_ADDRESS> ] Confluent.Kafka nuget version.
[ ] Apache Kafka version.
[ ] Client configuration.
[ windows] Operating system.
[ ] Provide logs (with "debug" : "..." as necessary in configuration).
[ ] Provide broker log excerpts.
[ ] Critical issue.

Read comments above.

this is already in v1.9.0-RC10


Encryption result is different on Android and IOS

Hello,
I am using this library in my android project and its counter part https://github.com/Gurpartap/aescrypt in ios project. I am encrypting same text with same encryption key, but it is giving me different results on ios and android.
I am using this key : 25c35734b1ef623ca2a7f730cf2fea8b790739ba
String to encrypt is : Password
Encrypted String IOS : W3LyAxKq2+QdDBfKUGVgTg==
Encrypted String Android : zdgSimKva1jblici7F8DGw==

Hi,
I am getting same issue with library as it is not generating same result as iOS.What needs to do to get similar result as iOS.

Hi, I can look into it.
Can you post the IV used by you in Android as well as iOS as iOS directly doesn't take blank IV

in IOS I am using below function :

(NSData *)doCipher:(NSData *)plainText key:(NSData *)aSymmetricKey
context:(CCOperation)encryptOrDecrypt padding:(CCOptions *)pkcs7{
CCCryptorStatus ccStatus = kCCSuccess;
// Symmetric crypto reference.
CCCryptorRef thisEncipher = NULL;
// Cipher Text container.
NSData * cipherOrPlainText = nil;
// Pointer to output buffer.
uint8_t * bufferPtr = NULL;
// Total size of the buffer.
size_t bufferPtrSize = 0;
// Remaining bytes to be performed on.
size_t remainingBytes = 0;
// Number of bytes moved to buffer.
size_t movedBytes = 0;
// Length of plainText buffer.
size_t plainTextBufferSize = 0;
// Placeholder for total written.
size_t totalBytesWritten = 0;
// A friendly helper pointer.
uint8_t * ptr;
// Initialization vector; dummy in this case 0's.
uint8_t iv[kChosenCipherBlockSize];
memset((void *) iv, 0x0, (size_t) sizeof(iv));
//  //NSLog(@"doCipher: plaintext: %@", plainText);
//  //NSLog(@"doCipher: key length: %d", [aSymmetricKey length]);
plainTextBufferSize = [plainText length];
if(encryptOrDecrypt == kCCEncrypt) {
if(*pkcs7 != kCCOptionECBMode) {
if((plainTextBufferSize % kChosenCipherBlockSize) == 0) {
*pkcs7 = 0x0000;
} else {
*pkcs7 = kCCOptionPKCS7Padding;
}
}
} else if(encryptOrDecrypt != kCCDecrypt) {
//NSLog(@"Invalid CCOperation parameter [%d] for cipher context.", *pkcs7 );
}
// Create and Initialize the crypto reference.
ccStatus = CCCryptorCreate(encryptOrDecrypt,
kCCAlgorithmAES128,
*pkcs7,
(const void *)[aSymmetricKey bytes],
kChosenCipherKeySize,
(const void *)iv,
&thisEncipher
);
//LOGGING_FACILITY1( ccStatus == kCCSuccess, @"Problem creating the context, ccStatus == %d.", ccStatus );
// Calculate byte block alignment for all calls through to and including final.
bufferPtrSize = CCCryptorGetOutputLength(thisEncipher, plainTextBufferSize, true);
// Allocate buffer.
bufferPtr = malloc( bufferPtrSize * sizeof(uint8_t) );
// Zero out buffer.
memset((void *)bufferPtr, 0x0, bufferPtrSize);
// Initialize some necessary book keeping.
ptr = bufferPtr;
// Set up initial size.
remainingBytes = bufferPtrSize;
// Actually perform the encryption or decryption.
ccStatus = CCCryptorUpdate(thisEncipher,
(const void *) [plainText bytes],
plainTextBufferSize,
ptr,
remainingBytes,
&movedBytes
);
//LOGGING_FACILITY1( ccStatus == kCCSuccess, @"Problem with CCCryptorUpdate, ccStatus == %d.", ccStatus );
// Handle book keeping.
ptr += movedBytes;
remainingBytes -= movedBytes;
totalBytesWritten += movedBytes;
/* From CommonCryptor.h:
@enum      CCCryptorStatus
@abstract  Return values from CommonCryptor operations.
@constant  kCCSuccess          Operation completed normally.
@constant  kCCParamError       Illegal parameter value.
@constant  kCCBufferTooSmall   Insufficent buffer provided for specified operation.
@constant  kCCMemoryFailure    Memory allocation failure.
@constant  kCCAlignmentError   Input size was not aligned properly.
@constant  kCCDecodeError      Input data did not decode or decrypt properly.
@constant  kCCUnimplemented    Function not implemented for the current algorithm.
enum {
kCCSuccess          = 0,
kCCParamError       = -4300,
kCCBufferTooSmall   = -4301,
kCCMemoryFailure    = -4302,
kCCAlignmentError   = -4303,
kCCDecodeError      = -4304,
kCCUnimplemented    = -4305
};
typedef int32_t CCCryptorStatus;
*/
// Finalize everything to the output buffer.
ccStatus = CCCryptorFinal(thisEncipher,
ptr,
remainingBytes,
&movedBytes
);
totalBytesWritten += movedBytes;
if(thisEncipher) {
(void) CCCryptorRelease(thisEncipher);
thisEncipher = NULL;
}
//LOGGING_FACILITY1( ccStatus == kCCSuccess, @"Problem with encipherment ccStatus == %d", ccStatus );
if (ccStatus == kCCSuccess)
cipherOrPlainText = [NSData dataWithBytes:(const void *)bufferPtr length:(NSUInteger)totalBytesWritten];
else
cipherOrPlainText = nil;
if(bufferPtr) free(bufferPtr);
return cipherOrPlainText;

}
Android :- byte[] ivBytes = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


Read chaincfg.Params from Config

This PR allows the user to supply a target BTC network at Extensions.TBTC.BTCRefunds.ChainName in the configuration. If none is supplied, we default to the main network.
tagging @nkuba for review!

alrighty - good for another pass


Capture tool - capture/download image size changes with dismiss aspect + show annotations unchecked

Describe the Bug
the size of the capture/download changes when using the dismiss aspect + uncheck annotation
Steps to Reproduce
This was found in both of the following environments:
https://viewer.ohif.org/ - version 3.7.0
https://viewer-dev.ohif.org/ - version 3.8.0-beta.21

From the viewer screen, use the length tool to create a measurement
select the Capture tool
in the capture window enter a file name
click on the dismiss aspect icon and change the width = 300 & height = 600
You will see the image in the Image Preview and the size of the image -click on the Download button
Then, go back to the same capture tool window &  uncheck the 'show annotation' checkbox
In the Image Preview the image instantly gets smaller - click on the Download button
Compare the 2 downloads and you will see that they are different sizes. But, the size info did not change - the only change was the Show Annotation

The current behavior
the image capture size is changing with 'dismiss aspect' + uncheck show annotation
The expected behavior
the size of the capture/download should be the same if you have 'show annotation' checked or not
OS
MacBook Pro - Sonoma 14.1.1
Node version
unknown
Browser
Chrome v119

Thanks for the reproducible steps.
I think the second image is the correct image actually for download, the first one was cropped. What do you think?

Yes @sedghi - the second image is the correct image

I think this requires just a render on the viewport after the size changed

@jbocce could you take a look and update estimate? Reach out to me/Terri if you need more detail


Change spring session columns to use bigint instead of datetime

Related Issue or Background Info

Spring is expecting all the date columns to use bigints, rather than datetime values. This change adds a new liquibase changeset to do the conversion. There shouldn't be any existing data in the spring_session table, so this change should be a no-op.
This is the table Spring expects: https://github.com/spring-projects/spring-session/blob/main/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-postgresql.sql#L4

Checklist for Author and Reviewer
UI

[x] Any changes to the UI/UX have been approved by design
[x] Any new or edited error messages have been approved by design

Testing

[x] Includes a summary of what a code reviewer should verify

Changes are Backwards Compatible

[x] Database changes are submitted as a separate PR
[x] GraphQL schema changes are backward compatible with older version of the front-end

Security

[ ] Changes with security implications have been approved by a security engineer (changes to  authentication, encryption, handling of PII, etc.)
[ ] Any dependencies introduced have been vetted and discussed

Cloud

[ ] DevOps team has been notified if PR requires ops support

Including the URL for the upstream version was nice, though! Maybe as a YAML comment instead?


feat(transformer): do not transform ** with bigint literals

part of #5822
They will produce runtime errors.

#6023  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Boshen and the rest of your teammates on  Graphite


Add dt.date to plottable types

Simply adds datetime.date to plottable types in _ensure_plottable in plot/utils.pyL675 to enable the plotting of dates.
Matplotlib handles date types automatically, so I think there is no other change needed.
Do I need to add a test for this? Any pointers on where I would put it that?

[x] Closes #8866
[x] Tests added
[x] User visible changes (including notable bug fixes) are documented in whats-new.rst
[x] New functions/methods are listed in api.rst

Could you add a test in https://github.com/pydata/xarray/blob/main/xarray/tests/test_plot.py so we don't regress?

Sure! Shall I just check whether it plots ? Something like this test_datetime_dimension in L612 just with a date dimension?

I added the test_date_dimension plot, I saw that there is a whole TestDatetimePlot class. Should I add an equivalent or even refactor it so I only need to change the self.darray? Or is it fine with a single test?

Quick question: Would it be worth it ungitignore your .vscode folder?


Waterline afterDestroy callback never called when using blueprint destroy API.

Node version:
v12.14.1
Sails version (sails): 1.2.3
"sails-hook-apianalytics": "^2.0.3",
"sails-hook-organics": "^0.16.0",
"sails-hook-orm": "^2.1.1",
"sails-hook-sockets": "^2.0.0",
"sails-mongo": "^1.0.1",
"sails-postgresql": "^1.0.2",
"sails-hook-grunt": "^4.0.0"

Anytime I create a afterDestroy lifecycle hook on a model, it is not called when model is being destroyed via standard blueprint API http  DELETE /model/id
Exemple model :
`module.exports = {
attributes: {
title: {
type: 'string',
required: true,
description: 'The model title',
maxLength: 1024,
example: 'A real cool model'
},
},
afterCreate : async function(newlyCreatedTuto, proceed) {
console.log("this works");
return proceed();
},
afterDestroy: async function(destroyedRecord, proceed){
console.log("this doesnt work");
return proceed();
}
};`
Sidenote : if it helps, after a bit of inspection here :

It seems "transformedRecordsMaybe" is undefined when using blueprint destroy operation

Any update on this please?

Hi @LouAdrien, thank you for telling us about this issue. We've reproduced it and we're going to look into further. In the meantime we suggest writing a custom action to accomplish what you need to do.

Thanks, it weird though, that's a very basic feature of the framework. Is no one using it?

Any updates on this issue?

Hey @LouAdrien, I was taking another look at this issue using your example posted above and I was seeing afterDestroy run when I used the blueprint destroy API. Are you still seeing this issue?

I am seeing it on sails v1.2.3, maybe this was fixed in between, will try reproducing on the latest version

I am seeing it on sails v1.2.3, maybe this was fixed in between, will try reproducing on the latest version

After checking the releases notes, seems this indeed was fixed in @1.2.4 :) Closing this issue then!

After checking the releases notes, seems this indeed was fixed in @1.2.4 :) Closing this issue then!


💬 RFC: allow fetch template scaffolder action to refer to directory outside of parent

🔖 Need
We are creating some templates that have common functionality. For example, creating a CODEOWNERS file would be common for any template creating a GitHub repository. I want to have a file structure like this:
/templates
  common
    .github
      - CODEOWNERS
  nodejs
    - template.yaml

Then in nodejs/template.yaml I can have the steps:
- id: fetch-common
  name: Fetch Common
  action: fetch:template
  input:
    url: ../common # or '/templates/common'

- id: fetch-base
  name: Fetch Base
  action: fetch:template
  input:
    url: <github url to template content>

Currently this would give an error: NotAllowedError: Relative path is not allowed to refer to a directory outside its parent.  This proposal can give developers more flexibility in how they structure software templates and reduce duplications.
🎉 Proposal
Add config options:
scaffolder:
  dangerouslyAllowRelativePath:
    - entityRef: template:default/create-react-app-template
      path: /template/common

In the template:fetch action it will check if combination of ctx.templateInfo.entityRef and url exists in the config.  If it exists, bypass paths::resolveSafeChildPath and call path::resolve directly. This can be safely enabled in the case where it's guaranteed the url path is constant i.e. not modifiable by user or from untrusted remote source.
〽 Alternatives
Alternative is duplicating common functionality in software template. You could also create a common repository to put these files but this wouldn't play nice with stuff like CODEOWNERS. I also prefer to keep some of this code tied to the main repository.
❌ Risks
Setting dangerouslyAllowRelativePath option and allowing user input to fetch:template url input could open up to security issue. However, this risk is partially mitigated by the naming convention of the option. Developers whom ignore this proceed at their own risk.
👀 Have you spent some time to check if this RFC has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

@stephenglass when you push these templates to GitHub or some VCS provider and using url: locations in the Catalog does it work as expected? Is this only when you're using file: locations or doing things locally?

yes it's only when using file: locations. after reading backstage docs, looks like the recommended way to use templates in prod is using url locations. in this case, I think it makes sense to close this issue as what I'm suggesting isn't a recommended pattern.


Docker image/repository not available

While following the instructions in the README, it seems like the repository does not exist or is private:
✗ docker pull brendanburns/kube-sanity:0.1.0
Error response from daemon: pull access denied for brendanburns/kube-sanity, repository does not exist or may require 'docker login'

argh, sorry, need to push it...

Ok, it's pushed now.  Sorry about that!

@brendandburns No worries, thank you! Nice project!

@brendandburns Hello, it's me again. 😄 I get the same error, tried on multiple machines but it seems like the repo is not available yet....

Argh, sorry there's a typo in the image name, it shouldn't have the dash...
https://hub.docker.com/r/brendanburns/kubesanity/
I'll fix the docs
Sorry!

@brendandburns Thanks! All good now! :)


Getting render errors when trying this library

I'm getting a slew of styled-component errors when I try to render a component created the the system-component helper.
The top level error is:
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Here are the rest of the errors:

I should also mention that i I create a styled component from scratch like so:
const Text = styled.div`
  color: ${props => props.theme.colors.silver};
`

it works just fine.
Here is the output when I render the component created from system-component console.lo('ext', <Text />)

Any tips would be greatly appreciate. Thanks for a great library!

Thanks! Could you include a code snippet of how you're using @rebass/components?

@jxnblk here's the code snippet:
import * as React from 'react'
import system from '@rebass/components'

export const Text = system(
  {
    is: 'p',
    fontSize: 2,
    color: 'near-black',
    fontFamily: 'sansSerif'
  },
  'space',
  'width',
  'textAlign',
  'lineHeight',
  'fontWeight',
  'letterSpacing'
)

console.log('ext', <Text />)

@jxnblk figured it out this morning! I peeked into my package.json and realized that while I did upgrade the react library to the latest version, react-dom was still on v16.0. I upgraded that to @latest and it's now rendering properly! Excited to use this library.


core-data bug

🐞 Bug Report
Affected Services [REQUIRED]

 The issue is located in:
Is this a regression?

 Yes, the previous version in which this bug was not present was: ....
Description and Minimal Reproduction [REQUIRED]
🔥 Exception or Error

🌍  Your Environment
Deployment Environment:
EdgeX Version [REQUIRED]:
Anything else relevant?

I wanna flush redis. I use interface ‘ /event/age/{age}’（core-data,edgex2.1,docker）,but it failed.
When i use this interface(edgex 2.2),it successed.
Will u debug this bug(core-data,edgex2.1,docker).

please write down the clear reproduced steps and fill out all the fields in the issue template, or we can't investigate it

Deployment Environment:
docker
EdgeX Version [REQUIRED]:
jakarta
core-data Version：
image: edgexfoundry/core-data:2.1.0
That is my json request

please write down the clear reproduced steps and fill out all the fields in the issue template
you can edit the description of this issue to fill out all the information
I can't reproduce your issue by your screenshot.  The recreate steps needs to be clear.

@1486756632 , also please give the issue a descriptive title. Thanks!

@cloudxxx8 @lenny-intel Potential candidate for closure due to staleness.

closing this issue due to no activity and unclear description


Update CI actions

Use actions-rs/cargo to run cargo commands
Use actions-rs/toolchain to setup the toolchain

Did someone start maintaining actions-rs again?

Did someone start maintaining actions-rs again?

They have not. That'll be why we don't use them then :man_facepalming:


Ionic commands hangs. Not terminated properly.

Hi,
I use Jenkins to build the Mobile app. But ionic commands hangs and does not terminate.
ionic platform add ios --verbose

ionic build ios --verbose

Because of this Jenkins build takes long time (more than 30mins) and even fails.
But if I use
cordova platform add ios
cordova build ios

build works fine. Takes less than 5 mins.
I have two questions,

Anyone knows reason why ionic commands hangs and not getting terminated properly?
Can I use cordova commands instead of ionic commands?

This is the ionic info:
Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v0.12.18
Xcode version: Xcode 7.2.1 Build version 7C1002
Thank you.

That CLI version is ancient. We're only supporting CLI v3 going forward. If this is still an issue once you upgrade, let me know.

@dwieeb ,
I cannot upgrade for the moment and it takes time to get the dependancies upgraded (e.g. node, cordova, ionic).
Do you think I can use Cordova commands to build until I upgrade to newer version?

@malwatte Is there something that is incompatible? Why can't you upgrade?
Also, yes. For Ionic 1, you should be fine just running the cordova commands.

@dwieeb ,
It is a remote MAC mini.and I do not have permissions to update it. It might take few days to get it updated.
I'll use the Cordova commands for the moment.
Thank you.


Energy API

Industrial Revolution: here
I've observed that

Astromine generators don't send energy to adjacent IR machines.
Astromine cables don't connect to IR blocks.
Astromine generators do connect to IR cables, and send energy correctly.
IR generators/cables do send energy to adjacent Astromine machines.

Well these don't make much sense...

Yes this is because IR is now using a new energy API, which allows IR to see all other machines, but machines/cables from other mods may not "see" IR machines. The fix is to use IR cables whenever it is necessary.

I do not feel like dealing with other energy APIs. We have support for TechReborn Energy, and that's it.

based and taterpilled


Deprecation warning on save action in check-amalgamation CI step

Description
The save step of check-amalgamation.yml shows a deprecation warning.

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Reproduction steps
Run CI.
Expected vs. actual results
Expected: no message
Actual: deprecation message
Minimal code example
No response
Error messages
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Compiler and operating system
CI
Library version
3.11.3
Validation

[X] The bug also occurs if the latest version from the develop branch is used.
[X] I can successfully compile and run the unit tests.

v3 uses Node 16, should be otherwise compatible.

Fixed with #4489 and #4495.


Failed to load 'transformer_onnx_model'

Hi, I am trying to build a dense embedding inference using this repository. When I tried using the model on the example (sentence-transformers/msmarco-distilbert-cos-v5) it worked fine. However, using a different model, even the model from sentence-transformers itself, like sentence-transformers/all-MiniLM-L6-v2, won't run the inference. Here are the full logs:
=============================
== Triton Inference Server ==
=============================

NVIDIA Release 22.07 (build 41737377)
Triton Server Version 2.24.0

Copyright (c) 2018-2022, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

Various files include modifications (c) NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

WARNING: The NVIDIA Driver was not detected.  GPU functionality will not be available.
   Use the NVIDIA Container Toolkit to start this container with GPU support; see
   https://docs.nvidia.com/datacenter/cloud-native/ .

Collecting transformers
  Downloading transformers-4.28.1-py3-none-any.whl (7.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 9.2 MB/s eta 0:00:00
Collecting tqdm>=4.27
  Downloading tqdm-4.65.0-py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 5.8 MB/s eta 0:00:00
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
  Downloading tokenizers-0.13.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 9.4 MB/s eta 0:00:00
Collecting regex!=2019.12.17
  Downloading regex-2023.5.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (771 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 771.9/771.9 kB 8.9 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-23.1-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 3.7 MB/s eta 0:00:00
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from transformers) (2.22.0)
Collecting filelock
  Downloading filelock-3.12.0-py3-none-any.whl (10 kB)
Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (1.23.1)
Collecting huggingface-hub<1.0,>=0.11.0
  Downloading huggingface_hub-0.14.1-py3-none-any.whl (224 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.5/224.5 kB 9.1 MB/s eta 0:00:00
Collecting pyyaml>=5.1
  Downloading PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 701.2/701.2 kB 9.0 MB/s eta 0:00:00
Collecting typing-extensions>=<IP_ADDRESS>
  Downloading typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting fsspec
  Downloading fsspec-2023.4.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 7.4 MB/s eta 0:00:00
Installing collected packages: tokenizers, typing-extensions, tqdm, regex, pyyaml, packaging, fsspec, filelock, huggingface-hub, transformers
Successfully installed filelock-3.12.0 fsspec-2023.4.0 huggingface-hub-0.14.1 packaging-23.1 pyyaml-6.0 regex-2023.5.4 tokenizers-0.13.3 tqdm-4.65.0 transformers-4.28.1 typing-extensions-4.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 177, in emit
    self.console.print(renderable, overflow="ignore", crop=False, style=style)
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1673, in print
    extend(render(renderable, render_options))
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1305, in render
    for render_output in iter_render:
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
    for line in lines:
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
    for segment in segments:
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1283, in render
    renderable = rich_cast(renderable)
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
    renderable = cast_method()
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
    pip_cmd = get_best_invocation_for_this_pip()
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
    if found_executable and os.path.samefile(
  File "/usr/lib/python3.8/genericpath.py", line 101, in samefile
    s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.8'
Call stack:
  File "/usr/local/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    self.handle_pip_version_check(options)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 190, in handle_pip_version_check
    pip_self_version_check(session, options)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 236, in pip_self_version_check
    logger.warning("[present-rich] %s", upgrade_prompt)
  File "/usr/lib/python3.8/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
    self.emit(record)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 179, in emit
    self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.1', new='23.1.2'),)
W0502 22:17:28.840321 1 pinned_memory_manager.cc:236] Unable to allocate pinned system memory, pinned memory pool will not be available: CUDA driver version is insufficient for CUDA runtime version
I0502 22:17:28.840805 1 cuda_memory_manager.cc:115] CUDA memory pool disabled
I0502 22:17:29.264492 1 model_repository_manager.cc:1206] loading: transformer_onnx_tokenize:1
I0502 22:17:29.276594 1 model_repository_manager.cc:1206] loading: transformer_onnx_model:1
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
I0502 22:17:32.401196 1 onnxruntime.cc:2458] TRITONBACKEND_Initialize: onnxruntime
I0502 22:17:32.401275 1 onnxruntime.cc:2468] Triton TRITONBACKEND API version: 1.10
I0502 22:17:32.401310 1 onnxruntime.cc:2474] 'onnxruntime' TRITONBACKEND API version: 1.10
I0502 22:17:32.401328 1 onnxruntime.cc:2504] backend configuration:
{"cmdline":{"auto-complete-config":"true","min-compute-capability":"6.000000","backend-directory":"/opt/tritonserver/backends","default-max-batch-size":"4"}}
I0502 22:17:32.427419 1 onnxruntime.cc:2560] TRITONBACKEND_ModelInitialize: transformer_onnx_model (version 1)
I0502 22:17:32.428538 1 onnxruntime.cc:666] skipping model configuration auto-complete for 'transformer_onnx_model': inputs and outputs already specified
I0502 22:17:32.429336 1 onnxruntime.cc:2603] TRITONBACKEND_ModelInstanceInitialize: transformer_onnx_model_0 (CPU device 0)
I0502 22:17:32.769880 1 onnxruntime.cc:2637] TRITONBACKEND_ModelInstanceFinalize: delete instance state
I0502 22:17:32.769920 1 python_be.cc:1767] TRITONBACKEND_ModelInstanceInitialize: transformer_onnx_tokenize_0 (CPU device 0)
I0502 22:17:32.770159 1 onnxruntime.cc:2583] TRITONBACKEND_ModelFinalize: delete model state
E0502 22:17:32.770347 1 model_repository_manager.cc:1355] failed to load 'transformer_onnx_model' version 1: Invalid argument: model 'transformer_onnx_model', tensor 'output': the model expects 2 dimensions (shape [-1,384]) but the model configuration specifies 2 dimensions (shape [-1,-1])
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
I0502 22:17:34.640107 1 model_repository_manager.cc:1352] successfully loaded 'transformer_onnx_tokenize' version 1
E0502 22:17:34.640456 1 model_repository_manager.cc:1559] Invalid argument: ensemble 'transformer_onnx_inference' depends on 'transformer_onnx_model' which has no loaded version
I0502 22:17:34.640824 1 server.cc:559]
+------------------+------+
| Repository Agent | Path |
+------------------+------+
+------------------+------+

I0502 22:17:34.640909 1 server.cc:586]
+-------------+----------------------------------+----------------------------------+
| Backend     | Path                             | Config                           |
+-------------+----------------------------------+----------------------------------+
| python      | /opt/tritonserver/backends/pytho | {"cmdline":{"auto-complete-confi |
|             | n/libtriton_python.so            | g":"true","min-compute-capabilit |
|             |                                  | y":"6.000000","backend-directory |
|             |                                  | ":"/opt/tritonserver/backends"," |
|             |                                  | default-max-batch-size":"4"}}    |
|             |                                  |                                  |
| onnxruntime | /opt/tritonserver/backends/onnxr | {"cmdline":{"auto-complete-confi |
|             | untime/libtriton_onnxruntime.so  | g":"true","min-compute-capabilit |
|             |                                  | y":"6.000000","backend-directory |
|             |                                  | ":"/opt/tritonserver/backends"," |
|             |                                  | default-max-batch-size":"4"}}    |
|             |                                  |                                  |
+-------------+----------------------------------+----------------------------------+

I0502 22:17:34.641023 1 server.cc:629]
+---------------------------+---------+---------------------------------------------+
| Model                     | Version | Status                                      |
+---------------------------+---------+---------------------------------------------+
| transformer_onnx_model    | 1       | UNAVAILABLE: Invalid argument: model 'trans |
|                           |         | former_onnx_model', tensor 'output': the mo |
|                           |         | del expects 2 dimensions (shape [-1,384]) b |
|                           |         | ut the model configuration specifies 2 dime |
|                           |         | nsions (shape [-1,-1])                      |
| transformer_onnx_tokenize | 1       | READY                                       |
+---------------------------+---------+---------------------------------------------+

I0502 22:17:34.641665 1 tritonserver.cc:2176]
+----------------------------------+------------------------------------------------+
| Option                           | Value                                          |
+----------------------------------+------------------------------------------------+
| server_id                        | triton                                         |
| server_version                   | 2.24.0                                         |
| server_extensions                | classification sequence model_repository model |
|                                  | _repository(unload_dependents) schedule_policy |
|                                  |  model_configuration system_shared_memory cuda |
|                                  | _shared_memory binary_tensor_data statistics t |
|                                  | race                                           |
| model_repository_path[0]         | /models                                        |
| model_control_mode               | MODE_NONE                                      |
| strict_model_config              | 0                                              |
| rate_limit                       | OFF                                            |
| pinned_memory_pool_byte_size     | 268435456                                      |
| response_cache_byte_size         | 0                                              |
| min_supported_compute_capability | 6.0                                            |
| strict_readiness                 | 1                                              |
| exit_timeout                     | 30                                             |
+----------------------------------+------------------------------------------------+

I0502 22:17:34.641753 1 server.cc:260] Waiting for in-flight requests to complete.
I0502 22:17:34.641779 1 server.cc:276] Timeout 30: Found 0 model versions that have in-flight inferences
I0502 22:17:34.641788 1 model_repository_manager.cc:1230] unloading: transformer_onnx_tokenize:1
I0502 22:17:34.641964 1 server.cc:291] All models are stopped, unloading models
I0502 22:17:34.641999 1 server.cc:298] Timeout 30: Found 1 live models and 0 in-flight non-inference requests
I0502 22:17:35.642214 1 server.cc:298] Timeout 29: Found 1 live models and 0 in-flight non-inference requests
I0502 22:17:35.867722 1 model_repository_manager.cc:1335] successfully unloaded 'transformer_onnx_tokenize' version 1
I0502 22:17:36.642586 1 server.cc:298] Timeout 28: Found 0 live models and 0 in-flight non-inference requests
error: creating server: Internal - failed to load all models

I am using a CPU-only device to test it, although I have tried it on a GPU device which also doesn't work. Would you happen to have any idea on how to fix it? here's the command I use:
docker run -it --rm -v $PWD":/project" ghcr.io/els-rd/transformer-deploy:latest bash -c "cd /project && convert_model -m 'sentence-transformers/all-MiniLM-L6-v2' --backend onnx --task embedding --seq-len 16 128 128"

docker run -it --rm -p 8000:8000 -p 8001:8001 -p 8002:8002 -v $PWD/triton_models:/models nvcr.io/nvidia/tritonserver:22.07-py3 bash -c "pip install transformers && tritonserver --model-repository=/models"

I tried running it on different devices and using another model, but none worked.

I think the main problem is from
E0502 22:17:32.770347 1 model_repository_manager.cc:1355] failed to load 'transformer_onnx_model' version 1: Invalid argument: model 'transformer_onnx_model', tensor 'output': the model expects 2 dimensions (shape [-1,384]) but the model configuration specifies 2 dimensions (shape [-1,-1])

It is fixed by changing the output configuration in the model config (config.pbtxt) from
output {
    name: "output"
    data_type: TYPE_FP32
    dims: [-1, -1]
}

to
output {
    name: "output"
    data_type: TYPE_FP32
    dims: [-1, 768]
}

it would be more convenient if this fix can be implemented directly on the convertion


[SDK] Update mentions of plugin to extension

Dev Home version
No response
Windows build number
No response
Other software
No response
Steps to reproduce
Standardize on "extension" rather than plugin. We should update the SDK accordingly.
Expected behavior
No response
Actual behavior
No response
Included System Information
No response

still applicable, see e.g. https://github.com/microsoft/devhome/blob/main/pluginsdk/Microsoft.Windows.DevHome.SDK/Microsoft.Windows.DevHome.SDK.idl#L19
need to decide whether we do this before we hit 1.0 as this is abi breaking

FYI @ujjwalchadha


Fixed wrong offset caused by native top toolbar

I added a fix for the wrong offset caused by native top toolbar and I think I improved hoover behaviour while dragging.
I also exposed scrollToIndex and scrollToEnd functions.
Best Regards

Outdated code, pull request no longer required


Update br-disk.json

Fixed missing parenthesis which caused HD-DVD to not get captured.

Why add .*$
Halves the number of steps
https://regex101.com/r/ZnaOEi/1
https://regex101.com/r/YsKw6m/1


Intermittent ConnectorError Some(WasNull())

Bug description
When running Prisma in production I occasionally get this error:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: FromSql(6), cause: Some(WasNull) }) })

How to reproduce

I cannot reproduce this reliably, but can provide DM a Sentry error for diagnosis.
Expected behavior
No error should be thrown.
Prisma information

Prisma Query:
  const user = await prisma.user.findUnique({
    where: { id: data.userId },
    rejectOnNotFound: true,
  });

Relevant schema:
model User {
  id     Int     @id @default(autoincrement())
}

Environment & setup

OS:
Database:
Node.js version:

Running on Heroku with PostgreSQL 13 against Node.js v16.13.1.
Prisma Version
prisma                  : 3.4.0
@prisma/client          : 3.4.0
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at<EMAIL_ADDRESS>Introspection Engine    : introspection-core 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at<EMAIL_ADDRESS>Format Binary           : prisma-fmt 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at<EMAIL_ADDRESS>Default Engines Hash    : 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85
Studio                  : 0.438.0

Do I recall correctly that you wrote somewhere that `    rejectOnNotFound: true,´ is what causes this to happen?
Can you really reproduce this with this minimal schema?
What does "intermittent" mean here?
Does your Sentry error have more information on what query was executed?

My email is<EMAIL_ADDRESS>Do all these queries have something in common somehow? Similar data structure? Can you log these in cases of error?
I also just noticed that you are on a older Prisma version. Would it be possible for you to update to the most recent one?

I'll go ahead and email you the Sentry error!

Do all these queries have something in common somehow? Similar data structure? Can you log these in cases of error?

All instances of the error are of this query. I've looked at the retry in a couple instances and it seems retrying works just fine.

Would it be possible for you to update to the most recent one?

Yep! I'm on 3.10.0 now as of 4 days ago.

As a bit of an update, it appears this error isn't common to this one query, and happens in findMany. I get the following errors as well:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: FromSql(7), cause: Some(WasNull) }) })

This came from this query:
  await prisma.user.findMany({
    where: {
      lastSyncedAt: null,
      devices: {
        some: {
          buildNumber: { gte: minSupportedBuildNumber },
        },
      },

Okay, I figured out what was causing it! I had a field that was of type String[] but it had some NULL values in some results. When Prisma read those null values, it would throw this error. To fix, I ran the following migration to add a check constraint and ensure nulls don't make their way back in:
BEGIN;

UPDATE "user"
SET "emails" = array_remove("emails", NULL)
WHERE array_position("emails", NULL) IS NOT NULL;

ALTER TABLE "user"
ADD CONSTRAINT "user_email_check"
  CHECK (array_position("emails", NULL) IS NULL);

COMMIT;

Awesome! That should allow us to reproduce the error and then hopefully implement a better one in the future.

Hi! I started using Prisma today and after connecting to an existing database immediately ran into the issue above, i.e. having NULL values in a list. Is this supposed to actually work? I was looking at https://github.com/prisma/prisma/issues/847 but if I understand the discussion correctly that issue is more about not being able to store NULL instead of []. Right?

Can you share a simplified schema you are having @westmark and the data that makes it crash? We still have to fully reproduce this here, and more concrete information is always helpful.

@janpio Gladly. You can have a full repro:
https://github.com/westmark/prisma-error-repro

Thanks for the concise reproduction @westmark. I was able to reproduce the error.

@casey-chow Would this fit what you observed? https://github.com/westmark/prisma-error-repro/blob/main/seed.sql#L1

@casey-chow Would this fit what you observed? https://github.com/westmark/prisma-error-repro/blob/main/seed.sql#L1

Yes!

New error message with Prisma 4.3.1:
gitpod /workspace/prisma-error-repro (main) $ yarn ts-node run.ts
yarn run v1.22.19
$ /workspace/prisma-error-repro/node_modules/.bin/ts-node run.ts
/workspace/prisma-error-repro/node_modules/@prisma/client/runtime/index.js:29909
      throw new PrismaClientKnownRequestError(message, error2.code, this.client._clientVersion, error2.meta);
            ^
PrismaClientKnownRequestError:
Invalid `prisma.myModel.findMany()` invocation in
/workspace/prisma-error-repro/run.ts:6:37

  3 const prisma = new PrismaClient();
  4
  5 async function main() {
→ 6   const data = await prisma.myModel.findMany(
Error converting field "intArray" of expected non-nullable type "Int", found incompatible value of "null".
    at RequestHandler.handleRequestError (/workspace/prisma-error-repro/node_modules/@prisma/client/runtime/index.js:29909:13)
    at RequestHandler.request (/workspace/prisma-error-repro/node_modules/@prisma/client/runtime/index.js:29892:12)
    at async PrismaClient._request (/workspace/prisma-error-repro/node_modules/@prisma/client/runtime/index.js:30864:16) {
  code: 'P2032',
  clientVersion: '4.3.1',
  meta: { field: 'intArray', expected_type: 'Int', found: 'null' }
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
gitpod /workspace/prisma-error-repro (main) $

Hey,
Given the clear error message we now have, is it acceptable to close this?
To be clear, Prisma unfortunately doesn't support nullable scalar lists at the moment but we already have a feature request here.

I'll close this issue now at it's been stale for the past 3 months. Thanks again for the report 🙏


Whitespace before links

When links are directly preceded by non-whitespace characters, a space is added before the link. Hence, a link wrapped in quotes, parens, etc, will come out appearing poorly formatted. Since whitespace is not required before a link in markdown, it shouldn't be added when reversing.
irb(main):004:0> ReverseMarkdown.convert '
I like this "markdown" stuff!
'
=> "I like this \" [markdown](http://daringfireball.net/projects/markdown/)\" stuff!\n\n"

Expected:
=> "I like this \"[markdown](http://daringfireball.net/projects/markdown/)\" stuff!\n\n"

An exception may be where a ! precedes the link in the HTML, making the converted markdown an inline image instead of a link.

+1


Reduce Extension Size / Minify?

Environment data

VS Code version: 1.56.1
Jupyter Extension version (available under the Extensions sidebar): v2021.6.832593372
Python Extension version (available under the Extensions sidebar): v2021.5.829140558
OS (Windows | Mac | Linux distro) and version: Windows 10 20H2
Python and/or Anaconda version: 3.9
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Jupyter server running: N/A

Description
Currently this extension takes up ~70 MB of hard disk space when installed, which is a lot of space. Is there any way to reduce the size of this extension? Some ideas include:

"Minify" JSON files for releases. A spot check of JSON files included in the released versions of this extension shows that the majority still maintain 4 spaces of indentation. Simply reducing this to 1 space (just in the final distribution) could save a significant amount of space.
Losslessly compress image assets. Several image assets currently are not losslessly compressed. See #5868 for example. Adding a bot that automatically losslessly compresses image assets could easily fix this issue.
Avoid including unnecessary files in packaged extension. I'm no expert in how these extensions are actually packaged, but it seems like there are some files that don't need to be included in the final distribution, for example, the pythonFiles/.vscode folder.

Thanks for filling this issue. We'll look into this.

When we eventually switch over to Native Notebooks (https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/) we'll be able to delete a lot of the webview related dependencies,hence reduce file size.

Neat.
Also, I just did some basic grepping - it seems like just removing unnecessary spaces from the various .json, .js, .ts, and .py files can save ~2.5MB in the final distribution. Actually "minifying" all of the JS files (there are currently 55MB of .js files) would save much more.

Thanks for the suggestions,
Just out of curiosity, does this saving in disck space make much of a difference?
E.g. when installing Python packages (they can use upto 100s MB or even more, specially with conda packages), hence anyone working on Jupyter already ends up installing large pacakges today.
In my experience, these are optimized for distribution.
Once again, thanks for the suggestions & investigation. But curious if you are running into any disck space issues or perf issues due to the size of this extesnion

I'm mostly just surprised that the extension itself takes ~70MB, when VS Code itself is ~250MB. On my laptop with only ~100GB of usable SSD space, these are non-trivial sizes.

Also see #4551

Closing this issue as we have removed a lot of the dependencies (file size should be much smaller in th next version), and once we ship the renderer extension as a seprate extension that would remove more items from the extesnion.


My polygon layer doesn't show up

This issue was imported from CodePlex
jirikadlec2 wrote 2012-01-26 at 02:00
Strange bug found in DotSpatial 1.0 RC3:
If I add the "watershed.shp" to my map using "Add layer", nothing is shown in the map.
If I open the project "delineation.dspx" that includes the "watershed" layer, the watershed layer is displayed correctly
See the attached zip file.

There is unhandled exception when opening that .shp in DemoMap. Schedule it to 2.0

@mogikanin: I had a look at the watershed.shp using ArcMap 10.4s CheckGeometry and got the following warnings:

bad envelope at 0 in Watershed
incorrect ring ordering at 0 in Watershed
could not find spatial index at -1 in Watershed

The feature gets drawn around -98,336 32.461 degrees but can't be zoomed to correctly.
I also had a look at the shapefile while it gets loaded by using DemoMaps "add layer"-button.
The vertices have X values around -10957215 and X values around 3809052. But the Extent has X values around -99 and Y values around 31.
I'd say  we can close this issue as it is an error in the shapefile and not in DotSpatial.

My opinion that a) DS should handle broken shapefiles and of course b) should not be such unhanded exceptions in map control.

Yes I agree that we shouldn't have unhandled exceptions.
As far as I could tell DS was written like the user was responsible for the correctness of the shapefile but I agree handling broken files would be nice.
These cases are already coming to mind that would have to be checked:

difference between the files extent and the coordinates
incorrect ring order
self-intersecting geometries (maybe invalid geometries in generall)
number of datarows in dbf <> number of shapes in shp

Would be the question what this "could not find spatial index at -1 in Watershed" error is. We'd have to solve that one, too.
I'm not sure whether we already check for null geometries.
I'm also not sure whether we already check for duplicate coordinates or whether NTS can handle those without error but they are normally not allowed.
Would be the question how to handle those cases. I think some of them can't be handled without the help of the user and others might be quiet time consuming when handled when the file gets loaded.
And if we check the shapefiles while loading, would we have to check that geometries that the user created with the help of ShapeEditor or otherwise are valid too?


Update wokwi-resistor.md

The default value is 1000, did you observe something different?

Closing due to inactivity


use concurrency to cancel duplicate and outdated workflow runs

see GH documentation for default implementation:
https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow

closed via #889


Make username labels and avatars clickable in chat

Clicking it goes to the user's profile page.
This fixes DESKTOP-4431.

I don't fully understand everything yet, so all comments and nits welcome!

I think this is ready for another look. I also dug into spawning a popup instead, but didn't make much progress. However, I do notice that we have links to profile pages from other parts of the app, and those suffer from the same problem re. the back button not working correctly. So it seems that we should fix that in general, in a separate PR.

So the actual design intention is to show the popup so we should do that (on desktop) and not try and show the profile page.
In regards to the profile page chanage, this isn't a bug, this is an artifact of a choice we made regarding how the navigation works. I think we should change it, but its not a bug. When you click to show a profile we're actually moving you to the profile tab. The back button you see isn't a 'history' style back. its to pop the profile off the stack.  We do intend to change this at some point but its less pressing than other things we're building out now.

Also changed to spawn tracker popup. Now on to testing on native...

Also noticed that some of the messaging on the popup doesn't make sense in this context, e.g. hovering over the close button it sometimes says "you will see this every time you access this folder". Note to self to file a separate bug for that...

Okay, tested on iOS and it seems to work. PTAL!


Add a timestamp to error messages (especially when error occurs from background process)

Current Implementation

Currently, error messages are displayed without any timestamp.
When an error occurs during background processing, the message is displayed only much later. This makes it hard to analyse the root cause of such an error.
Suggested Enhancement

The error message should be composed with a timestamp. This is especially usefull if the error happens during background processing, e.g. risc check.
Expected Benefits

In some cases, especially for errors occurring during background processing, the timestamp of the root cause of the failure would give us more context and help with error analysis.

See also this comment

@dsarkar @heinezen
Please ask the devs what they think of this idea. I would volunteer for a PR, but only for iOS, not for Android. I would limit the timestamp to error codes from ENF.
I hope that this could help to give insights, especially on error 13

cwa version 2.14.1 (0) was rolled out.
Closing this as fixed.

@ndegendogo Thanks again for the PR. Apparently this feature made already happy at least one tester. ;-)

Apparently this feature made already happy at least one tester. ;-)

@dsarkar really?! 😅🎉


Add G2P client

Add client methods for G2P endpoints and also write the associated tests.

Fixed in #1344


fix(amplify-codegen-appsync-model-plugin): remove targetName from model

Remvoed targetName from Java model and update the models to preserve the case of type in generated
code
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #2871 into master will decrease coverage by 0.31%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #2871      +/-   ##
==========================================
- Coverage   59.04%   58.72%   -0.32%
==========================================
  Files         219      220       +1
  Lines       11148    11207      +59
  Branches     2305     2317      +12
==========================================
- Hits         6582     6581       -1
- Misses       4263     4324      +61
+ Partials      303      302       -1

Impacted Files
Coverage Δ

...amplify-codegen-appsync-model-plugin/src/preset.ts
0% <ø> (ø)
:arrow_up:

...del-plugin/src/languages/java-declaration-block.ts
0% <0%> (ø)
:arrow_up:

...psync-model-plugin/src/visitors/appsync-visitor.ts
60.65% <0%> (-0.32%)
:arrow_down:

...-model-plugin/src/visitors/appsync-java-visitor.ts
0% <0%> (ø)
:arrow_up:

...ges/amplify-graphql-types-generator/src/loading.ts
74.5% <0%> (ø)
:arrow_up:

...y-appsync-simulator/src/schema/directives/index.ts

...ages/amplify-appsync-simulator/src/server/index.ts

...sync-simulator/src/velocity/value-mapper/mapper.ts

...lify-appsync-simulator/src/velocity/util/errors.ts

... and 5 more

Continue to review full report at Codecov.

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


publication "The Unique Peptidome"

Interesting observations with respect to pancore publication:

Clostridium botulinum: example of genomes that are so-called complete, but are not
???: example of incorrect taxonomic identification of genome
Mycobacterium bovis, Rickettsia prowazekii (and other of this genus): clonal species with highly similar genomes (core =~= pan)
species with large number of genomes:

bacillus (almost all species)
bifidobacterium (almost all species)
chlamidia (almost all species)
clostridium botulinum
escherichia coli (25): may be compared with Lukjancenko et al (2010)
haemophilus influenzae
helicobacter pylori
legionella pneumophila
rickettsia prowazekii

To illustrate the process of an in silico trypsin digest and successive identification of the peptides, we could show an illustration of a protein with peptides marked as regions and under each region show the lowest common ancestor of that peptide. The example should contain at least one species-specific peptide, at least one genus-specific peptide and a peptide that is less specific than genus-level. This could also be shown on Unipept in a separate protein page, that also shows a multiple alignment of the family the protein belongs to, as a cartoon with clickable regions of peptides that are conserved or non-conserved in the family. We would need to look for a website where we can find such a ready-made alignment for the protein family.
Original issue by @pdawyndt on Wed Apr 10 2013 at 17:32.
Closed by @bmesuere on Sun Jan 24 2016 at 13:20.

referenties:

Ueda et al.
peptidome application
wiktionary definition
human peptidome display

Original comment by @pdawyndt on Wed Oct 30 2013 at 10:02.


cigien: Watch pinoyflixteleserye.su

cigien requests the watch of the watch_keyword pinoyflixteleserye\.su. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

pinoyflixteleserye\.su has been seen in 1 true positive, 0 false positives, and 0 NAAs.

pinoyflixteleserye\.su has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Zoe in Charcoal HQ

Approved by Zoe in Charcoal HQ


Fix dump crash if the schema contains computables with multi cardinality

See #2063 for full details on the bug and proper solution for the master
branch.  This is a minimal fix to make things work in release branches.
Issue: #2057

Superseded by #2063


I need to delete a RocketChat user account, so that I can correct set-up

My Setup

Operating System:
App Version:
Installation type:

[ ] I have tested with the latest version
[ ] I can simulate the issue easily

Description

Current Behavior

Expected Behavior

Please test if the latest release did solve this. If not please reopen the issue or create a new one and tell us. I will be closing this one for now.
Thank you!


compileImplicitCastExpr: check ast.ArrayToPointerDecay rvalue use closure

fix https://github.com/goplus/c2go/issues/148 bug2
typedef struct Test {
  char arr[48];
} Test;
Test create_test() {...}
void put_test_arr(const char *arr);
int main()
{
  put_test_arr(create_test().arr);
  return 0;
}

create_test().arr rvalue to closure
put_test_arr(func() *int8 {
	v := create_test().arr
	return (*int8)(unsafe.Pointer(&v))
}())

Codecov Report
Base: 88.79% // Head: 88.83% // Increases project coverage by +0.04% :tada:

Coverage data is based on head (0daa190) compared to base (63194d8).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
+ Coverage   88.79%   88.83%   +0.04%
==========================================
  Files          10       10
  Lines        3337     3351      +14
==========================================
+ Hits         2963     2977      +14
  Misses        293      293
  Partials       81       81

Impacted Files
Coverage Δ

cl/codebuild.go
87.70% <100.00%> (+0.28%)
:arrow_up:

cl/expr.go
91.26% <100.00%> (+0.05%)
:arrow_up:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


How to change the modality of seq2seq problems to be 4-dim?

It looks like the modality of language related problems accepts input to Transformer encoder only in 3d, i.e. [batch_size, sent_len, emb_dim]. To make the architecture work for 4d input, should I register a new modality? Also should I register a new model that uses 2d attention in the encoder?

Do I need to register a new problem or is there any way to change wmt.TranslateProblem's input and target modalities?

Currently if you run one of the Translate problems with the Transformer model, the output of the modality is 4D, and the Transformer model then flattens it to 3D (https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/transformer.py#L62).
If you want a model that operates on 4D Tensors, you'll want to implement a new model.


Cannot add account when publishing project to new Azure server

Steps to Reproduce:

Publish database project that targets Azure
Select "Publish to new Azure SQL logical server"
Prompts me to "Add Account", but when I click on it, it takes me to a localhost page that fails to load

this might be related

I have the exact same issue. Is there another way to publish a DB project in Azure?

the other workaround is to change the authentication method of Azure Active Directory in settings to DeviceCode. Using that authentication, user will be able to login to Azure even if the default auth type doesn't work


TimeZone is sometimes -120 for unknown reason

@duschata:

The timezoneOffset tests are running under linux without modifications
To get the green bar under windows, set the system timezone to UTC.
When you pass serveral datas at Calendar.xmlCalendarToDate() and CET timezone, you will see, that all timezoneOffsets
are -60 except you pass a single day. In this case you will recieve -120 as the TZ offset.
Strange behavior, can't explain why.

@duschata Timezones can't really be handled well with JavaScript's Date. So I've removed timezone handling when printing dates with G*Types. Timezone of the original Date is ignored which I think makes more sense - as normally you don't care about TZ of a xs:gYearMonth etc. If you do, use a calender on input. There's not much alternatives as TZ can't be really set on Date.


Implement OpenROAD padring

Changes:

Adds padring script access to the floorplanning step in OR
Bumps the required version of OpenROAD (@WRansohoff can we work on getting the CI running the new version)

Congrats on getting this merged into OpenROAD! I started building the new version on the CI runner, and will retry the tests when it's done.

Update is done, looks like it is down to one test failure, on the number of warnings in test_gcd @gadfort

Update is done, looks like it is down to one test failure, on the number of warnings in test_gcd @gadfort

Awesome. I'll fix that this evening


Newapi pubreg decorator example

Followup to https://github.com/crossbario/autobahn-python/pull/798#issuecomment-289550059 and also this example was missing from the newapi stuff anyway.

Codecov Report

Merging #819 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #819   +/-   ##
=======================================
  Coverage   60.19%   60.19%
=======================================
  Files          71       71
  Lines       12108    12108
  Branches     1914     1914
=======================================
  Hits         7289     7289
  Misses       4190     4190
  Partials      629      629

Impacted Files
Coverage Δ

autobahn/wamp/types.py
72.48% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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