gatsby no such file gatsby-plugin-s3/src/gatsby-node.ts

Hello ,
Suddenly when i try to deploy i get this error
gatsby no such file gatsby-plugin-s3/src/gatsby-node.ts,
what could be the problem?
Thanks

I haven't come across this one. Are you encountering this issue on a site with a public repository that I can see? Or would you be able to make an MCVE/reprex of the issue?
My hunch is that maybe you've configured tsc/babel to compile your node_modules directory and it is unable to compile gatsby-plugin-s3 because we don't upload our .ts files to npm, but that's really just a pure guess. I'd need to see it happening to get to the bottom of it.

I would indeed like to see a reproduction repo or at the very least the contents of your deploy script, because this isn't something that should happen with normal usage.

What does your gatsby-config look like? Resolve should only have the value of gatsby-plugin-s3 and nothing else like so:
https://github.com/jariz/gatsby-plugin-s3#usage

Thank you for super fast reply ^^
i could find a way to fix this , but the cause of this problem is super strange
so i have
createRedirect({             fromPath:/${Title_slug}/${slug},             toPath: /${Title_slug}/${node.articleSlug},             isPermanent: true,             redirectInBrowser: true,           });
and if i replace isPermanent: true with statusCode:301
the error i mentioned above shows up every time i do gatsby build , this is strange because  as far as i know createRedirect and gatsby build are not connected or related to S3 plugin ....
so after i set it back to isPermanent: true  instead of statusCode 301 , everything work fine.

If generateRoutingRules or generateRedirectObjectsForPermanentRedirects are true (generateRoutingRules is by default) then we read redirects, so createRedirect() is somewhat connected to gatsby-plugin-s3.
The error message you received is strange though, I'll take a look.

I tried
createRedirect({
    fromPath: '/old-url',
    toPath: '/new-url',
    statusCode: 301,
    redirectInBrowser: true,
});

with otherwise default settings and was unable to reproduce the error.
Worth noting that gatsby-plugin-s3 does not read statusCode.

Oh good to know that its related ,
so this is how my s3 plugin config looks like
{       resolve: 'gatsby-plugin-s3',       options: {         bucketName: process.env.S3_BUCKET,         protocol: 'https',         hostname: 'stage-gatsby.mymoria.de',         bucketPrefix: 'de',         generateRoutingRules: true,         generateRedirectObjectsForPermanentRedirects: true,       },     },
do i still need to set statusCode 301 to createRedirect ?

Oh good to know that its related ,
so this is how my s3 plugin config looks like
{ resolve: 'gatsby-plugin-s3', options: { bucketName: process.env.S3_BUCKET, protocol: 'https', hostname: 'www.example.de', bucketPrefix: 'de', generateRoutingRules: true, generateRedirectObjectsForPermanentRedirects: true, }, },
do i still need to set statusCode 301 to createRedirect ?

You shouldn't need to provide statusCode, no. statusCode is a non-standard option that's not implemented in our plugin. isPermanent is the standard way to make a 301 redirect.
I've tried your config options and still can't reproduce the issue. I think it must be something specific in your fromPath/toPath. Unfortunately, without knowing the values for Title_slug, slug, and node.articleSlug there's not much I can do, and there's no easy way for you to tell specifically which redirect is causing the error.

ok ^^ thank you so much for your time i will close the issue for now :)

the reason is having more than 50 redirect url without adding this flag
generateRedirectObjectsForPermanentRedirects.
adding the flag will solve it


Accessing parent data context

What would be good API for accessing parent data context? Blaze's access by fixed number of levels is really fragile to cod refactoring.
Do we even need it? In the past, in most cases when I needed parent data context was to access what we now have a as a top-level component data context.
And maybe we just have to support accessing parent components, and then use .data() on them to access the data context there?
So, what are use cases?

Doesn't such direct access to the parent context introduce tight coupling to the place where the component is included and perhaps even the internals of the parent component? Shouldn't components be (mostly) independent and most state passed via arguments to components?
I agree that there should still be a way to get the parent component instance and access things via its public methods/attributes, but some things in the parent data context may be internal and should not all just be exposed?

With 25f4545ef342d5cb84f66dde8caedbf12346570b we have an option to navigate between parent and children components and I think this is good enough for now. Let's see if we need more options for data context navigation later on. So you can access parent component data context now with componentParent().data().


Import textlint-ast-test to monorepo

Related #270

I got it. I'll update repository links.

@Leko Thanks!


Fix ColumnObject need to be finalized when doing ColumnObj…

…ect::update_hash_with_value
Otherwise accessing rows at n will lead to heap buffer overflow
 5# SipHash::update(char const*, unsigned long) at /home/zcp/repo_center/doris_master/doris/be/src/vec/common/sip_hash.h:132
 6# doris::vectorized::ColumnString::update_hash_with_value(unsigned long, SipHash&) const at /home/zcp/repo_center/doris_master/doris/be/src/vec/columns/column_string.h:452
 7# doris::vectorized::ColumnObject::update_hash_with_value(unsigned long, SipHash&) const at /home/zcp/repo_center/doris_master/doris/be/src/vec/columns/column_object.cpp:1433
 8# doris::vectorized::Block::update_hash(SipHash&) const at /home/zcp/repo_center/doris_master/doris/be/src/vec/core/block.cpp:721
 9# doris::EngineChecksumTask::_compute_checksum() at

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


How do you use ImGui.PlotLines?

The C++ implementation accepts a pointer to an array of values like so:
static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f };
ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr));

However, this API only accepts a reference to a single float:
public static unsafe void PlotLines(string label, ref float values, int values_count)

I'm probably missing something but I don't know what.

I figured it out and am documenting here if anyone else comes across this problem.
Instead of writing something like this:
float value = 1.0f;
ImGui.PlotLines("Plot Lines", ref value, n);

Use an array (like the C++ implementation) and simply pass the reference to the first element of the array:
float[] values = new[] { 0, 1.1f, 2.2f, 3.3f, 40.4f, 5.5f, 6.6f, 7.7f, 80.8f, 9.9f, 10.0f };
ImGui.PlotLines("Plot Lines", ref values[0], values.Length);


Failed to activate the atom-language-rust package

Just upgraded to 0.4.0 from 0.3.x.
Atom Version: 1.5.3
System: "Fedora release
Thrown From: atom-language-rust package, v0.4.0
Stack Trace
Failed to activate the atom-language-rust package
At Cannot read property 'add' of null

TypeError: Cannot read property 'add' of null
    at Rust.activate (/home/andrey/.atom/packages/atom-language-rust/lib/rust.js:70:4)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:181:20)
    at /usr/share/atom/resources/app.asar/src/package.js:155:32
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:92:15)
    at /usr/share/atom/resources/app.asar/src/package.js:148:26
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:145:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:526:21)
    at /usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:385:60
    at exit (/usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
    at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /usr/share/atom/resources/app.asar/src/buffered-process.js:227:18
    at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands
 32x -0:34.2.0 core:move-down (atom-text-editor.editor.is-focused)
 12x -0:27.9.0 core:move-up (atom-text-editor.editor.is-focused)
 34x -0:26.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:14.2.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Config
{
  "core": {},
  "atom-language-rust": {
    "colors": {}
  }
}

Installed Packages
# User
atom-language-rust, v0.4.0

# Dev
No dev packages

Thanks for the report, I'll investigate.
In the meanwhile, does reinstalling the package alleviate the error? Also, did you have any custom colour values specified?
I've a feeling this has something to do with the new configuration option added to style documentation blocks.

There are no custom colour values for sure. It was plain atom installation and the first plugin I've installed on my new notebook and then upgraded. Full reinstall seems did the trick!

Glad to hear that a package reinstall resolved the error!
I've put through a fix that I believe will address the problem for future package upgrades. It'll make an appearance in the next release and will hopefully spare everybody from needing to do a reinstall.

Hi, just had the same problem on Fedora 22.
Using it for quiet a while )
Reinstall of atom-language-rust nad restart of Atom fixed the issue for me.


Would it make sense to add address index?

I wonder if it'd make sense to add an optional (non-default) index of all addresses?

Hi @unsystemizer,
I am currently experimenting with adding LMDB functionality to piocoin. Id this probes to be beneficial it means it would be much easier to add functionality as suggested above.

Hi @aido - that's exactly why I thought to ask.
I'd be interested to help with testing.


Fix: storybook's public path

Description
Fixed the public path of storybook's file loader.
When we've deployed storybook build files to github pages, we would found that the flags image were missing.
That's because the storybook's webpack file-loader public path setting is set to '/', and the github page of this repo has its subfolder /react-intl-tel-input/.
It should be relative path './ here.
Screenshots (if appropriate):

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] I have used ESLint & Prettier to follow the code style of this project.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

Coverage remained the same at 93.401% when pulling 7ac33fa885f91d67edcf68bad95507461d490216 on fix/deploy-public-path into a0f0f611c2f673e305c60b95cb6f46972c2ecca5 on master.


Warn if enum sheet names will not be distinct

xlsxwriter produces an error in this case. I think that's fine. I will incorporate testing of this logic.


OnHub compatibility?

4 years ago now I adapted the TP-Link instructions for the Asus OnHub. I just retired the Asus and am looking for interesting stuff to do with it.
My original guide was mostly in the spirit of what this tool provides https://www.exploitee.rs/index.php/Asus_OnHub
Just curious if this should work on the OnHub as well, or if it needs a little tweaking?

Got vagrant working
Changed it to a newer Ubuntu version
Updated the dropbear URL
Changed image to arkham
Harcoded the name url and sha1
Image built
Booted it once now on the Asus OnHub and it took forever and did a factory reset. Set it back up with Google but no services running on reboot (it did an update as soon as I set it up)
Trying a second time now and Ill see if I can connect without setting it up

Got vagrant working
Changed it to a newer Ubuntu version
Updated the dropbear URL
Changed image to arkham
Harcoded the name url and sha1
Image built
Booted it once now on the Asus OnHub and it took forever and did a factory reset. Set it back up with Google but no services running on reboot (it did an update as soon as I set it up)
Trying a second time now and Ill see if I can connect without setting it up

Okay so before initial setup it works

The initial setup does a firmware update that seems to wipe it out.

Okay so before initial setup it works

The initial setup does a firmware update that seems to wipe it out.

From the initial setup with working SSH after going through the process it updates every time. I made sure to use the latest image URL so I'm not sure what the hell is going on

From the initial setup with working SSH after going through the process it updates every time. I made sure to use the latest image URL so I'm not sure what the hell is going on

It's just making fun of me now

It's just making fun of me now

So I eventually have to cancel out of setup and reconnect just for to recognize that it updated. Afterwards the SSH service is not running

So I eventually have to cancel out of setup and reconnect just for to recognize that it updated. Afterwards the SSH service is not running

And yeah it connected
The changes from this repo work but only before the initial setup. Afterwards it does a factory reset and completely wipes everything

And yeah it connected
The changes from this repo work but only before the initial setup. Afterwards it does a factory reset and completely wipes everything

I would break out my serial again to set it up according to my guide but my only USB to UART adapter broke. I'll update as I can find out more.
Any idea why it would be factory resetting on setup? I used this as the image URL

  name="OnHub SRT-AC1900"
  url="https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_9334.41.3_arkham_recovery_stable-channel_mp.bin.zip"
  sha1="17d027c79d4dda386ff31e206a751f53c4ea9880"

That was straight from the latest XML

I would break out my serial again to set it up according to my guide but my only USB to UART adapter broke. I'll update as I can find out more.
Any idea why it would be factory resetting on setup? I used this as the image URL

  name="OnHub SRT-AC1900"
  url="https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_9334.41.3_arkham_recovery_stable-channel_mp.bin.zip"
  sha1="17d027c79d4dda386ff31e206a751f53c4ea9880"

That was straight from the latest XML

I just realized the update URL
https://dl.google.com/dl/edgedl/chromeos/recovery/onhub_recovery.json
Differs from what it updates to
URL provides
9334.41
While the up to date version i the WiFi application reports
11021.84.4
No to try and find the updated URL

I just realized the update URL
https://dl.google.com/dl/edgedl/chromeos/recovery/onhub_recovery.json
Differs from what it updates to
URL provides
9334.41
While the up to date version i the WiFi application reports
11021.84.4
No to try and find the updated URL

I sniffed the newer update via tcpdump on my main router but I can't make heads or tails of the download
http://dl.google.com/chromeos/arkham/11021.84.4/stable-channel/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed
[parker@wolfcola ~]$ file /home/parker/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed
/home/parker/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed: data

I sniffed the newer update via tcpdump on my main router but I can't make heads or tails of the download
http://dl.google.com/chromeos/arkham/11021.84.4/stable-channel/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed
[parker@wolfcola ~]$ file /home/parker/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed
/home/parker/chromeos_11021.84.4_arkham_stable-channel_full_mp.bin-11074c6d087fdbb61dc3108450a4fedd.signed: data

I let a second factory reset capture run longer and I picked up a URL that isn't even used (weird unreleased version)
http://dl.google.com/chromeos/arkham/12371.52.22/stable-channel/chromeos_12371.52.22_arkham_stable-channel_full_mp.bin-008183b183f3456905947e50ff8ef20a.signed

I let a second factory reset capture run longer and I picked up a URL that isn't even used (weird unreleased version)
http://dl.google.com/chromeos/arkham/12371.52.22/stable-channel/chromeos_12371.52.22_arkham_stable-channel_full_mp.bin-008183b183f3456905947e50ff8ef20a.signed

Ok so 7zip was able to skip past the header garbage and extract the rootfs. The update file ONLY contains ROOT-A and not a full ROOT-A at that.

I tried copying those file on top of the ROOT-A from 9xxx but it didn't boot that recovery image.
So the current findings are:

Latest recovery that's openly available is 9334.41 (susceptible to galeforce)
Device on first startup has galeforce active but proceeds to do a delta update to 11021.84.4 (wiping out galeforce)
Update process also checks and finds a newer version (12371.52.22) but never downloads or applies it

Ok so 7zip was able to skip past the header garbage and extract the rootfs. The update file ONLY contains ROOT-A and not a full ROOT-A at that.

I tried copying those file on top of the ROOT-A from 9xxx but it didn't boot that recovery image.
So the current findings are:

Latest recovery that's openly available is 9334.41 (susceptible to galeforce)
Device on first startup has galeforce active but proceeds to do a delta update to 11021.84.4 (wiping out galeforce)
Update process also checks and finds a newer version (12371.52.22) but never downloads or applies it

I'm, trying to set this up on a gale here but have not even been able to enable SSH. Which hardcoded URLs have you used for dropbear and busybox. I've used these ones:
BUSYBOX_URL="https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-armv6l"
DROPBEAR_URL="https://archive.raspbian.org/raspbian/pool/main/d/dropbear/dropbear-bin_2020.81-3_armhf.deb"

However SSH is not working, like I mentioned in the other comment this might just be because dropbear is failing to start for some reason. I'm not sure how I can troubleshoot this though...
One thing which I'm finding odd is that @marcosscriven states that root should persist even when there's an update issued by Google but you're seeing something different.

I assume this same update is on gale as well. So it's wiping out your access, making everything fail.
The only time I had SSH access was a brief moment during setup before it said "Oh hey there's a newer version" and proceeded to update it.
I just used the gateway IP to SSH in for that brief second. Usualy <IP_ADDRESS> or <IP_ADDRESS> depending on if you are in setup or booted fully.
My best guess for the update weirdness, considering Google has done their damndest to obfuscate this, is that they are actively wiping it out fully on this most recent update (And not providing this update as its own recovery image)

Using the dropbear URL from #49 I was able to get SSH working.
As long as I don't connect to the puck to the internet the connection stays active, as soon as I connect to the internet an update kicks in, I was able to verify it by update_engine_client --status.
After it finalizes the system reboots, I poked around the upstart services and galeforce seems to use update_engine_client --is_reboot_needed to detect if it needs to repatch the partitions with its changes, however as soon as that command exit code switches to 0 a reboot is triggered, I don't think any of the code in update.sh even gets executed.
I'm not too familiar with the chormium os, don't know if there's anything we can do to prevent the auto reboot and apply the galeforce patches. Assuming that this is what's actually happening.


feat: add Catalan translation

Thank you for submitting a pull request!
Description
Please describe what you changed briefly.
Plugin
Select a plugin related to this PR.

[x] maplibre-gl-export
[ ] mapbox-gl-export

Type of Pull Request

[x] Adding a feature
[ ] Fixing a bug
[ ] Maintaining documents
[ ] Others ()

Verify the followings

[x] Code is up-to-date with the main branch
[ ] No lint errors after pnpm lint
[ ] Make sure all the exsiting features working well
[ ] Make sure a changeset file is added if your PR changes package code

Refer to CONTRIBUTING.MD for more details.

@lstiz Thank you for contributing new language! The preview looks working well. Just a request. Could you create a changeset file for publishing new versions?

run pnpm changeset
select both mapbox-gl-export and maplibre-gl-export
select minor for adding new language
put precise description for this PR

Thanks!

@lstiz I released new version with Catalan language


[Video Playback] Changing song speed does not change the speed of the bgmovie

Reported by Meowgister :

Pausing on one occasion just now didn't pause the bgmovie
Changing song speed doesn't change the speed of the bgmovie

The first part (Pausing on one occasion just now didn't pause the bgmovie) is already fixed

fixed since the .net7 version


How to get an array of selected cells ?

I want to get an array of selected cells in table after onMouseDown.

As discussed in #60 this is not yet possible, PR welcome


[Tracking] Gather metrics for idle Falco

We decided to do first gather Falco idle metrics to validate our approach.
We gather metrics from k8s and kepler and we want to test those metrics for the falco projcet
Dependent on the following open issues:

deploy falco ( https://github.com/cncf-tags/green-reviews-tooling/pull/32 )
collect and visualize metrics (https://github.com/cncf-tags/green-reviews-tooling/issues/20)

Check that the data have been loaded and think about a way to export those metrics.
There is no need for fancy export for the moment a csv or similar simple format would be fine

Requirements to consider:

Provide a script to reproduce this test
Set the duration of the idle test scenario to, for example, 15 minutes
Track and export the results of the metrics in a consistent manner

Hey Niki! Thanks a lot for the proposals.
My take is that we could opt for the same strategy we choose for the deployment of the infra-component.
We could have a first step in which we have some simple bash script just to have a quick-and-dirty win and as soon as every component work we can design a well structured github workflow.
What do you think?

@AntonioDiTuri sounds good! I created this issue to track the setup for the first benchmark test (idle): https://github.com/cncf-tags/green-reviews-tooling/issues/50

added it to the description of this issue!


UI/UX Character Panel Picture to Video

The Character Panel picture currently looks very static and ugly and that needs to be changed with the video.

[ ] Render a video of the chara using the preview iframe technique, and place it in that slot in the react
[ ] Equipmnent should all have previews rendered
[ ] Design needs to be redone

Closed as completed


provide metadata map

This evolves our implementation of providing addtional context to messages by introducing an optional metadata parameter to message creation.

@HosMercury I ended up taking a crack at evolving this some more. Would this implementation work for your use case? It's a bigger change, but I think it's a bit more flexible. Let me know what you think.

Yes , Boss .. thx

This is released in 0.5.0.


A web part property with async onGetErrorMessage loses its value on blur

Category

[x] Bug

Describe the bug
If I have a web part property type text, and I have a onGetErrorMessage validation - the value sometimes get cleared when the text box loses focus.
This ONLY happens if onGetErrorMessage returns a promise that takes more than 300ms to resolve.
If it returns a string or a promise that resolves immediately - this does not happen.
for example return Promise.resolve("") will not have this issue.
Steps to reproduce
Create a web part with a text property
set this as the validation function:
PropertyPaneTextField("customCss", {
label: "Custom CSS file:",
description: "Specify path to a custom CSS file.",
validateOnFocusOut: true,
onGetErrorMessage: (newValue) => {
return new Promise(resolve => {
if (!helpers.IsNullOrEmptyString(newValue))
try {
script.Instance.loadCss(newValue);//load it now
} catch (e) { }
            window.setTimeout(() => resolve(""), 1000);
          });
        }
      })

Expected behavior
validation will not lose value.
the reason this property loses value, is that on lose focus the onChange is called with the text box instance element - which gets set to null between the time the validation message comes back.
Environment details (development & target environment)
SPFx 1.8.2

Appears to be a dupe of #6479


Abilities, lasting effects and some new unit types

Closes #110 - Abilities
Closes #102 - Knockback from heavy strikes
Closes #174 - Fire
Closes #154 - Poison
Closes #175 - Poison cloud
Closes #186 - Hits should take away an attack point from the target
Closes #69 - Bombs
(Maybe it closes some more issues, I could forget something)
The day has come! :tada:
That's a result of two months of non-regular coding.
And yep, 4K lines in one commit. I'm sorry! :cry: I don't have enough juice to split this mess into neat commits.

Ouch, I've forgot to rename the branch from WIP_abilities_and_lasting_effects to i110_abilities_and_lasting_effects or something alike. Agrh, screw it, not that important.


Change color of Headings

Not really an issue, but it is not obvious to me looking at the documentation on how to change the colors of h1, h2, h3 etc.

Ah, I'll work on a better layout to explain what to edit to have what effect.
In this particular case you would provide highlights -> heading -> backgrounds / foregrounds.
The highlight for backgrounds is used for the line and foregrounds is used for the text.
The plugin indexes into the lists based on the level, so h4's get the 4th element. If you provide fewer elements we simply use the last one. So if you provide 3 elements we use the 3rd for an h4.
Hope that makes sense!

Thank you :)
2 things:

I'm a little lost on how you're getting the results in your video. Mostly in that some of your headings are full width, like the green and blue stretch across the entire window, and some of them end at the edge of the text. They should definitely be consistently one or the other, either all full width or all text width. It might be another plugin clashing, if you're using obsidian.nvim for example its own UI logic might be interfering here: https://github.com/MeanderingProgrammer/markdown.nvim?tab=readme-ov-file#obsidiannvim. I added some known clashing plugins to the healthcheck if you update and run checkhealth render-markdown it might help with that and likely other weird issues that will happen as a result.
When you hover over a line all the virtual text and highlights added by my plugin go away, leaving you with the default view for that line. For headings tree-sitter will set the following highlight groups: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#markup. From there if you use a colorscheme it will most likely provide a value for this highlight group. But if you don't like it you can either try a different colorscheme or manually override the value for the various @markup.heading.n.markdown highlights in the same way you set them in the config: vim.cmd(string.format([[highlight @markup.heading.1.markdown cterm=bold gui=bold guifg=%s]], color_fg)), for example.

Hey, regarding item 1, I don't use obsidian and I also have the headlines plugin disabled, I used that before, but I replaced it for this plugin

I use folds a lot, so when a section is folded, that's how headings look, shortened, not sure why, the ones that show the full length are the ones that are not folded
here's my checkhealth render-markdown output (not sure what those errors mean though):

render-markdown: require("render-markdown.health").check()

markdown.nvim [neovim version] ~
- OK Version >= 0.10

markdown.nvim [configuration] ~
- ERROR render-markdown.heading.1: is not a valid key
- ERROR render-markdown.heading.2: is not a valid key
- ERROR render-markdown.heading.3: is not a valid key
- ERROR render-markdown.heading.4: is not a valid key
- ERROR render-markdown.heading.5: is not a valid key
- ERROR render-markdown.heading.6: is not a valid key
- ERROR render-markdown.heading.7: is not a valid key
- ERROR render-markdown.heading.8: is not a valid key
- ERROR render-markdown.heading.9: is not a valid key
- ERROR render-markdown.heading.10: is not a valid key
- ERROR render-markdown.heading.11: is not a valid key
- ERROR render-markdown.heading.12: is not a valid key

markdown.nvim [nvim-treesitter] ~
- OK installed
- OK markdown: parser installed
- OK markdown: highlight enabled
- OK markdown_inline: parser installed
- OK markdown_inline: highlight enabled
- WARNING latex: parser not installed
  - ADVICE:
    - Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

markdown.nvim [executables] ~
- WARNING latex2text: not installed
  - ADVICE:
    - Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

markdown.nvim [conflicts] ~
- OK headlines: not installed
- OK obsidian: not installed

Regarding item 2, thanks for letting me know that when I hover over a line, your plugin goes away, I tried to override the highlights with an autocommand, wasn't able to, si just loaded those highlights after loading everything and now I was able to set them properly. I really appreciate the help.


Currently does not build due to undefined references

 Issue by jhdulaney
Friday Sep 25, 2015 at 07:03 GMT
Originally opened as https://github.com/Cloudef/wlc/issues/69

When building, I receive the following build errors:
[ 95%] Linking C executable example
../src/libwlc.so.0.0.1: undefined reference to chck_hash_table_release' ../src/libwlc.so.0.0.1: undefined reference tochck_string_release'
../src/libwlc.so.0.0.1: undefined reference to chck_iter_pool_release' ../src/libwlc.so.0.0.1: undefined reference tochck_pool_iter'
../src/libwlc.so.0.0.1: undefined reference to chck_pool_add' ../src/libwlc.so.0.0.1: undefined reference tochck_hash_table_set'
../src/libwlc.so.0.0.1: undefined reference to chck_iter_pool_iter' ../src/libwlc.so.0.0.1: undefined reference tochck_string_set_cstr'
../src/libwlc.so.0.0.1: undefined reference to chck_hash_table_collisions' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_push_front'
../src/libwlc.so.0.0.1: undefined reference to xdg_surface_interface' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_remove'
../src/libwlc.so.0.0.1: undefined reference to chck_string_set_varg' ../src/libwlc.so.0.0.1: undefined reference tochck_hash_table'
../src/libwlc.so.0.0.1: undefined reference to chck_string_set_format' ../src/libwlc.so.0.0.1: undefined reference tochck_string_set_cstr_with_length'
../src/libwlc.so.0.0.1: undefined reference to chck_hash_table_iter' ../src/libwlc.so.0.0.1: undefined reference tochck_pool_release'
../src/libwlc.so.0.0.1: undefined reference to chck_pool_remove' ../src/libwlc.so.0.0.1: undefined reference tochck_hash_table_get'
../src/libwlc.so.0.0.1: undefined reference to chck_pool' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_to_c_array'
../src/libwlc.so.0.0.1: undefined reference to chck_iter_pool_push_back' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_insert'
../src/libwlc.so.0.0.1: undefined reference to xdg_shell_interface' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_get'
../src/libwlc.so.0.0.1: undefined reference to chck_pool_get' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool_set_c_array'
../src/libwlc.so.0.0.1: undefined reference to chck_iter_pool_flush' ../src/libwlc.so.0.0.1: undefined reference tochck_iter_pool'
../src/libwlc.so.0.0.1: undefined reference to `xdg_popup_interface'
I attempted to work around by separately cloning, building, and installing chck, but it appears to not have made a difference.

 Comment by jhdulaney
Friday Sep 25, 2015 at 07:09 GMT

Workaround by configuring chck with:
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release ..

 Comment by Cloudef
Friday Sep 25, 2015 at 07:17 GMT

Lets leave this issue open, as it seems to happen often. I need to do something to detect linkers that don't work with lto.

 Comment by Cloudef
Friday Sep 25, 2015 at 07:18 GMT

https://github.com/Cloudef/chck/issues/19 Link for people who stumble here.
Orbment users: I recommended =Release there, but if you want to run from source tree, you should use =Debug instead as it doesn't define NDEBUG and thus adds $PWD/plugins to plugin search path.

 Comment by gpyh
Wednesday Dec 02, 2015 at 10:37 GMT

Happened to me aswell when setting -DCMAKE_BUILD_TYPE=Upstream. Works fine with Release though.

 Comment by jandoerntlein
Thursday Mar 17, 2016 at 11:58 GMT

Same issue (@gpyh) on Ubuntu 16.04 x64.

 Comment by ysangkok
Tuesday Feb 16, 2016 at 12:45 GMT

It also fails on Ubuntu.

 Comment by pecastro
Wednesday Dec 07, 2016 at 23:47 GMT

With clang it works fine.
export CC="clang"
export CXX="clang++"


Users who use steam language other than English may sometimes get error "Items missing"

This is a TODO notice to not forget.
Since steam software is very consistent, it's possible a situation when both image URL and card name a different on badge page and in inventory. Since matching is done via badge pages, this causes to false error "items missing". I need to think of some way to find same card with different image and name in inventory, or a way to fetch inventory with English locale.

Should be fixed with #25


Enhancement thoughts

These can be broken out into their own issues, but I felt it would be important context to list them all together first.
A year ago, I built out a strategy for using Opa.Wasm to handle authorization in my micro-service architecture. It is currently working in production using version 0.20.0, and I'm happy about that.  I want to use my knowledge of how the library is used to provide a genericized approach to relieve others of working out the strategies to do so, and to make my own implementation simpler.
Abstractions
First, is the lack of abstractions on the implementations. I am dependent on loading Wasmtime and if that changes in the future, I have to alter all of my registrations. Depending on interfaces eases this ache, especially when combined with first-class dependency injection extensions.  I am not married to these exact interfaces, but they show the direction I'm currently thinking.
/// Manages concerns for a wasm runtime and provides ways to load modules on that runtime
public interface IOpaRuntime : IDisposable
{
    IOpaModule LoadModule(string wasmFilePath);
    IOpaModule LoadModule(string moduleName, byte[] contents);

    // these two methods could probably be accomplished with the byte array overload with a builder in dependency injection.
    IOpaModule LoadModuleFromBundle(string opaBundlePath); // handle loading an opa bundle for users
    IOpaModule LoadModuleFromRego(string regoPath); // this is my ultimate goal, but I haven't figured out how yet
}

/// Manages memory for wasm modules, and instantiates policies.
public interface IOpaModule : IDisposable
{
    IOpaSerializer Serializer { get; } // probably wouldn't be public, but would be associated with a particular module
    IOpaPolicy CreatePolicy();

    // common things to a module that can be passed to every instance of a policy
    IReadOnlyDictionary<string, object> Data { get; } // convenience for knowing what data will be given to every instance of policy
    void AddData(string key, object obj); // Some mechanism for loading data needed by all instances of the module
    void RegisterBuiltin(string builtinName, Func callback);
    void RegisterBuiltin(string builtinName, Func callback);
}

/// Mostly the same as the current OpaPolicy, but enhancements are great
public interface IOpaPolicy : IDisposable
{
    IReadOnlyDictionary<string, object> Data { get; } // convenience for knowing what data is loaded in the policy instance

    string EvaluateRaw(string inputJson); // other params here too. brevity. directly uses LoadJson() and returns DumpJson()
    T Evaluate<T>(object input); // uses Serializer configured from module ontop of LoadJson() and DumpJson()

    void RegisterBuiltinRaw(string builtinName, Func<string> callback); // directly use LoadJson/DumpJson.  Basically, the library is only responsible for memory lookup.
    void RegisterBuiltin<T>(string builtinName, Func<T> callback);

    void AddData(string key, object obj); // merge data onto initial data from IOpaModule
}

/// Normal serializer as expected, but allows the library to abstract away the serialization concerns for a policy.
/// Also, with dependency injection, it could be configured to use the calling code's serialization settings, or use an unsupported serializer
/// (I assume this library would default to JST settings for performance, but support Newtonsoft for common settings that calling code might be using)
public interface IOpaSerializer
{
    string Serialize(object obj);
    T Deserialize<T>(string json);
}

Dependency Injection Extensions
This section is the original reason I started talking about enhancements. I planned to build out a Opa.Wasm.DependencyInjection nuget, and while I have something that could work, it would be better if that could be rolled directly into this repository (even if it is still published as an extra nuget).
In my current implementation, I built up a concrete class specifically for loading modules, and register it to my project as a singleton so the module compilation step is only hit once.  From there, I register a transient IPolicyProvider<T : IPolicy>, which uses the singleton factory as a dependency to create an instance of OpaPolicy, set whatever data is needed by the policy to be effectively executed, and then return an instance of the IPolicy requested, which is generally scoped.
  services.AddSingleton<OpaModuleFactory>();
  services.AddTransient<IPolicyProvider<IMyPolicy>, ProviderImplementation>();
  services.AddScoped<IMyPolicy>(provider => provider.GetRequiredService<IPolicyProvider<IMyPolicy>>().GetPolicy().GetAwaiter().GetResult())

Depending on use, the provider could also be scoped.  By taking some inspiration from Microsoft's IBuilder services.AddHttpClient<TClient>(configure), and the builtin logging extensions, ILogger<TCategoryName>, I was building towards a solution similar to this:
  services.AddOpaPolicy<TModule>(wasmFilePath)
    .UseNewtsonsoft(customSerializerSettingsAndContractResolvers)
    .RegisterBuiltin("math.random", () => random.Next()) // not positive this will be useful without a service provider
    .AddData(new ThingLoadedFromEmbeddedResource()));

After this, any service that needs that particular module, could inject into their class, IOpaPolicy<TModule> and get a transient instance of OpaPolicy specific to the already loaded module with the service collection handling disposal.
A user can call AddOpaPolicy() as many times as they need, loading different modules. Ideally, it doesn't matter where this gets called, (e.g. if an enterprise application has multiple tiers building up one host application, separate tiers might call AddOpaPolicy() without affecting the other injections (provided no name collisions, which should be validated on startup).
Documentation
Adding some documentation on intended use of the nuget to help users understand how best to manage an opa policy. Tips and hints would be good as well.  For example, build steps to add regos to their repositories that get automatically compiled with a project, but left out of a repository.

I also have some thoughts on restructuring the internal implementation of OpaPolicy to make it depend on abstractions instead of Wasmtime specifics, but I'm presently more interested in the outer interfaces. Besides, the Wasmtime Store can't be accessed simultaneously per their docs (though I'm unsure if this means it lacks a semaphore, or it does have a lock so there's a time hit, or if it's just not thread safe at all).
OPA is appearing more and more frequently in solutions, and the capability to bring it directly to c# with web assembly is just too incredible to pass up. A great library is just what the community needs!

Regarding runtime: I did change the runtime once (Wasmer to Wasmtime) and I had to change my object model for a couple of major Wasmtime changes. Those were super-breaking changes to how Opa.Wasm worked. So I don't think abstracting the actual runtime will work great.

Regarding serialization: what would be a real-world use case to not use STJ? For Web APIs, I understand the use cases. But deserializing for from/to OPA wasm is very specific and not really up to "configuration".

Regarding DI/policy provider: I have a very old prototype in the spikes folder - AspNetAuthZwithOpa (actually that was the initial reason to build this whole library, but never got around to build it out). It had a policies store idea (because there would be a store (resources, files, db, OCI registry), which even might provide newer versions for reload), but it had no cache for the compiled modules because of threading (see https://github.com/eshepelyuk/dotnet-opa-wasm/blob/master/spikes/AspNetAuthZwithOpa/Authorization/OpaPolicyHandler.cs#L33)
The idea to separate store from runtime cache was that the store could be a shared remote Redis (think Web server farm), whereas the compiled module cache would be per machine (after all remoting that would be pointless).
What sort of stopped me was "ok, now how do I decorate my controllers with data & pass input". My ideal use case was "don't check roles only, but provide input as to the item in question" (role Editor but only for Sports). And maybe call a builtin callback that does a eg database check.
Also, as a kind of note we should nevery use Policy without prefixing it with Opa - otherwise authZ in ASP.NET gets really hard do understand re: what comes from where.
After plucking my memory on what I wanted to do and the use cases I envisoned: I was thinking about hiding the OPA workings behind a layer that was more business layer-y. Not exposing the OPA lowest layer to the consumer of the library. Having said that, I think interfaces on that lowest layer is a bit excessive (don't add flexibility unless you can prove you need it).

Regarding serialization: what would be a real-world use case to not use STJ? For Web APIs, I understand the use cases. But deserializing for from/to OPA wasm is very specific and not really up to "configuration".

Blindly serializing with STJ is ignoring that people other than OPA have serialization concerns.
If my application has custom contract resolvers, I wouldn't be able to use them. Worse, if I had already written them, but my application is using the more mature Json.Net, I would be forced to rewrite them just to use a library.  The ultimate output is valid json, so who cares if calling serialize on a giant object results in a small representation, and vice versa on deserialize.
Another example is casing on properties. Teams have opinions about how things should be serialized, and OPA is case sensitive on inputs and data. A library should not force me to use their opinion so long as my usage doesn't actually break anything.
Another example is quoted numbers. This case can cause OPA problems if using a different number culture, as I demonstrated in a playground earlier, but it's absolutely a thing OPA can handle with to_number if the user wants to.

So mixing the "metal" layer with a "convenience" layer. The current method signatures play along the lines of the JS API. And I want to keep it simple at the lowest layer because otherwise reasoning where the bug comes from is super-painful.
Oh, and issue #5 has a couple of API discussions too that I totally forgot about.

Regarding runtime: I did change the runtime once (Wasmer to Wasmtime) and I had to change my object model for a couple of major Wasmtime changes. Those were super-breaking changes to how Opa.Wasm worked. So I don't think abstracting the actual runtime will work great.

I remember looking at your Wasmer code (I've been silently following this repo for over a year), and thought I had a way that supports both, but I'd have to go back and look again.  Besides, I never said major breaking changes can't be a thing.  It would just be easier to avoid major breaking changes for consumers if they are dependent on an interface contract instead of a concrete class.

Also, as a kind of note we should never use Policy without prefixing it with Opa - otherwise authZ in ASP.NET gets really hard do understand re: what comes from where.

I agree for a general library. I was mixing terminology between what I have in my current implementation using 0.20.0, and what I was suggesting for DI in the library.  My implementation has an entirely custom authorization structure, so policies have nothing to do with ASP.NET in my codebase.

So mixing the "metal" layer with a "convenience" layer. The current method signatures play along the lines of the JS API. And I want to keep it simple at the lowest layer because otherwise reasoning where the bug comes from is super-painful.

Fair enough. This could be resolved with a decorator pattern.  Provide both IOpaPolicy and IRawOpaPolicy that can be injected. IOpaPolicy only exposes the typed methods, accepts IRawOpaPolicy as a dependency. It calls handles all serialization/deserialization needs and calls IRawOpaPolicy.  If a user needs the lowest level layer, they inject IRawOpaPolicy instead.  The builtin delegates would be an issue to resolve, though.

I have cooked up an unfinished draft of how a Factory could work: https://github.com/christophwille/dotnet-opa-wasm/tree/master/spikes/HigherLevelApisSpike - start at Program.cs plus the comments in the IFactory... file.
The idea here is that most everything for PolicyFactory is optional except loading. One could use it with module caching, with a custom serializer, with SetData being called before the Policy object is handed out. The naming comes from ArrayPool.
Note that it doesn't compile at all. It really is intended for discussion what would be needed.

Regarding DI/policy provider: I have a very old prototype in the spikes folder - AspNetAuthZwithOpa (actually that was the initial reason to build this whole library, but never got around to build it out). It had a policies store idea (because there would be a store (resources, files, db, OCI registry), which even might provide newer versions for reload), but it had no cache for the compiled modules because of threading (see https://github.com/christophwille/dotnet-opa-wasm/blob/master/spikes/AspNetAuthZwithOpa/Authorization/OpaPolicyHandler.cs#L33)
The idea to separate store from runtime cache was that the store could be a shared remote Redis (think Web server farm), whereas the compiled module cache would be per machine (after all remoting that would be pointless).
What sort of stopped me was "ok, now how do I decorate my controllers with data & pass input". My ideal use case was "don't check roles only, but provide input as to the item in question" (role Editor but only for Sports). And maybe call a builtin callback that does a eg database check.

What I did was leave the compiled module in memory, and just put the data to be loaded into an instance of the module in Redis. To my knowledge of the current implementation, the Store (and maybe the Linker) is the only thing that isn't thread safe, and those are made per policy instance.  I'll hunt for the code later, but I also did some threading tests and timing to confirm that the instances work as expected.

I have cooked up an unfinished draft of how a Factory could work: https://github.com/christophwille/dotnet-opa-wasm/tree/master/spikes/HigherLevelApisSpike - start at Program.cs plus the comments in the IFactory... file.
The idea here is that most everything for PolicyFactory is optional except loading. One could use it with module caching, with a custom serializer, with SetData being called before the Policy object is handed out. The naming comes from ArrayPool.
Note that it doesn't compile at all. It really is intended for discussion what would be needed.

This is very similar to what I am suggesting, with different names. Policy and OpaPolicy are exactly the decorator pattern I was just suggesting. It has one important difference, though. The OpaPolicy itself is cached instead of just the module. I've already run tests to find out that loading the module is the time hit, not instantiating the OpaPolicy. The instance is what has specific data, as well.  What I found is that calling SetData within my factory was only helpful for static information. Especially in the case of user authorization, it was more helpful to provide the policy as an injection, and let the calling code set whatever it needs - calling a db, pulling info from cached reflection, transforming information from elasticsearch, etc (I do exactly this).  For exactly this reason, I don't think caching the policies themselves is a good idea. A user can set whatever they want in there, and it might need to be transient or scoped. Trying to pool the policies themselves is only sweeping the threading problem under the rug. If they need a synchronization mechanism, use one on every memory manipulation.

As an aside, I think the ability to load a module from an opa bundle, not just the wasm, is important because bundles have a data.json file which we should honor on first load of any instance of the policy.

That was not obvious to me from the sample code.  So, that means we are talking about doing the same thing. Having a thing that supplies instances of policies to users.  I don't understand why you need an object pool for the modules, though. As far as I can tell, the Store is the only thing that needs special care for threading, and current implementation already makes a new instance of that for every OpaPolicy. It has nothing to do with the Module itself, just the creating factory.
Here's the factory I had started writing a few days ago based on my other implementation.  https://github.com/willhausman/dotnet-opa-wasm/blob/dependency-injection/src/Opa.Wasm.DependencyInjection/OpaPolicyFactory.cs and some tests for some clarification on how it gets used https://github.com/willhausman/dotnet-opa-wasm/blob/dependency-injection/src/Opa.Wasm.UnitTests/DependencyInjectionTests.cs.
Ignoring how DI itself works, you basically tell the factory about what modules you care about (either by name or by Type, but I didn't flesh out doing it by name. It's the same thing, though). And then you can ask it for an instance of that policy.  There is a single instance of the module loaded into memory with the factory, rather than a pool of potential cached modules to pick from.  Associating them with types/names allows the factory to easily manage multiple policies loaded into a single execution, as shown by the test with two implementations registered.

Maybe my memory is failing me what is thread-safe and what isn't.... will have to ask (my ASP.NET sample was way old, so there might be the issue).

I have adapted the spike to the discussion with Peter (I seemingly did factor the object model according to his recommendations).
With the clarification of the Module being thread-safe I was able to strip everything down to basically https://github.com/christophwille/dotnet-opa-wasm/blob/master/spikes/HigherLevelApisSpike/IPolicyFactory.cs#L7 only serde being needed for the Policy, and the PolicyFactory being simple as can be.
That now really begs the question if everything we need to do is have serde configurability on the existing OpaPolicy class + the factory pieces - and do away with the pesky additional layer of Policy object.

If you want to entirely replace the string Evaluate(string json) with T? Evaluate<T>(object input) and always use the IOpaSerializer, then no, the decorator Policy object is not needed.  That's the implementation I suggested above, minus the EvaluateRaw() execution path.
I don't think you need the abstraction for IOpaModuleCache though.  It's really just a dictionary of policynames to either Module instances or bytes, no?  ConcurrentDictionary will do that and we don't have to worry about thread locks with a cache object.
Also, see https://github.com/bytecodealliance/wasmtime-dotnet/issues/89.  We may be fine for caching modules, but the instances themselves still have a potential threading issue that we might want to try and address.  I don't know how well it work, but one thought that comes to mind is wrapping the implementation of Evaluate() and SetData() with a lock.  Super heavy-handed, but it would mean only one thing can execute at a time and alter state within that instance.

OpaPolicy should remain a one-off instance that is not reuseable. No locks. A cheap throw-away object. Module caching it is.
My separate interface for caching was a stand-in for IMemoryCache DI use cases. Yes, mostly because of expirations and stuff that it can do in addition to ConcurrentDictionary. Otherwise it would do the trick. And yes, you can certainly use it by implementing the interface (maybe a good idea to provide one for unit testing).
Currently I am leaning towards adding typed methods like EvaluateTyped and SetDataTyped (I am not too keen on renaming the existing ones to *Raw although we are not API stable at all at this point - maybe SetDataJson and EvaluateJson?).

Recently discovered IMemoryCache isn't thread safe in .NET Core like it is in .NET Framework. FYI.
I'm more partial to SetDataJson and EvaluateJson, since I see those as "the advanced use case" scenarios.

We need to use the same instance of Engine for instantiations, so that will need to be stored along with the module, per https://github.com/bytecodealliance/wasmtime-dotnet/issues/90.  I just do this with a little record in the factory.
private sealed record Runtime(OpaRuntime OpaRuntime, Module WasmModule);

So, after pulling it from the cache, it's just new OpaPolicy(runtime.OpaRuntime, runtime.WasmModule);.  Probably something like InstantiationContext would be a more appropriate name than Runtime, though.

With the discussion in https://github.com/bytecodealliance/wasmtime-dotnet/issues/90#issuecomment-1028267439 (the need to keep module & engine around when "caching" the compilation step): instead of an extra data structure, why not adapt the object model to the realities (it is mostly a turning OpaRuntime into OpaPolicyModule).
using var rbacModule = OpaPolicyModule.Load(bytesArr);
using var rbacPolicy = rbcModule.CreatePolicyInstance();

In this "one-off" use case the Wasmtime.Engine is owned and dispsed by the OpaPolicyModule.
using Wasmtime.Engine engine = OpaPolicyModule.CreateEngine();
using var rbacModule = OpaPolicyModule.Load(bytesArr, engine);
using var rbacPolicy = rbcModule.CreatePolicyInstance();

Here the user is responsible for the lifetime of the engine, the module only has a reference. The CreatePolicyInstance method comes from the fact that there'd remain only one ctor on OpaPolicy, and I'd like to make it internal (after all, the OpaPolicyModule is a Factory for OpaPolicy).
And yes, have an interface on OpaPolicy so it can be mocked.

I'm thinking IOpaSerializer should be customizable per module, not for the whole nuget.  Reason being, it's no harder to code, and it's more flexible for calling code to be able to share wasms between projects with different settings (which I am doing, as some older code gets merged with newer code).
I don't want to lose sight of the goal I actually set out to accomplish here - getting a public interface on at least the concrete OpaPolicy, and a way to manage dependency injections without needing to know how to instantiate a policy.  In other words, with just a wasm file path.  In the most optimal solution, I can also register an injection of a particular type, similar to injecting ILogger<MyClass> for any service that wants to categorize its logs by MyClass.  IOpaPolicy<MyClass>.  That's just a decorator that only a factory would have use for, but I don't want to lose sight of it because the implementation of said factory could make that difficult to accomplish.
Here's a quick gist of how it could work in general. It makes use of an enumerable injected OpaModuleBuilder that can be configured at startup, and then defer populating the factory until instantiation.  Those could be used directly in the IOpaCache idea, or whatever.  I am interested in this deferred approach because it allows me to distribute calls to .AddOpaPolicy() to let extensions live with their respective projects.  A policy in my Domain.csproj for complex business logic doesn't necessarily need to know about the policy I've defined in my Web.csproj for authorization, etc. https://gist.github.com/willhausman/8ca89dafb1b8743413d3b6567cb8071c

I took forever to write that comment and you commented before I finished. Ha!  I don't think the two ideas are incompatible. I even referenced an OpaModule object that keeps ahold of the Engine.  I think the two can be put together easily enough.

I am still trying to grok your gist (a bit too early in the morning for that much indirection).
Before I get into this, my background (see also #5): I came at this from the perspective of a server-side application. From observability. From managing the policies is a different person from the developer of the application. From the location of the policies better be a central place (server farm scenario).
Esp. the latter point makes AddOpaPolicy look out of place for my approach. Is injecting the factory a huge deal compared to injecting a "something" that consists mostly of marker interfaces?
That however brought the topic of the consumer to my mind... a problem from the very beginning bugging me: does a call site want to deal with OPA directly or use something that knows about OPA and nicely provides an API for that specific policy:
public class MyRbacPolicy
{
 public MyRbacPolicy(IOpaPolicyFactory factory) {}
 public bool CallMe();
}

And adding that wrapper .AddTransient - wouldn't that make more sense? All OPA is hidden from the call site, the custom object deals with the factory and all OPA specifics.

I went ahead and did the low-level refactoring OpaRuntime -> OpaPolicyModule. That made the thread safety test go away because you can't pass a new Engine to an existing Module any more. Unexpected win, but nice.
https://github.com/christophwille/dotnet-opa-wasm/blob/master/src/Opa.Wasm/OpaPolicyModule.cs
Doesn't look too dissimilar to OpaRuntime, Load is the factory method. Simple search & replace worked on the unit tests, so not much hassle for current users of the library. What are your thoughts now that this "real"?

Recall that I am thinking of a separate nuget package for dependency injection.  Almost my entire gist could live instead a package specifically for dependency injection, e.g. Opa.Wasm.Extensions.DependencyInjection or something similar.  The only thing it really needs is OpaPolicy : IOpaPolicy.  It would be convenient if OpaPolicy<TClient> : OpaPolicy, IOpaPolicyClient<TClient> also lived there to ensure the contracts were always up to date, but even that could be a decorator instead of a subclass if needed.
This makes loading policies directly with your application a capability, rather than the intended use case.  A server farm of policies maintained by separate people are one capability, and this is another.  My thinking here is quite simple: OPA can make complicated logic ridiculously simple and fast. It can be used for domain-specific business logic.  I am presently using it to build out row and column security for dynamic sql tables in a micro service that other microservices don't know anything about, nor do they know how to obtain the metadata to populate the data for that policy.  It even uses a builtin to call another wasm that other microservices do know about.  CICD allows the .rego for this one domain-specific need to live with the code and be re-built to always be up-to-date with deployments.
It boils down to this guy from my gist being able to call OpaPolicyModule.LoadModule(name, content) (with renames between OpaPolicyModule and OpaModule. They're the same thing):
internal class OpaModuleFactory : IDisposable
{
  private readonly bytes[] wasmContents;
  private readonly IOpaSerializer serializer;
  public string PolicyName { get; }

  public OpaModule CreateModule();
}

public class MyRbacPolicy
{
 public MyRbacPolicy(IOpaPolicyFactory factory) {}
 public bool CallMe();
}

Regarding this, my answer is yes with a caveat.  That is exactly what the intention of Consumer.cs is, except it has already done the step of calling factory.Create(name) to get an instance of the policy to run with CallMe().  If the calling code does not want to register a specific IOpaPolicy<TClient>, they could just inject IOpaPolicyFactory and call factory.Create(name) themselves.  Both routes work (and could be simultaneously supported).  It's just one step further to make managing even the policyName automated down to a type.
public class MyRbacPolicy
{
 public MyRbacPolicy(IOpaPolicy<MyRbacPolicy> policy) {}
 private Setup(); // register builtins, etc.
 public bool CallMe() => policy.Evaluate(my params);
}

I am not at all convinced about IOpaPolicy - especially because that is doing zero zilch nothing for the library itself (compare it to IStream eg). There isn't going to be another class implementing IOpaPolicy.

I am not at all convinced about IOpaPolicy - especially because that is doing zero zilch nothing for the library itself (compare it to IStream eg). There isn't going to be another class implementing IOpaPolicy.

And yes, have an interface on OpaPolicy so it can be mocked.

Sounds like you're tired and talking back and forth on yourself.. :)
Does it hurt something to provide a public contract in the form of an interface? If a policy instance can be directly injected without a factory, it becomes much harder to mock.

What's the point of the interface is the better question

so it can be mocked.

You said it yourself.  With good design, you depend on abstractions, not concrete implementations, so it is easier to test in isolation, and refactor in isolation. The library itself does not need to have a use for the interface beyond enabling calling code to follow good coding practices.  Dependency Injection can take advantage of that (obviously, it's the Dependency Inversion Principle in SOLID), but it is not the only reason to do so.

Updated my gist https://gist.github.com/willhausman/8ca89dafb1b8743413d3b6567cb8071c to show the 3 use cases all supported in Consumer.cs.  It ultimately all comes down to two signatures,
public interface IOpaPolicyFactory
{
  IOpaPolicy CreatePolicy(string policyName);
  IOpaPolicy CreatePolicy<TPolicyName>();
}

Which under the hood are the exact same call to the OpaPolicyModule.CreatePolicy() method you created, after finding the right module based on policyName.

Status: played some more with https://github.com/christophwille/dotnet-opa-wasm/tree/master/spikes/AspNetAuthZwithOpa to see how prescriptive / opinionated things can / should be. Not convinced yet on any one strategy or providing it at all.


[Question] Whats all involved to move tests to a ./tests/ folder?

this isn't the right place I am assuming to ask this but... right now with react-slingshot tests are bundled with the actual components, reducers, and such in src/ but I wanted to move them out to something like below...what all is involved to accomplish this?
./fooproject/
  - src/
    - components/
      - Component1.jsx
  - tests/
    - components/
      - Component1.test|spec.jsx

Refer to the Jest documentation for more explanation, but basically add another property to the jest property in package.json like this, https://github.com/nickytonline/ts-react-starter/blob/master/package.json#L29

thanks @nickytonline


Add support for a log bucket

what

Add support for access logs bucket

why

Consumers will not be required to create their own buckets anymore

references
N/A

/test all

/test all

/test all

/test all


./release.sh produces tags of different lengths, across certain hosts

Background
Digest entries in the manifest file are produced here:
https://github.com/lightninglabs/lightning-terminal/blob/43ac9fac94cd158e1b7c560555f2a7b565c307f9/release.sh#L91
Assigned from here:
https://github.com/lightninglabs/lightning-terminal/blob/43ac9fac94cd158e1b7c560555f2a7b565c307f9/release.sh#L33
Called from here
https://github.com/lightninglabs/lightning-terminal/blob/43ac9fac94cd158e1b7c560555f2a7b565c307f9/Makefile#L164C30-L164C45
Defined here:
https://github.com/lightninglabs/lightning-terminal/blob/43ac9fac94cd158e1b7c560555f2a7b565c307f9/make/release_flags.mk#L1C23-L1C42
Issue
@ViktorTigerstrom produced a build with an extra character, a, at the end of the tag
lightning-terminal-darwin-amd64-v0.13.995-experimental-1-g8da6c29a

On two different hosts[1], after running
make release tag=v0.13.995-experimental

a build with tags without the a character, at the end of the tag are produced
lightning-terminal-darwin-amd64-v0.13.995-experimental-1-g8da6c29

[1] Hosts running:
git version 2.46.2
git version 2.30.2
Reproduce

[ ] Reproduce git tag with extra a character

@ViktorTigerstrom report the output of
git describe --tags
git --version

[ ] Determine any differences in git describe has occurred between the git versions

@dstadulis thanks!
git describe --tags when having pr #853 checked out results in:
v0.13.995-experimental-1-g8da6c29a
git --version is:
git version 2.45.2

Just a general/drive-by comment that litd release builds are NOT yet fully reproducible. I think there might be other things than just the git tag that could cause differences in the build (biggest unknown being the frontend/UI/NodeJS build, not sure if that can even be made reproducible in the first place).

have a fix for the git tag issue, targeting to post soon.
Will create an issue cataloging the factors that affect reproducibility

Fixed in https://github.com/lightninglabs/lightning-terminal/pull/864


Jy/auth storage

@nyjy85 What is this?

@yury-dymov sent a pull request for the wrong repo. Closed.


Exceptions in running C and JAVA plugin

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/core/runtime/CoreException has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
My jdk and jre are both 1.8.
How can I  fix this ？

Hi @RebeWu,
You can check the java -version and javac -version, and then run ./gradlew clean.

I am afraid it didn't work and I have tried lots of methods from the SO, none of them work.

By the way, the maven dependency (refinder) in refdiff-evaluation also missed in Maven Repository.


importer: Batch ingest multiple sst in once call.

What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
TiKV can load a large size of data by importer. All of these data will be send to each replica of the region and  written into a sst and then propose a special command to ingest the sst into RocksDB.
If there are a lot of sst file waiting to be ingested, TiKV must process them one by one and it is to inefficient. Because TiKV must encrypt file in cloud environment, the encryption manager will slow down the ingest operation.  So I batch multiple sst files to ingest them together.
What is changed and how it works?
I will store the sst in a vector and ingest them before flush the WriteBatch. If one region is overlap with the other region which has a ingest file waiting to be processed, all of the file will be ingested at once. And every region only allow ingest one file once.
There are some order constraints that commands must observe:

Every region could  only store one SST each CF  in batch. If there are two RaftCmdRequest and each of them has one ingest request, apply-thread must flush the previous one at once.
If there  have been some entries of the same region  stored in WriteBatch, we must flush them at once before processing an ingest request.
If there have been one ingest request of the same region stored in pending_ingest_sst, we can still process other put request. Because every time before we flush all data into RocksDB, we will ingest the sst in pending_ingest_sst at first.
We use last_sync_apply_index as an index of which one Region has written into RocksDB (not WriteBatch).

Related changes

PR to update pingcap/docs/pingcap/docs-cn:
PR to update pingcap/tidb-ansible:
Need to cherry-pick to the release branch

Check List
Tests

Unit test

Side effects

Performance regression

Consumes more CPU
Consumes more MEM

Breaking backward compatibility

Release note

No release note

 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.


⚠ Turnos 24x7 has degraded performance

In 01509fe, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 984 ms

Resolved: Turnos 24x7 performance has improved in 55dc376.


Accessibility violation for ibm-label

ibm-label component
The following accessibility violation is fixed
The  element does not have descriptive text that identifies the expected input
https://github.com/IBM/carbon-components-angular/pull/1502

Closed by #1502


Update index.html

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign jstrachan
You can assign the PR to them by writing /assign @jstrachan in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jstrachan: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

pr
9704bd5a6130bc573dd12f6ff263d5ab14cb1cda
link
/retest

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.


[WIP] keep module name string objects

Closing for now. This is probably not worth it, because we should try to store the modules themselves which would be more helpful than just the full_name.


fe homework-14

goal:
achieved todo using Redux.
screenshot :

Metric
Value

alert_status
:white_check_mark: OK

bugs
0

code_smells
0

reliability_rating
A (0 Bugs)Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)Note: A being best, E being worst

vulnerabilities
0

Metric
Value

alert_status
:x: ERROR

bugs
0

code_smells
1

reliability_rating
A (0 Bugs)Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)Note: A being best, E being worst

vulnerabilities
0