swc-node/register does not pick up swcrc correctly

Overview
There does not seem to be a way to run something along the lines of this, and have it pick up the .swcrc file:

node -r @swc-node/register src/test.ts

Even the suggested SWCRC environment variable doesn't work:

SWCRC=1 node -r @swc-node/register src/test.ts

Configuration
Create a simple project which uses decorators, which are not enabled by default in swc.  (There's nothing special about decorators, just that they are something which requires enabling explicitly in the config.)
.swcrc
Note decorators are enabled here.
{
	"$schema": "https://json.schemastore.org/swcrc",
	"env": {
		"targets": {
			"node": "18.12.1"
		}
	},
	"jsc": {
		"externalHelpers": false,
		"keepClassNames": true,
		"loose": false,
		"parser": {
			"decorators": true,
			"decoratorsBeforeExport": true,
			"dynamicImport": false,
			"exportDefaultFrom": false,
			"exportNamespaceFrom": false,
			"functionBind": false,
			"importMeta": false,
			"jsx": false,
			"privateMethod": false,
			"syntax": "typescript",
			"topLevelAwait": false
		},
		"target": "es2016",
		"transform": {
			"decoratorMetadata": true,
			"legacyDecorator": true
		}
	},
	"minify": false
}

package.json
Note that this includes ts-node as a way to show the expected behavior.
{
	"devDependencies": {
		"@swc-node/register": "1.6.2",
		"@swc/cli": "0.1.62",
		"@swc/core": "1.3.36",
		"@tsconfig/node-lts-strictest": "18.12.1",
		"ts-node": "10.9.1",
		"typescript": "4.9.5"
	},
	"engines": {
		"node": ">=18.12.1 <19",
		"npm": ">=8.19.2 <9"
	},
	"name": "swc-decorator-test",
	"private": "true",
	"scripts": {
		"swc-cli": "swc ./src -d build",
		"swc-node": "node -r @swc-node/register src/test.ts",
		"swc-node:withConfig": "SWCRC=1 node -r @swc-node/register src/test.ts",
		"ts-node": "node -r ts-node/register src/test.ts"
	},
	"version": "1.0.0"
}

tsconfig.json
{
	"extends"<EMAIL_ADDRESS>	"compilerOptions": {
		"experimentalDecorators": true
	}
}

src/cached.ts
The decorator implementation — a really simple memoizer.  Again, the details here don't actually matter, but I wanted something working.
export const cached = <T>(
	target: Object,
	propertyKey: string | symbol,
	descriptor: TypedPropertyDescriptor<T>
): TypedPropertyDescriptor<T> => {
	const funcName = `@cached(${(target as Function).name}.${String(propertyKey)})`;
	const getter = descriptor.get;
	if (getter == null || getter.length > 0) {
		throw new Error(`Expected a get function: ${JSON.stringify(descriptor)}`);
	}
	const values = new WeakMap();
	const wrapped = ({
		[funcName](): T {
			if (values.has(this)) {
				return values.get(this);
			}
			const result = getter.apply(this);
			values.set(this, result);
			return result;
		}
	})[funcName] as () => T;
	return {
		...descriptor,
		get: wrapped,
	}
};

src/color.ts
This is where the problems will happen, as it's where the decorator is used.
import {cached} from "./cached";

export class Color {
	constructor(
		public readonly name: string,
		public readonly hex: string,
	) {
		if (!/^[0-9a-fA-F]{6,8}$/.test(hex)) {
			throw new Error(`Invalid hex code, 6 hex digits expected: ${hex}`);
		}
	}

	@cached
	public get rgb(): string {
		return this.hex.replace(/^(..)(..)(..)(?:..)?$/, (_h, hr, hg, hb) => {
			const r = parseInt(hr, 16);
			const g = parseInt(hg, 16);
			const b = parseInt(hb, 16);
			return `rgb(${r}, ${g}, ${b})`;
		});
	}
}

src/test.ts
The script which will actually be run.
import {Color} from "./color";

const rebeccaPurple = new Color("rebeccapurple", "663399");

console.log(rebeccaPurple.rgb);

Steps to reproduce

Run: npm run swc-cli.  Note that it compiles just fine:

Successfully compiled: 3 files with swc (7.2ms)

Temporarily rename .swcrc to something else and retry that previous step.  Note the expected failure, as swc doesn't like decorators but can no longer see the config:
> swc ./src -d build

  × Unexpected token `@`. Expected identifier, string literal, numeric literal or [ for the computed key
    ╭─[src/color.ts:10:1]
 10 │           }
 11 │   }
 12 │
 13 │   @cached
    ·  ─
 14 │   public get rgb(): string {
 15 │           return this.hex.replace(/^(..)(..)(..)(?:..)?$/, (_h, hr, hg, hb) => {
 16 │                   const r = parseInt(hr, 16);
    ╰────

Caused by:
    Syntax Error

Rename the config file back to .swcrc and ensure the cli can compile successfully again.

Run npm run ts-node.  Note that it runs just fine:

rgb(102, 51, 153)

Run npm run swc-node.  Note that it fails with the above error.  (This is poor developer experience, based on how swc-cli picks up the config correctly, but y'all do you.)

Run npm run swc-node:withConfig, which uses the documented SWCRC environment variable.  Note that it still fails.

Expected behavior
Personally, I'd prefer if register did the intuitive thing and picked up the .swcrc file.  Barring that, I'd be happy if the SWCRC environment variable worked as documented.  That's a bit awful, as it means all my scripts which look like node -r @swc-node/register ... will now need SWCRC=1 prefixed to them ... but that's not the end of the world.
Or, if there is some other way to make register see the .swcrc, I'm all ears.

Not to be "that guy" but it works for me even without SWCRC=true.
$ cat .swcrc
{
  "env": { "debug": true }
}

This causes a whole bunch of extra debug to be printed when I run with SWCRC=1 (& technically the docs say SWCRC=true I think but both work for me).

Oh interesting. But it doesn't work if I'm using @swc-node/register/esm as the -r flag. So I wonder if you're in a similar code path.

Aren't you supposed to use --loader instead of -r for @swc-node/register/esm?


Tag v0.13 does not seem to connect to a bootnode

Tag v0.13 does not seem to connect to a bootnode.

Did you do “purge-chain” command before syncing?
Could you provide node log please.

Hi @emielvanderhoek, as I can see your node works well. Can I close it?


There is no version 7.0.2 in NPM packages

Describe the bug
I found that there is a bug fix about "Fix UMD Builds to use CommonJS-based Libraries" in version 7.6.2. And it's important for my project. But in NPM packages, there is no version 7.6.2. It just jumped from 7.6.1 to 8.0.0.
Expected behavior
It will help a lot if you could release version 7.6.2 on NPM. Because it can help users who use ^7.x in their package.json. But if you tell me, just update to version 8.0.0, I will accept this too.
Screenshots

Hey @maoqxxmm , 7.6.1 contains the fix for the react-dnd package, and 7.6.2 applies that fix to react-dnd-html5-backend. Sorry for the confusion
Starting with 8.0, you can install react-dnd-umd-builds to get UMD versions of both.


Merge development to master branch so as to publish next release

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

Coverage decreased (-0.9%) to 58.132% when pulling bd953e551c9dbbdf8cd88eb233f65d06baf71192 on development into a193a1a9c50db438c1b13a0933693dc524c5f24f on master.


Remove reactive-streams-junit5-tck and switch back to plain RS TestNG TCK

This removes the reactive-streams-junit5-tck JUnit5 shim around the RS TCK.
TCK checks have been moved to the reactive-streams-tck-tests module, using plain TestNG, and running using a dedicated JUnit 5 engine.
Closes #782

Note that the assumption is that no downstream project consumes reactive-streams-junit5-tck beyond Mutiny.


fix fix ES query dsl is wrong after FE restarted.

Proposed changes
Issue Number: close #14651
Some of default properties of ES catalog is not persisted in EditLog. So when FE is restarted, the default poperties is lost, such as elasticsearch.doc_value_scan, elasticsearch.keyword_sniff and so on.
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[x] No
[ ] No Need

Has document been added or modified:

[x] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

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...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 35.02 seconds
load time: 436 seconds
storage size:<PHONE_NUMBER>4 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221128145024_clickbench_pr_54506.html


WMTS shifted

Hi,
we're using the mapfish-print [1] integrated in the geoserver via a plugin [2] and are experiencing an issue with an WMTS layer being shifted in comparision to a WMS layer above.
The Satellite image being the WMTS and the colored lines comming from an WMS.
What is even more odd is that it works for some scales but at some point when zooming out it starts being shifted randomly in different directions per scale.
The Map that is printed is integrated in an GeoExt application and the Map it self and print preview looks just fine, only the resulting PDF shows the issue.
We tried to track the issue down but are having a hard time to do so. Did anyone come accross some similar issue?
[1] print-lib.jar 2.1.0
[2] geoserver-printing-plugin <IP_ADDRESS>

if that makes a difference, the data is not WGS84 it is a projection for austria EPSG:31256 [1]
[1] http://spatialreference.org/ref/epsg/mgi-austria-gk-east/


Add TTL on the cell mutation level and the BoundDMLQuery

Currently, the BoundDMLQuery does not carry the information about the ttl for a particular Modification.
We need to add this information and propagate it to the CDC producers.

@ivansenic My assumption was that it was for CDC only (based on label) -- if this is more generally applicable, sure, can re-open and just remove the label. At the same time if there is no current need, could also wait for need.
But I'll re-open this since it sounds it could be more generally useful.

I am not really sure.


410 ERROR, when im try to start bot.

Hi, I have a problem and I cant solve for 3 days already.

Im set up settings.json pic imgur
Im set up 2fa auth by wiki  and .maFile work correctly.
And i get:  Error (410) Gone. pic imgur
Thanks for help.

@nnjap that a normal because the creator of this project don't want to merge #1127 in order to correct this types of errors

@nnjap The pull request was merged. Could you please close this issue?


Add bothzoli/ABAP-IoC-Container to list.json

An ABAP inversion of control container (see also this article).

thanks 👍 it might take up to 24 hours for the project to appear on https://dotabap.org

thanks 👍 it might take up to 24 hours for the project to appear on https://dotabap.org


Site is down

Just a heads up, been down for a few days: https://carlosted.github.io/icondata It was really handy.
Thanks for this crate, lmk there's anything we can help with.

Should be fixed as of now. Can you give it a try?
Thank you!

For me, it doesn't work right now.
Thanks for the real good crate, it's a lifesaver in wasm and leptos.

New links are working for me too. Thanks!


Getting callback after completion of sequence

How can I get a callback after an entire sequence of ChainTourGuide's are complete?
eg. Let's say I have 5 buttons - in order - A,B,C,D,E and each of them are a part of a sequence. I am struggling to get a callback when the animation over E (the final button) is complete and the sequence is terminated.
Is there a way to get a callback after this?

https://github.com/worker8/TourGuide/blob/master/app/src/main/java/tourguide/tourguidedemo/ManualSequenceActivity.java


update calculateHostWeight

calculateHostWeight was very strongly favoring the cost of downloading
the file, and making an unreasonable assumption that the average file
(weighted by size) would be downloaded 50 times.
Additionally, the contract price, upload price, and download price were
not being adjusted to match the fact that the storage price only covers
a single block instead of the contract length.
The updated calculateHostWeight function also takes into account the
collateral, although only minimal emphasis is applied. Price is still by
far the dominating factor.

This PR does not have sufficient testing, but I wanted to get it out this morning because the hostdb as appears in the master branch is not acceptable for release.

Mac builds are currently stalling, but the Linux build passed and there's no reason to believe this PR would fail on Mac


How can i get all the devices subscribed to a particular FCM topic?

This is not currently possible, as answered in all of these StackOverflow posts:

https://stackoverflow.com/a/58380643/5861618
https://stackoverflow.com/a/40861417/5861618
https://stackoverflow.com/a/39632704/5861618
https://stackoverflow.com/a/38379251/5861618


Duplicated system versions

I've upgraded to latest version of pyenv using brew upgrade and with git pull for pyenv-virtualenv however now i get the below output
pyenv versions
* system (set by /usr/local/opt/pyenv/version)
  2.7.9
  3.4.2
  heat_test
  interm_python_class
  python-tutorial-jfine
* system (set by /usr/local/opt/pyenv/version)
  test_blessing_module

Any idea why i do have duplicated system ?
If i run pyenv local 3.4.2 it shows as below
 pyenv versions
  system
  2.7.9
* 3.4.2 (set by /Users/dany/.python-version)
  heat_test
  interm_python_class
  python-tutorial-jfine
  system
  test_blessing_module

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28076697-duplicated-system-versions?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github).

I suspect you have a virtyalenv named 'system'.

@yyuu check the debug output
http://www.hastebin.com/pozuweqeqo.md
and the virtualenv output is
# pyenv virtualenvs
  heat_test (created from /usr/local/opt/pyenv/versions/2.7.9)
  interm_python_class (created from /usr/local/opt/pyenv/versions/2.7.9)
  python-tutorial-jfine (created from /usr/local/opt/pyenv/versions/3.4.2)
  test_blessing_module (created from /usr/local/opt/pyenv/versions/3.4.2)

Hm, thanks for debug log. Probably I found the cause and will fix it.

@yyuu thank you, happy to test it once you pushed out

@DanyC97 It is showing that you have system version at /usr/local/opt/pyenv/versions/system as I expected. I suspect it is a virtualenv. Please review your system configuration again.
204  + [pyenv-versions:53] for path in '"${PYENV_ROOT}/versions/"*'
205  + [pyenv-versions:54] '[' -d /usr/local/opt/pyenv/versions/system ']'
206  + [pyenv-versions:55] print_version system
207  + [pyenv-versions:39] exists system system
208  + [pyenv-versions:27] local car=system
209  + [pyenv-versions:28] local cdar
210  + [pyenv-versions:29] shift
211  + [pyenv-versions:30] for cdar in '"$@"'
212  + [pyenv-versions:31] '[' system == system ']'
213  + [pyenv-versions:32] return 0
214  ++ [pyenv-versions:40] pyenv-version-origin
215  + [pyenv-version-origin:6] '[' -n '' ']'
216  + [pyenv-version-origin:9] pyenv-version-file
217  + [pyenv-version-file:21] find_local_version_file /Users/dany
218  + [pyenv-version-file:7] local root=/Users/dany
219  + [pyenv-version-file:8] '[' -n /Users/dany ']'
220  + [pyenv-version-file:9] '[' -e /Users/dany/.python-version ']'
221  + [pyenv-version-file:12] '[' -e /Users/dany/.pyenv-version ']'
222  + [pyenv-version-file:16] '[' /Users/dany = /Users ']'
223  + [pyenv-version-file:17] root=/Users
224  + [pyenv-version-file:8] '[' -n /Users ']'
225  + [pyenv-version-file:9] '[' -e /Users/.python-version ']'
226  + [pyenv-version-file:12] '[' -e /Users/.pyenv-version ']'
227  + [pyenv-version-file:16] '[' /Users = '' ']'
228  + [pyenv-version-file:17] root=
229  + [pyenv-version-file:8] '[' -n '' ']'
230  + [pyenv-version-file:22] '[' /Users/dany = /Users/dany ']'
231  + [pyenv-version-file:24] global_version_file=/usr/local/opt/pyenv/version
232  + [pyenv-version-file:26] '[' -e /usr/local/opt/pyenv/version ']'
233  + [pyenv-version-file:28] '[' -e /usr/local/opt/pyenv/global ']'
234  + [pyenv-version-file:30] '[' -e /usr/local/opt/pyenv/default ']'
235  + [pyenv-version-file:33] echo /usr/local/opt/pyenv/version
236  + [pyenv-versions:40] echo '* system (set by /usr/local/opt/pyenv/version)'
237  * system (set by /usr/local/opt/pyenv/version)
238  + [pyenv-versions:44] num_versions=7

@yyuu interesting, i had a empty envs sub-dir
#ll /usr/local/opt/pyenv/versions/system/
total 0
drwxr-xr-x  2 dany  admin    68B  8 Nov 18:03 envs/

How that ended up there have no clue.
Thanks for your quick response, pls close it down.


[RFC][vm] Reduce unneeded copy for obtaining resource bytes

Motivation
In our code there's multiple reads from the cache which doesn't really require owning the bytes: only those reads straight from the StateView will return the owned instance of vector bytes. This PR cleans these unnecessary allocations up by using a referenence when possible.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
I ran the cargo bench on txn_benchs. The perf was improved by 2%.

I ran the cargo bench on txn_benchs. The perf was improved by 2%.

Is this run in CI? That would be very useful for preventing regressions by a well-meaning person trying to simplify this code.

I'm working with @sausagee and @rexhoffman to get some metric from the CI code.

I ran the cargo bench on txn_benchs. The perf was improved by 2%.

Is this run in CI? That would be very useful for preventing regressions by a well-meaning person trying to simplify this code.

I'm working with @sausagee and @rexhoffman to get some metric from the CI code.

maybe worth considering using some abstraction like Bytes crate for memory sharing

/canary

:sunny: Canary successful

Old PR, feel free to re-open.


Add new UI theme

[ ]  Expand on concept
[ ]  Add animations
[ ]  Smooth out loading (maybe preloading them one by one, spread over many frames. Instead of on demand or at file load) (maybe adding animations is enough if we do use on demand loading)

UI Theme for player done.


[Question]: How to use Bedrock Claude 3.5 Sonnet with LlamaIndex

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
Hi, I'm using Bedrock Claude 3 Sonnet to create document embeddings, running a python 3.11.7 code on an AWS lambda function using this code:
Bedrock(
model="anthropic.claude-3-sonnet-20240229-v1:0",
aws_access_key_id=bedrock_access_key_id,
aws_secret_access_key=bedrock_secret_access_key,
temperature=0,
region_name=bedrock_region
)
This is working fine with Claude 3 Sonnet, however, if I change the model to try using the new Claude 3.5 Sonnet (model="anthropic.claude-3-5-sonnet-20240620-v1:0"), it throws the following error.
llama_index\llms\bedrock\base.py
ValueError: context_size argument not provided andmodel provided refers to a non-foundation model. Please specify the context_size
What does "non-foundation model" means?
What value should be set for this parameter?
I tried to set 512, and it generates error afterwards, when trying to generate prompts for those embedded documents.
"ValueError: Calculated available context size -586 was not non-negative."
I'm using the following package versions:
llama_index==0.10.38
llama-index-embeddings-bedrock==0.1.5
llama-index-llms-bedrock==0.1.8

This error is not coming from our code. Its coming from bedrock
As for what It means exactly, no idea. My best guess, you should provide the full context window size (200000 I believe?)

Bedrock(...., context_window=200000)

After adding the context size parameter with a 200000 value, everything started to work, but still I don't see the same code as the bot suggested: there is no bedrock_modelname_to_context_size function nor a BEDROCK_MODELS property. Are those suggestions pointing at old code or newer versions?

Hi @Breamer , Did you run the claude sonnet model via llama index? Is it working?
Would you provide me the prompt structure?


pretrained model for yolox_seg

Hello, you do not seem to provide a pretrained model for YOLOX segmentation. Are you planning to release that soon?

@mcmingchang
May I ask about the status of this update? Can you have a suggestion about where I can find this pre-trained model? Many thanks.

Any updates on the preordained model?


proposal: Unable to test login with OTP affected/package: testing

Right now, any fmt.ScanX() style function will be skipped over during testing. This makes it pretty much impossible to test a login with an OTP without needing to include some sort of TOTP/HOTP library to convert an example MFA key into its current OTP.
Is there any specific reason to not simply allow the ability to input during a test? I understand that in most conditions you would want to automate the running of tests for CI but in those situations the HOTP/TOTP library could be included.
Preventing these functions from working affect smaller programs and projects using MFA. Enabling it wouldn't affect functionality either.
If there is a specific reason why this is not allowed, I would not mind knowing, and you can feel free to close this after an explanation is provided; it will likely help others too since this is not an entirely uncommon problem.

There are many contexts where stdin may not be available, eg parallel tests. It's better for it to be consistent and reproducible rather than as an alternative command runner.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions


Portrait text command doesn't work

The problem
Describe the bug
The [portrait=xxx] text command does not appear to do anything. The portrait does exist and the name is correct and does not contain any special characters: [portrait=Wave]. There are no errors or warnings.
To Reproduce

Create a character with two portraits ("one" and "two" for example)
Create a timeline
Add a Text node set to the character with portrait "one" and paste this: This should show portrait one. [pause=1][portrait=two]This should show portrait two.
Play timeline

Expected behavior
The portrait would change right after the pause.
System:

OS: Windows 10
Godot Version: 4.1.3.stable.official [f06b6836a]
Dialogic Version: 2.0-alpha-11

Solutions
Workaround
I tried renaming the portrait to lowercase letters [portrait=wave] and wrapping the portrait name in quotes [portrait='Wave'] but neither solved it.

Thanks for the report. I can confirm that this is a bug and that it's easy to fix, so it will be fixed for the next version!


Keycloak backend plugin leads to DOS of Keycloak server

Describe the bug
I have setup the Keycloak backend plugin by following the steps given on below this link - https://janus-idp.io/plugins/keycloak/ .
Syncing the users and Groups will overload our Keycloak instance by doing many parrallel requests
Expected Behavior

All users and groups from keyclock realm should be synced
The Keycloak server should not experience a DoS (Denial of Service).

What are the steps to reproduce this bug?

Keycloak with many users and groups (in my case ~2500 users and 850 groups)
Configure the Keycloak plugin for new backup configuration (using steps from https://janus-idp.io/plugins/keycloak/)

Versions of software used and environment
@janus-idp/backstage-plugin-keycloak-backend": "^2.0.8",
Backstage - 1.30.4<EMAIL_ADDRESS>Temporary Workaround:
During investigation of that problem I used patch-package to patch<EMAIL_ADDRESS>for the project I'm working on.
With that pacht, where I serialized the calls to Keycloak, the problem is not reproduceable anymore.
Here is the diff that solved my problem:
diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index a0e323e..180abfc 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -153,17 +153,19 @@ async function getEntities(entities, config, logger, entityQuerySize = KEYCLOAK_
   const rawEntityCount = await entities.count({ realm: config.realm });
   const entityCount = typeof rawEntityCount === "number" ? rawEntityCount : rawEntityCount.count;
   const pageCount = Math.ceil(entityCount / entityQuerySize);
-  const entityPromises = Array.from(
-    { length: pageCount },
-    (_, i) => entities.find({
-      realm: config.realm,
-      max: entityQuerySize,
-      first: i * entityQuerySize
-    }).catch(
-      (err) => logger.warn("Failed to retieve Keycloak entities.", err)
-    )
-  );
-  const entityResults = (await Promise.all(entityPromises)).flat();
+  const entityResults = [];
+  for (let i = 0; i < pageCount; i++) {
+    try {
+      const entitiesPage = await entities.find({
+        realm: config.realm,
+        max: entityQuerySize,
+        first: i * entityQuerySize
+      });
+      entityResults.push(...entitiesPage);
+    } catch (err) {
+      logger.warn("Failed to retrieve Keycloak entities.", err);
+    }
+  }
   return entityResults;
 }
 async function getAllGroupMembers(groups, groupId, config, options) {
@@ -254,35 +256,36 @@ const readKeycloakRealm = async (client, config, logger, options) => {
       []
     );
   }
-  const kGroups = await Promise.all(
-    rawKGroups.map(async (g) => {
-      g.members = await getAllGroupMembers(
-        client.groups,
-        g.id,
-        config,
-        options
-      );
-      if (isVersion23orHigher) {
-        if (g.subGroupCount > 0) {
-          g.subGroups = await client.groups.listSubGroups({
-            parentId: g.id,
-            first: 0,
-            max: g.subGroupCount,
-            briefRepresentation: false,
-            realm: config.realm
-          });
-        }
-        if (g.parentId) {
-          const groupParent = await client.groups.findOne({
-            id: g.parentId,
-            realm: config.realm
-          });
-          g.parent = groupParent?.name;
-        }
+  const kGroups = [];
+  for (const g of rawKGroups) {
+    g.members = await getAllGroupMembers(
+      client.groups,
+      g.id,
+      config,
+      options,
+    );
+
+    if (isVersion23orHigher) {
+      if (g.subGroupCount > 0) {
+        g.subGroups = await client.groups.listSubGroups({
+          parentId: g.id,
+          first: 0,
+          max: g.subGroupCount,
+          briefRepresentation: false,
+          realm: config.realm,
+        });
+      }ö
+      if (g.parentId) {
+        const groupParent = await client.groups.findOne({
+          id: g.parentId,
+          realm: config.realm,
+        });
+        g.parent = groupParent?.name;
       }
-      return g;
-    })
-  );
+    }
+
+    kGroups.push(g);
+  }
   const parsedGroups = await kGroups.reduce(
     async (promise, g) => {
       const partial = await promise;

This issue body was partially generated by patch-package.

I have prepared a fix for the issue.
Should I fix it in this repo or https://github.com/backstage/community-plugins/tree/main/workspaces/keycloak
@04kash @AndrienkoAleksandr

Hi @JohannesWill, this plugin has been migrated to https://github.com/backstage/community-plugins/tree/main/workspaces/keycloak and won't be maintained in this repository, so feel free to open a PR with your fix there!

Additionally, could you raise this bug in the https://github.com/backstage/community-plugins repo and close this one?

@JohannesWill I opened up a PR and set you as author but I wanted to double check with you on a couple of things right quick as I haven't been able to reproduce the problem, yet.
First, I see that you mentioned using @janus-idp/backstage-plugin-keycloak-backend": "^2.0.8", is there any way you can confirm the version / try a newer version of the keycloak backend plugin? We currently have "@backstage-community/plugin-catalog-backend-module-keycloak": "3.2.2" out as our latest version.
Second, I tested your changes with just 2500 users first, as that was easier for me to create at the time, and didn't notice any issues with the Keycloak server. I was also able to read them in relatively quickly. Could you give me a breakdown of how the groups look in your particular setup? Something along the lines of how many users on average are a part of a group.
Finally, is there anyway you could provide info on how often you are making the sync requests with the app config value catalog.providers.keycloakOrg.key.schedule?

Another update, as I continue to attempt to reproduce. At the moment, I do not see any apparent issues with my Keycloak server during ingestion. My most recent test involved 2550 users and 850 groups where every user was assigned to every group. In the logs I can see:
catalog info Read 2550 Keycloak users and 850 Keycloak groups in 7.3 seconds. Committing...
catalog info Committed 2550 Keycloak users and 850 Keycloak groups in 0.8 seconds.

Could you also provide what version of Keycloak you are using.

We are using Keycloak v20.0.3

Were you able to test with a new version of the Keycloak plugin? I am not seeing any issues whenever I use "@backstage-community/plugin-catalog-backend-module-keycloak": "3.2.2"

I tested with "@backstage-community/plugin-catalog-backend-module-keycloak": "3.2.2" and I observe the same as with
@janus-idp/backstage-plugin-keycloak-backend": "^2.0.8",

So strange, can you explain some of the setup for your users and groups? Are there any subgroups, how many users to a group, and so on. Are there any logs? Either the above that I shown in a comment or any errors?
Sorry for all of the questions. For a little bit of background, we are having a hard time reproducing at the moment and the changes that are suggested are leading to timeout errors when we test them on our end. So, we are trying to figure out a fix that works for you and doesn't lead to any other problems.


Get current user in "OnDisconnectedAsync"

Anybody who can clarify how i get the current user in the  OnDisconnectedAsync method?
Here is my method
        public override async Task OnDisconnectedAsync(Exception exception)
        {
                var user = await _userManager.FindByEmailAsync(Context.User.Identity.Name);

                _chatConnections.Remove(user.Id, Context.ConnectionId);

                await Clients.All.InvokeAsync("UsersLeft", new { userId = user.Id, name = user.Name, photo = user.ProfilePicture });

                await base.OnDisconnectedAsync(exception);
        }

But it doesnt work, as the first line, throws an OperationCanceledException, and the execution of the rest of the method is terminated.

@HaoK I am not quite sure on how to implement the workaround you suggest. Could you elaborate?

In startup, you today have services.AddIdentity<> I am assuming...
So after that add:
services.AddScoped<UserManager<TUser>>();, that should override the AspUserManager that is hookingup the cancellation token with the base class that doesn't, so basically that will disable cancellationtokens for identity.

Oh thanks. I misunderstood, and overcomplicated it then.

Closed in favor of https://github.com/aspnet/Identity/issues/1596


Content Change needed in Footer (Volvo)

In the current footer pictured above for Volvo the text "Volvo shop" Needs to be changed to "Volvo Store"

@cogniSyb can you have a look to this one, please?

Footer link updated: https://develop--vg-volvotrucks-us-rd--netcentric.hlx.page/ @ZoeBeykirch
please confirm is ok.

@manuel-vara @ZoeBeykirch approved!


test(engine): add missing module_view test

Overview
Adds missing test for module_vie.get_module_offset().
Since we're updating transforms and calculation of module offsets for OT3, I'm adding the missing tests separately so that they can be used to verify that the offsets remain same even with the updated transforms.
Changelog

added test_get_module_offset for verifying offsets of all modules

Review requests

anything else needs to be added to the test?

Risk assessment
None.

Also, don't forget to remove this # todo:
https://github.com/Opentrons/opentrons/blob/0c5ef26e15eea336a15c25e3186cf4d775a2964b/api/src/opentrons/protocol_engine/state/modules.py#L528


Added a Quickstart doc for the preemption features

Changes:

Added a Quickstart doc for the preemption features

PTAL @NickrenREN @yuey002 @sxy390

@lintongj please resolve the conflict and then we can merge it


Conditional Generation based on Subgraph

Hello,
I work in drug discovery and am very interested in the application of this model in the generation of drug-molecules which contain a predefined motif, as you demonstrate in Appendix E. Would you be able to share a code example of the node and edge feature masking for motif preserving generation?
Wouldn't this require retraining the model on molecules with the given motif such that the noise model preserves the motif during diffusion? From this I could see how by masking/disallowing transitions for edges and nodes in the motif during denoising and letting everything else denoise regularly would result in structures which extend the motif.... or maybe I'm thinking about this wrong and no retraining is needed?
Best,
Talal

Hello Talal,
The code is based on an old version of the files, but in sample_zs_given_zt we add something like this:
        if self.cfg.scaffold_extension.use:
            # scaffold extension mask operation
            graph_scaffold = self.graph_from_scaffold(scaffold_smile='C1C=CNC2=CC=CC=C21')
            dense_data_scaffold, node_mask_scaffold = utils.to_dense(graph_scaffold.x, graph_scaffold.edge_index,
                                                                     graph_scaffold.edge_attr, graph_scaffold.batch)
            X_scaffold, E_scaffold = dense_data_scaffold.X, dense_data_scaffold.E
            n_nodes_scaffold = X_scaffold.shape[1]

            sampled_s.X[:, :n_nodes_scaffold] = X_scaffold.argmax(-1)
            sampled_s.E[:, :n_nodes_scaffold, :n_nodes_scaffold] = E_scaffold.argmax(-1)

It would probably work better if we preserved the motif during diffusion in training, as was done in https://arxiv.org/abs/2210.05274 for 3D point clouds. As you can see in the figures, the results of our method are not great. We wanted to showcase that substructure conditioning is possible, but we didn't spend much time on it.
Another option that does not involve retraining is to adapt the proposition of RePaint to graphs:
https://arxiv.org/abs/2201.09865 and http://arxiv.org/abs/2302.01217
Best,
Clement

Hi Clement,
Thank you for the response, I didn't realize the substructure conditioning wasn't one of you focuses, so thank you for referencing the other projects.
Looking at the script I can understand how your approach works so thank you for that as well. I can see why other approaches may be better. I recommend doing more work on this task if it suits your interests in the future however because it's quite relevant for drug design and a needed tool, a lot of the time there is an idea of the interactions/motifs desired with a target and we want to generate compounds from that, or we have a compound already and want to generate different components.
Excellent Paper!
Talal

Hello Talal,
The code is based on an old version of the files, but in sample_zs_given_zt we add something like this:
        if self.cfg.scaffold_extension.use:
            # scaffold extension mask operation
            graph_scaffold = self.graph_from_scaffold(scaffold_smile='C1C=CNC2=CC=CC=C21')
            dense_data_scaffold, node_mask_scaffold = utils.to_dense(graph_scaffold.x, graph_scaffold.edge_index,
                                                                     graph_scaffold.edge_attr, graph_scaffold.batch)
            X_scaffold, E_scaffold = dense_data_scaffold.X, dense_data_scaffold.E
            n_nodes_scaffold = X_scaffold.shape[1]

            sampled_s.X[:, :n_nodes_scaffold] = X_scaffold.argmax(-1)
            sampled_s.E[:, :n_nodes_scaffold, :n_nodes_scaffold] = E_scaffold.argmax(-1)

It would probably work better if we preserved the motif during diffusion in training, as was done in https://arxiv.org/abs/2210.05274 for 3D point clouds. As you can see in the figures, the results of our method are not great. We wanted to showcase that substructure conditioning is possible, but we didn't spend much time on it.
Another option that does not involve retraining is to adapt the proposition of RePaint to graphs: https://arxiv.org/abs/2201.09865 and http://arxiv.org/abs/2302.01217
Best, Clement

Hi Clement,
Recently I am working in drug discovery, especially small molecule generation. I found the 'substructure conditioned generation' in Appendix E. Thank you for giving such script to show this function, but it still has a little difficulty in reproducing this function with DiGress. Could you share detailed instruction or code, that will really help me.
Thanks!
Xinyang


ERR_UNKNOWN_FILE_EXTENSION using node >= 12.17

Hi,
try running tap v. 14.10.7 with node v. 12.18.1 and node v. 14.4.0, I get the following error

Everything works using node v. 12.16.3, I guess because in 12.17 they introduce "ECMAScript Modules - --experimental-modules flag removal"

submitted PR https://github.com/tapjs/node-tap/pull/683


Generation of Wrong Snippet for Organization Settings' Item Insights

Describe the bug
The http snippet is described correctly in the docs as :
PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/itemInsights

However the C# snippet interprets given url to new ItemInsightsSettings whereby ItemInsightsSettings is not a type or namespace defined in the metadata. The correct type is "insightsSettings' which is the class from which the navigation property "itemInsights" is an instance of.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var itemInsightsSettings = new ItemInsightsSettings
{
	DisabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
};

await graphClient.Organization["{organization-id}"].Settings.ItemInsights
	.Request()
	.UpdateAsync(itemInsightsSettings);

To Reproduce
Steps to reproduce the behavior:

Go to update ItemInsights Settings Page here and check the example request on the C# tab.

Expected behavior
GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var itemInsightsSettings = new InsightsSettings
{
	DisabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
};

await graphClient.Organization["{organization-id}"].Settings.ItemInsights
	.Request()
	.UpdateAsync(itemInsightsSettings);

Screenshots

Resolved by metadata changes https://github.com/microsoftgraph/msgraph-metadata/commit/a30a791118f6d8247cda05b12b821184392176ce#diff-b565d451684d556752050f2286dfad737a017a978a37b0b311f5b8f9da437728.
Looks like though the published metadata had changed, the devX pipeline had not yet run this latest changes and therefore the docs still were reflecting outdated code.


[Add] VAE training with lance format

Adding the jupyter notebook for the blog post Training a Variational AutoEncoder from scratch with Lance file format

Can you also add it to the main README? THanks!

@AyushExel apologies for the late reply. I have updated the README!


NixOS icon added

Still seems a little big actually, could you post a screenshot next to some of the other icons?
Thanks!

Made icon even smaller, now it looks perfect

Thanks my friend! looks perfect, sorry it took me some time to respond :)


🔨 Add REACT_APP_STOPPED env to front

Issue:
Please, refer to the "Enable/Disable traffic capture CTA" front issue.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 24.50%. Comparing base (054c4a9) to head (2b909ff).
Report is 53 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1564      +/-   ##
==========================================
- Coverage   24.55%   24.50%   -0.05%
==========================================
  Files          14       14
  Lines         558      559       +1
==========================================
  Hits          137      137
- Misses        421      422       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Refactor use of util.format

util.format
Supports %s C style replacement but JavaScript itself supports template literals which are clearer to see the expected output and don't need an import.
A function can be used for composure.
const journeyURLTemplate =
  '%s/json%s/realm-config/authentication/authenticationtrees/trees/%s';
const nodeURLTemplate =
  '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s/%s';

// five minutes later
const urlString = util.format(
  queryAllTreesURLTemplate,
  storage.session.getTenant(),
  getCurrentRealmPath()
);

const response = await generateAmApi(getTreeApiConfig())
    .get(urlString, {
      withCredentials: true,
    })

Becomes
const journeyURLTemplate = ({ host, treename }) => `${host}/json%s/realm-config/authentication/authenticationtrees/trees/${treename}`;
const nodeURLTemplate = ({host, something, somethingElse}) => `${host}/json%s/realm-config/authentication/authenticationtrees/nodes/${something}/${somethingElse}`;

const response = await generateAmApi(getTreeApiConfig())
    .get(journeyURLTemplate({ host, treename }), {
      withCredentials: true,
    })

To disucss


[V1] Modal refactor

Do a full review on the code, sturcture, specificity and try to improve it without delivering a breaking change to react.

Add .iui-modal-content to all modal types.  Currently default does not have it.
Add the option for an icon in front of the title.  #586
Add the option for more than 1 icon in the top right corner.

I think this issue is no longer relevant. ModalContent is usable everywhere, and text-with-icon will be tracked in #586, and multiple icon support is possible after #729.


Please invite me to the Recode-Hive GitHub Community Organization

Name
Vaishnavi Kotturi
Discord Username (if applicable)
No response
Additional Context
I want to contribute

Invitation sent to join the GitHub Organisation. Welcome to the community 🎉
Don't forget after accepting to make it public so it appears on your GitHub profile for everyone else to see. You can do this by finding your name in the GitHub organisation list and change the dropdown to public https://github.com/orgs/Recode-Hive/people


WIP: 🐂 che-theia is removed as supported IDE 🐂

Che-Theia is removed as a supported IDE (see https://issues.redhat.com/browse/CRW-3663)  So the current OCP 4.11+ workspace link gets 404 error. We need to switch VS Code but that requires changing the screenshots to open terminal etc as well. Therefore I marked the PR as WIP for now. My question @eformat is, should we go only for 4.11+ in the docs in main? I think that'd be better as we have now have tags.

looks like this has finally made its way to the operator huh
-- Switch to VS Code as the default Eclipse Che editor #1551
https://github.com/eclipse-che/che-operator/pull/1551
i will merge this to fix it, yes we should update the images now i guess, so they match

Alright then leave it to me as I already have a playground for some other stuff, I'll update the screenshots tomorrow 🤸🏻♀


Unexpected token error on build

I am getting an error when I run the project anyone else have this issue?
ERROR in ./src/components/video_list_item.js
Module build failed: SyntaxError: Unexpected token (7:15)
5 | };
6 |

7 | export defualt VideoListItem;
|                ^
8 |

Since this issue is still open and OP hasn't closed it, he has a typo in spelling "default" as "defualt"


Caddy v0.10.12 cannot build/download with grpc plugin

1. What version of Caddy are you using (caddy -version)?
want to use v0.10.12
2. What are you trying to do?
download
3. What is your entire Caddyfile?
(download failed)

4.
5. Please paste any relevant HTTP request(s) here.

$ wget "https://caddyserver.com/download/darwin/amd64?license=personal"
--2018-03-30 08:38:42-- https://caddyserver.com/download/darwin/amd64?license=personal
Resolving caddyserver.com (caddyserver.com)... <IP_ADDRESS>
Connecting to caddyserver.com (caddyserver.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
...
$ wget "https://caddyserver.com/download/darwin/amd64?plugins=http.grpc&license=personal"
--2018-03-30 08:39:14-- https://caddyserver.com/download/darwin/amd64?plugins=http.grpc&license=personal
Resolving caddyserver.com (caddyserver.com)... <IP_ADDRESS>
Connecting to caddyserver.com (caddyserver.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2018-03-30 08:39:42 ERROR 500: Internal Server Error.
6. What did you expect to see?
7. What did you see instead (give full error messages and/or log)?
8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
download with selecting http.grpc plugin.

Hi, thanks for opening an issue with the template! This appears to be an issue with the grpc plugin, though, and you should open an issue in that repo instead.
For reference, the error in the backend is:
pieterlouw/caddy-grpc/server.go:45:54: cannot use director (type func("context".Context, string) (*grpc.ClientConn, error)) as type proxy.StreamDirector in argument to proxy.TransparentHandler


dist, dev environment, dependencies

Is it possible to list your dev dependencies so this can be used by others? For example, stylus is a dependency but can't be used right now as it's not included.
Best case scenario though, a distribution version of the component should be made available so people using the component does not need to know your dev-dependencies.

here is my demo for this component. And I listed the commands needed.
Will add this list to README for this project late.
Thanks!

@luventa, this has to be addressed. Currently there are 3 related unresolved issues (#27, #45, #56) and 2 pull requests which are workarounds (#54, #61).
List all the devDependencies and setup a build process for a distribution version. I don't mind doing a PR but at the moment it doesn't seem like you're even looking at them.


[BUG] custom_encoder for lists fails

Describe the bug
I was looking at #94 and wrote a set of tests, one of them fails: def test_iplist_ipvany():
It tries to get the json from the below route:
@app.get("/iplist1")
def getiplist(uany: UsingIPvAnyAddress):
    return uany.ips

it seems like a bug in the way the jsonable_encoder function handles the response, namely for a model like
class UsingIPvAnyAddress(BaseModel):
    ips: List[IPvAnyAddress]
    class Config:
        json_encoders = {
            IPv4Address: lambda v: str(v),
            IPv6Address: lambda v: str(v),
        }

it fails at passing the custom_encoder kwarg down the line.
If you want I can check a way to solve this, that's quite the edge case or maybe there's a way to get the result expected (list of ips) correctly without any change but I couldn't find a way.
To Reproduce
Steps to reproduce the behavior:

see file https://github.com/euri10/fastapi/blob/ips/tests/test_ips.py

Environment:

OS: Linux debian buster
FastAPI Version [e.g. 0.3.0], get it with:

from fastapi import __version__
__version__
Out[6]: '0.9.0'

Python version, get it with:

python --version

Python 3.7.2+

Thanks! I'll check it.

@euri10 you are declaring a Pydantic model as a parameter in a GET request.
A Pydantic model is interpreted as a body, but GET cannot receive a body.
Here's a modification using POST, and it seems to work:
from ipaddress import IPv4Address, IPv6Address
from typing import Any, Dict, List, Union

from pydantic import BaseModel
from pydantic.types import IPvAnyAddress

from fastapi import FastAPI, Header

app = FastAPI(version="1.0", title="Could not render component example Swagger")

class UsingIPvAnyAddress(BaseModel):
    ips: List[IPvAnyAddress]

    class Config:
        json_encoders = {IPv4Address: lambda v: str(v), IPv6Address: lambda v: str(v)}

@app.post("/iplist1")
def getiplist(uany: UsingIPvAnyAddress):
    return uany.ips

Although it also works without json_encoders = {IPv4Address: lambda v: str(v), IPv6Address: lambda v: str(v)}, so it might be the case that there was some issue somewhere that got fixed recently.

thanks ind indeed my mistake for the body
this is what solved it maybe:
https://github.com/samuelcolvin/pydantic/commit/f8b946b8c2ddb7fdf8ed77f577db66285258f59b
On Wed, May 15, 2019 at 5:42 PM Sebastián Ramírez<EMAIL_ADDRESS>wrote:

@euri10 https://github.com/euri10 you are declaring a Pydantic model as
a parameter in a GET request.
A Pydantic model is interpreted as a body, but GET cannot receive a body.
Here's a modification using POST, and it seems to work:
from ipaddress import IPv4Address, IPv6Addressfrom typing import Any, Dict, List, Union
from pydantic import BaseModelfrom pydantic.types import IPvAnyAddress
from fastapi import FastAPI, Header
app = FastAPI(version="1.0", title="Could not render component example Swagger")
class UsingIPvAnyAddress(BaseModel):
ips: List[IPvAnyAddress]
class Config:
    json_encoders = {IPv4Address: lambda v: str(v), IPv6Address: lambda v: str(v)}

@app.post("/iplist1")def getiplist(uany: UsingIPvAnyAddress):
return uany.ips
Although it also works without json_encoders = {IPv4Address: lambda v:
str(v), IPv6Address: lambda v: str(v)}, so it might be the case that
there was some issue somewhere that got fixed recently.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tiangolo/fastapi/issues/96?email_source=notifications&email_token=AAINSPWP3NP7RQC7SZOKB7LPVQVMPA5CNFSM4HAQMXS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVPCJUQ#issuecomment-492709074,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAINSPXND4KY4BJF3YWOUKLPVQVMPANCNFSM4HAQMXSQ
.

--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE

Ah! It might be indeed. Thanks for checking and closing the issue :+1:


JAV-432 implement get custmon address(remote address)

Coverage decreased (-0.02%) to 86.449% when pulling da62a6d57baf34f7c085f1919e38de9ad072d183 on jeho0815:master into bbf3f8f1e5f959d65ad842ba2ce02e7a82445288 on ServiceComb:master.

Coverage increased (+0.009%) to 86.476% when pulling 9ce90bbc531666f716318819cc3a23ff8214a0db on jeho0815:master into bbf3f8f1e5f959d65ad842ba2ce02e7a82445288 on ServiceComb:master.


Integration tests failing due to order of tests

Background
While working on a PR found that integration tests were failing, specifically the position of testRevokedCloseRetribution causes testRevokedCloseRetributionZeroValueRemoteOutput to fail in lnd_test.go
Your environment

lnd version 0.5.0-beta commit=v0.5-beta-301-g3ff6055a622b10ea13ac266d5e6d61a770501462-dirty
OSX
btcd

Steps to reproduce
make itest
Result:
  --- PASS: TestLightningNetworkDaemon/revoked_uncooperative_close_retribution (16.18s)
    --- PASS: TestLightningNetworkDaemon/failing_link (6.46s)
    --- PASS: TestLightningNetworkDaemon/garbage_collect_link_nodes (64.94s)
    --- PASS: TestLightningNetworkDaemon/abandonchannel (0.45s)
    --- FAIL: TestLightningNetworkDaemon/revoked_uncooperative_close_retribution_zero_value_remote_output (34.79s)
        lnd_test.go:74: Failed: (revoked uncooperative close retribution zero value remote output): exited with error:
            *errors.errorString unable to find Carol's force close tx in mempool: wanted 1, found 2 txs in mempool: [a5f1345c7de7ed26da6f5958d741f786190aaeee0b965e8989d98a8e2b371556 fc6ac77e008821e245dc2b707a8cc6803ea6a2ea5c7ef391b52620fd73e6199a]
            /Users/christophercoverdale/go/src/github.com/lightningnetwork/lnd/lnd_test.go:6417 (0x17adf7a)
                testRevokedCloseRetributionZeroValueRemoteOutput: t.Fatalf("unable to find Carol's force close tx in mempool: %v",
            /Users/christophercoverdale/go/src/github.com/lightningnetwork/lnd/lnd_test.go:99 (0x1788bf6)
                (*harnessTest).RunTestCase: testCase.test(net, h)
            /Users/christophercoverdale/go/src/github.com/lightningnetwork/lnd/lnd_test.go:12591 (0x17e1d54)
                TestLightningNetworkDaemon.func3: ht.RunTestCase(testCase, lndHarness)
            /usr/local/Cellar/go/1.11.1/libexec/src/testing/testing.go:827 (0x10f590f)
                tRunner: fn(t)
            /usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:1333 (0x105dcb1)
                goexit: BYTE    $0x90   // NOP
FAIL
exit status 1
FAIL    github.com/lightningnetwork/lnd 573.513s
make: *** [itest] Error 1

Original Orderer of Tests:
	{
		// TODO(roasbeef): test always needs to be last as Bob's state
		// is borked since we trick him into attempting to cheat Alice?
		name: "revoked uncooperative close retribution",
		test: testRevokedCloseRetribution,
	},
	{
		name: "failing link",
		test: testFailingChannel,
	},
	{
		name: "garbage collect link nodes",
		test: testGarbageCollectLinkNodes,
	},
	{
		name: "abandonchannel",
		test: testAbandonChannel,
	},
	{
		name: "revoked uncooperative close retribution zero value remote output",
		test: testRevokedCloseRetributionZeroValueRemoteOutput,
	},
	{
		name: "revoked uncooperative close retribution remote hodl",
		test: testRevokedCloseRetributionRemoteHodl,
	},
	{
		name: "data loss protection",
		test: testDataLossProtection,
	},
	{
		name: "query routes",
		test: testQueryRoutes,
	},
	{
		name: "route fee cutoff",
		test: testRouteFeeCutoff,
	},
	{
		name: "send update disable channel",
		test: testSendUpdateDisableChannel,
	},

Moving testRevokedCloseRetribution to end of tests slice causes all the tests to pass:
	{
		name: "failing link",
		test: testFailingChannel,
	},
	{
		name: "garbage collect link nodes",
		test: testGarbageCollectLinkNodes,
	},
	{
		name: "abandonchannel",
		test: testAbandonChannel,
	},
	{
		name: "revoked uncooperative close retribution zero value remote output",
		test: testRevokedCloseRetributionZeroValueRemoteOutput,
	},
	{
		name: "revoked uncooperative close retribution remote hodl",
		test: testRevokedCloseRetributionRemoteHodl,
	},
	{
		name: "data loss protection",
		test: testDataLossProtection,
	},
	{
		name: "query routes",
		test: testQueryRoutes,
	},
	{
		name: "route fee cutoff",
		test: testRouteFeeCutoff,
	},
	{
		name: "send update disable channel",
		test: testSendUpdateDisableChannel,
	},
	{
		// TODO(roasbeef): test always needs to be last as Bob's state
		// is borked since we trick him into attempting to cheat Alice?
		name: "revoked uncooperative close retribution",
		test: testRevokedCloseRetribution,
	},

result:
    --- PASS: TestLightningNetworkDaemon/failing_link (7.01s)
    --- PASS: TestLightningNetworkDaemon/garbage_collect_link_nodes (68.78s)
    --- PASS: TestLightningNetworkDaemon/abandonchannel (0.47s)
    --- PASS: TestLightningNetworkDaemon/revoked_uncooperative_close_retribution_zero_value_remote_output (20.25s)
    --- PASS: TestLightningNetworkDaemon/revoked_uncooperative_close_retribution_remote_hodl (21.16s)
    --- PASS: TestLightningNetworkDaemon/data_loss_protection (17.69s)
    --- PASS: TestLightningNetworkDaemon/query_routes (17.33s)
    --- PASS: TestLightningNetworkDaemon/route_fee_cutoff (14.20s)
    --- PASS: TestLightningNetworkDaemon/send_update_disable_channel (23.74s)
    --- PASS: TestLightningNetworkDaemon/revoked_uncooperative_close_retribution (15.52s)
PASS
ok      github.com/lightningnetwork/lnd 668.665s

Expected behaviour
Test should all pass, preferably regardless of order.
Actual behaviour
Tests fail with original order of tests in lnd_test.go.
By moving testRevokedCloseRetribution to the end of the test slice the tests all pass.

This will be fixed by https://github.com/lightningnetwork/lnd/pull/2153

Thanks @halseth, I'll continue working on a PR with that mind :)


Add support for R

The ess package looks like a good candidate for this.

In order to support R Markdown, we'll also need:

pandoc
polymode

See also:

http://stackoverflow.com/q/16172345/3538165
http://stackoverflow.com/q/28324288/3538165

Plus, the setup script will need to ensure that R is installed, and install any necessary packages for processing R Markdown.

Closing for the moment as I thankfully don't have to deal with R anymore. If you want it, please comment.

Hey! Need R support. Don't need R markdown, just need R syntax + org babel, can you comment on how one might go about adding it to radian?

I'd suggest looking at some of the other languages that are supported, e.g. any sub-section under Languages. R would be no different. The configuration for package management is self-contained, so you just need to add the relevant use-package forms under a new section and then :config away.
I would start with (use-package ess) and go from there. Good luck!

Closing as stale. I don't use R, and am unlikely to work on this.


Simplify parameter plumbing

Simplify _compile_graphql_generic, adding room for properly documenting its arguments, and plumbing metadata into the lowering function.
Change the compile SQL interface to use the SQLAlchemySchemaInfo. Such a change is necessary. Comment now if you are not convinced.
Keep the interface of all other functions the same, not to anger any users of this library :)

The code as is right now doesn't run. Read if you want a preview of what's coming.

@draft_reviewers: Please see if you are ok with the breaking change to the compile SQL interface before I go on actually implementing this

I agree that this is necessary. Let's just keep in mind that next version bump is going to be a major version bump.

I agree that this is necessary. Let's just keep in mind that next version bump is going to be a major version bump.

The readme on master currently promises some things about our SQL backend that we don't actually deliver on, like traversals. I might need to fix that too.

I agree that this is necessary. Let's just keep in mind that next version bump is going to be a major version bump.

The readme on master currently promises some things about our SQL backend that we don't actually deliver on, like traversals. I might need to fix that too.

Addressed in latest commit.

It seems like the SQL tests in test_compiler.py have moved to MSSQL syntax. Not a problem, just pointing it out.
When we add other backends back in there, we might want to standardize to something more common. Perhaps SQLite (if it supports array-typed columns) so we can use it for a fast(er) sub--set of integration tests? If not that, then maybe Postgres since it's much more commonly used.


Redoc generated page should have a customizable title

Describe the feature
When I generate my documentation site with redoc, I want a custom header.title
Why do you want the feature?
My api users don't know what is Redoc and I don't like this unmutable title starting with 'Redoc'
Thanks a lot for this usefull plugin !

Available in 2.16.0.


SvgPointCollection ToString method fix

SvgPointCollection.ToString now produce valid svg coordinate string. This fixes an issue when polylines and polygons (when converted to svg document file) were not rendering correctly due to their "points" attribute value was incorrectly formatted.
Now

Each value pair is separated by whitespace and their x and y values - by comma.
No unit type is written to output string

great, thanks!


Uncaught Range Error

Attempting to load task board for project, finds number of files, and while parsing for tasks, it locks up and throws error Uncaught RangeError: Maximum call stack size exceeded
Atom then gives unresponsive error and closing is the only way to get back to the app, so can not copy full trace, posting screenshot of the app and error message.
Not this was taken with latest Atom Beta(1.14.0-beta2), however same behavior with latest stable (1.13.0).
Let me know if there's anything else I can provide.

  What OS are you on?

Mac 10.12.3, but this was occurring before updating today.

Really having a hard time figuring this one out.  Is this in a project you can grant me access to?  Have you tried other projects?

That was going to be next idea. I'm starting a new project based off the work in the repo I was having an issue with, so will try with a fresh project without a bunch of nested directories to see if I can narrow down the issue.
I really want to get this working and be able to use it.

I have the same problem on Ubuntu, blocks the GUI entirely, I also have big folders added to imdoneignore. It says that it's scanning 932 files.

I have the same issue, it says it's trying to scan 932 files. Here is my stack trace (snipped because it was unusually long)
RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/usr/share/atom/resources/app.asar/src/config.js:699:11)
    at /usr/share/atom/resources/app.asar/src/config.js:697:32
    at Object.mapObject (/usr/share/atom/resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:287:17)
    at Config.module.exports.Config.deepClone (/usr/share/atom/resources/app.asar/src/config.js:695:18)
    at Config.module.exports.Config.getRawValue (/usr/share/atom/resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/usr/share/atom/resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/home/peter/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/home/peter/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
   .......

@piascikj I tried with a new, small project and works like a charm, so definitely a problem with scanning a big project, ignores or not. Wondering if I can limit the scan to just TODO, as in my case, I don't see using any other tags.

That's interesting.  How many files are there in your project folder?
Can you both run this command in your projects directory and send me the output?
find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done

find: illegal option -- m
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

Doesn't play nice in macOS

I might have a fix for this.  Seems I'm trying to run a stat on up to 1024 files at one time.  Let me cut that back to about 256.

ok, ready to go!  2.1.4 has the new limit.  Let me know how it works

@peterwilli Thanks for the stack trace

OK, give me a minute. Need to sign up for paid account 😉

No dice. Same call stack size error and locking up.

ok, were you able to get a stack trace?

It's huge, but this seems to be the relevant part (almost like it repeats in the trace…)
RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:699:11)
    at Config.module.exports.Config.getRawValue (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11

Try 2.1.15.  I reduced the async limit to 10.  If that doesn't work, I have a couple more things to try.
'Maximum call stack size exceeded' using async.forEachLimit · Issue #75 · caolan/async
Or maybe we can do a live debug session later.  I have to run out to the grocery.

Related #78

RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:699:11)
    at Config.module.exports.Config.getRawValue (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11

End
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:115:51
    at FSReqWrap.oncomplete (fs.js:123:15)

2.1.15

OK, I fixed up the error handling on the isBinary check in imdone-core/repo-fs-store.js.  It's now async and just returning false on error.  Give 2.1.16 a try and let me know what happens.  Thanks for your business @miklb!

Unfortunately that didn't resolve the issue. This particular project has a lot of binary files and isn't a priority. I've actually spun out the part that I'm working on into a new repo and it works fine there.
Going forward, I will watch bigger projects and perhaps getting ahead of all of non-code elements in the ignore files will help.
Unfortunately, it's a private repo that I wouldn't have opportunity to share access. I appreciate your work on it, hopefully the fixes will help others experiencing the error.

ok, that sounds like a good idea.  I'll also try testing with more binary files.

I just published another release to simplify the binary check.  Let me know if it helps.  This one is tough for me, since I'm unable to reproduce it.

Same problem:
Big project, error on config.js:699.
Atom: 1.14.1
OS: macOS 10.12.3
imdone-atom: 2.1.18
event if i use .imdoneignore, finds 8 files but same error

@piascikj I just updated to the latest imdone and atom version on Ubuntu, it gives me the same error, it seems. I added 2 shots so you can tell by yourself.
I'm interested in why you can't reproduce, what kind of system are you running? I'm using Ubuntu with SSD which should be fast enough to can 600+ files.

Default config make the app crash, the exclude paths in config.json are not working.
In my case using .imdoneignore and adding the excluded folders to it, made the package works at least

Anyone experiencing the range error please try 2.1.20 and let me know if you're still experiencing the issue.  If you are, please attach a fresh stack trace.

Try v2.1.21. I filtered the files before calling async.each. I think it's fixed.

@piascikj thanks, it works over here! :+1:


std::map with custom class as keys

The following minimal example fails to compile:
struct Foo {
	int64_t value;
};

template<>
struct glz::meta<Foo> {
	static constexpr auto value{ &Foo::value };
};

struct Bar {
	std::map<Foo, int> values;

	GLZ_LOCAL_META(Bar, values);
};

int main() {
	auto x = glz::read_json<Bar>("{\"values\":[[3,7], [7,3], [73,37]]}");
}

Following the error message it seems that the reason is a failing static_assert, which, as far as I understand, enforces that only string-like and arithmetic types can be used when reading a std::map (I might be missing something, though).
Is this indeed the case, that only string-like and arithmetic types are allowed as keys?

This is currently the case but I don't believe it has to be. I'm looking into it.

Pull request https://github.com/stephenberry/glaze/pull/509 introduces support for reading arbitrary types as JSON object keys. It also provides a fix for writing arbitrary types as JSON object keys. I'd like to get a review on it before merging.
As for your example, it works with the PR but there are a few things to note:

The type Foo must provide a comparison operator to be uses as a key in a std::map
Your intention may be to detect a parse error, but the serialized JSON would always failto parse. std::map is read/written as a JSON object,  making it {\"values\":{\"3\":7,\"7\":3,\"73\":37}} or, as a raw string literal,  R"({"values":{"3":7,"7":3,"73":37}})".

Here is an altered version of your example:
#include <cstdint>
#include <cassert>
#include <compare>

#include <glaze/core/meta.hpp>
#include <glaze/core/macros.hpp>
#include <glaze/json/quoted.hpp>

struct Foo {
  int64_t value;
  [[nodiscard]] std::strong_ordering operator<=>(const Foo&) const noexcept = default;
};

template<>
struct glz::meta<Foo> {
  static constexpr auto value{ &Foo::value };
};

struct Bar {
  std::map<Foo, int> values;

  GLZ_LOCAL_META(Bar, values);
};

int main() {
  const auto parsed = glz::read_json<Bar>(R"({"values":{"3":7,"7":3,"73":37}})");
  assert(parsed.has_value());

  const Bar expected{
    .values = {{{3}, 7}, {{7}, 3}, {{73}, 37}}
  };
  assert(expected.values == parsed->values);
}

Hey,
thank you very much for looking into this and for directly providing a pull request! I am not sufficiently accustomed with glaze to give a reasonable review on the internal changes, but I think that it would solve my problem and is everything I currently need. However I think it might makes sense to discuss the general serialization syntax, as raised in your second point (you are totally correct with your first point btw, my comparison operator must have gotten lost when creating the minimal example):
You say that a std::map is read/written as a JSON object and not as an array of pairs (as in my example).  I totally see how this is obvious choice for maps with string-like keys, but I would argue that the array of pairs is better suited for the general case. The reasoning being:

From an abstract perspective the goal should be to map between the c++ object and the JSON representation preserving as many attributes as possible. As std::map is an ordered container, it seems reasonable to account for this ordering in the serialization. This is achieved by the array-of-pairs, as by specification a JSON array is an ordered sequence of zero or more values. A JSON object on the other hand is an unordered set of name/value pairs, and can not be expected to reliably preserve the ordering. Apart from the philosophical aspect, it also makes sense from a performance perspective to guarantee the ordering, as for example perfect emplace_hint can always be used for deserialization. This is even more the case for std::flat_map.

The JSON specification only allows strings as object keys. This means that in order to serialize a map with non-string keys, the keys have to be serialized to an escaped string (which is what you do in the pull request,a s far as I understand). The result is having a JSON object where some strings are themself JSON objects, which seems like a burden on code complexity (in glaze), performance (escaping everything) and readability of the JSON. In contrast using the array-of-pairs approach there is no need to create json strings, as the keys can directly be written as JSON objects.

There is real trouble when trying to use the JSON object approach for a std::multimap, as non-unique keys are a grey area of the JSON specification at best. In contrast the array-of-pairs is well defined also for duplicate keys.

That being said, I am not sure if there is the best way to handle map-like types and it might makes sense to support several options. There also doesn't seem to be a consensus on this problem among other c++ JSON libraries, on how to handle map-like types with non-string keys.

@Haatschii
I'm really pleased that this will help resolve your problem. Addressing your points above:

here are a few points against changing the default serialization of maps from JSON objects to arrays. You can reference this issue where some decisions about preferring objects were made.

a std::map is in sorted order by key, whereas an array is not - it merely preserves the order of its elements. As such, there is no guarantee that some serialized JSON array is in the sorted order of the deserialized std::map. The order argument conflates two types of ordering.
Where the serialized array is not in a sorted order by key, the performance gain is not realized. Nevertheless, the same performance gain would be realized using JSON objects with entries in sorted order by key. It's not specific to arrays, despite arrays inherently offering better access times.
JSON arrays do not enforce the uniqueness of keys required by maps (except for multimaps). JSON objects do.
Serializing pairs as arrays would require additional checks for lengths; only a length of 2 would be acceptable. This change from array to object representation of pairs was performed in the PR for the referenced issue above
This would be a breaking change to existing users.
I personally think most would believe maps are more akin to JSON objects than arrays.

You're right, having non-string keys as JSON object keys is kind of unnatural. I was just trying to allow Glaze to support it. Should you want to serialize to an array of arrays instead of a JSON object, glaze will already support this. You just need to serialize an input-range of non-pairs instead of a range of pairs. An array, tuple, or whatever could be used. This can be easily formed with C++20 ranges.
Extending your original submission to serialize to arrays can be done as follows:
  const glz::obj bar_with_arr_x{
    "x", expected.values | std::views::transform([](const auto& pair){
                              return std::tie(pair.first, pair.second);
                           })
  };

  assert(glz::write_json(bar_with_arr_x) == R"({"x":[[3,7],[7,3],[73,37]]})");

Considering the idea of additionally allowing arrays of arrays may be worthwhile, possibly in the form of a modifier/wrapper, and could be useful for multi-maps.
In any case, Glaze supports non-string keys in maps if that's best for the use case.
If a map isn't right for your use case, there are other options. you could look into an array type + std::sort + std::unique, a heap with std::make_heap,  std::priority_queue, or others. Custom serialization/deserialization overloads are always an option, too.
What qualities of the map are you interested in? Sorting, unique keys, or both?

Hey, thank you for your thoughts. My actual use case, which made me stumble over the inability to use arbitrary types as keys, is really rather simple. Think of Foo in my example as a time class, with the int64_t representing microseconds since epoch (and no other data). For this particular application it really doesn't matter whether the map is represented as an array of pairs or as an JSON object, as there is no loss writing the int64_t, as a string as there is no escaping necessary and it remains readable. Apart from that I do work with a lot map-like structures, however I substituted std::map by a vector of (custom-)pairs almost everywhere for performance reasons.  That shouldn't be too complicated.
All in all I think your patch will work fine for me. I just thought I'll raise this issue now, because once the patch is merged, changing the way maps with custom keys are serialized in the future would be a breaking change, while right now you can freely choose the format. So for me the following is just for the sake of argument. Feel free to ignore it if you have already made up your mind. (-:

.

I don't think I agree. In contrast to the JSON object the JSON array encodes order, which gives meaning to said order. What meaning that is, depends on the API specification, but for a std::map it would be reasonable to use the order of the map. Of course in an untrusted environment there no guarantee the order is actually correct, but this would also be true for any other type like std::vector or std::list.
I guess this is true and for the not so uncommon use case that writing and reading is both done by glaze it would probably make sense the use emplace_hint also when using the JSON object format. For me personally it would just not feel right to assume that keys are in an expected order when the specification specifically states that they are unordered. But that's probably just.
True, but assuming you want to handle std::map and std::multimap the same way, I think this is still better as it is completely within the JSON specifications, just not enforcing the uniqueness, while duplicate keys are outside of the specifications.
In an untrusted environment checking for length 2 would be recommended, yes. However, when using a JSON object, I would also advice to check that the object contains only a single key. Not sure if there's much of a difference. Generally serializing a std::pair as key and value of an JSON object has the same issue discussed in point 2, i.e. that the key can only be a string.
Not necessarily. One JSON library I used before (I think DAW JSON, but not sure), had a different behavior for depending on the key type: serializing maps with string-like keys to JSON objects and all other key types to an array of pairs. As custom types were not supported until now, implementing it like that would not be breaking. Although I agree that it might be more confusing if number types, although not string-like, would be handled like strings and not like other classes.
I think this really depends on the kind of key you have in mind. For string-like keys I totally agree, but having a JSON key, which is itself an escaped JSON serialization of an complex object seems obscure.

No worries, as I said, the patch should work well for me. But yes, I really don't like having complex objects serialized and escaped to act as JSON keys. However as this is already the case for the serialization of std::pair, I guess there is no way around it without breaking changes.

Well, this is only true for as long as all reading/writing is done by the same implementation. As duplicate keys are not (really) part of the JSON specifications, other implementations may chose to handle them differently or not all. Users of such implementation would then not be able to parse a std::multimap written this way.

That all seems reasonable, and most of this debate seems to be coming from just looking at different sides of the same coin.
JSON is really limited, which is half its beauty, but it doesn't map perfectly to language constructs.
It's nice hearing your alternate perspective. Going with the approach of JSON array of arrays may be a better default for what's in the PR. It would take more code, though. Maybe @stephenberry can choose what a more sensible default is for non-string like keys. Still, the issue of ints and enums being acceptable object keys.
I think adding a modifier/wrapper to read/write object-like types as arrays could be in the cards, for sure. That doesn't break anything, is opt-in, and supports both trains of thought.

That all seems reasonable, and most of this debate seems to be coming from just looking at different sides of the same coin.
JSON is really limited, which is half its beauty, but it doesn't map perfectly to language constructs.
It's nice hearing your alternate perspective. Going with the approach of JSON array of arrays may be a better default for what's in the PR. It would take more code, though. Maybe @stephenberry can choose what a more sensible default is for non-string like keys. Still, the issue of ints and enums being acceptable object keys.
I think adding a modifier/wrapper to read/write object-like types as arrays could be in the cards, for sure. That doesn't break anything, is opt-in, and supports both trains of thought.
@Haatschii I'll take a stab at those modifiers tomorrow if that seems OK for you?

This is a great discussion. In my thinking, pair and dictionary types should default to JSON objects, because we already have std::array, std::vector, std::tuple, glz::array, and glz::arr that default to arrays. However, I see some of the benefits of using an array in this context, particularly because the quotes are excessive. However, I do like the quotes because they indicate well that these are keys, and they match the serialization of a key in JSON. I think that @justend29's implementation should be the default. And, I think we could add a compiler time option that would encode/decode pairs as arrays, which would help your use case @Haatschii. I think we'll come across others who want std::pair as an array in some contexts, so we can just make this a compile time option.

I agree completely.

I believe an adaptor to provide an array-like interface to a pair_t would flip the behavior while using the existing readers & writers.
It could wither be used directly, or the compile time option would wrap the value in it.
Anyway, I'll look into it and file a PR

@justend29 Definitely, provide an adapter (what we typically call in glaze a wrapper). Just follow how wrappers like glz::quoted or any of the other wrappers work. This way the user can specify it in their glz::meta and they don't have to use custom glz::read<...> and glz::write<...> calls.

Thank you for your responses. I think that providing an adapter like glz::quoted to switch the serialization of std::pair and std::map to arrays would be a great solution! This would also allow users to select the serialization format for each class separately and mixing them if desired.
Not sure if I understand the suggestion for a compile time option correctly. That would be a compile flag switching the format globally? I guess that I would personally stand to profit from such an option, as I obviously prefer the array format in most cases. However if there are those adapters I am not sure such option would even be necessary and worth the additional maintenance and testing needed to maintain such a global option.

@Haatschii
By compile-time option, we're not referring to build option that's part of the build-system, but instead a flag that alters the behaviour at compile-time. glz::opts is a struct that collects these compile-time flags. readers/writers change their behaviour based on the flags in there at compile-time.

Ah yes, that makes more sense. Thanks for the explanation.


:lady_beetle: Plan details page may show white page

Sometimes the plan details page show white page and requires a re-load of the page.

Addressed by https://github.com/kubev2v/forklift-console-plugin/pull/1061


Molecule Verify Command Producing Error

i ran molecule init role -r mol_docker_test_2 -d docker --verifier-name testinfra and then molecule --debug converge and finally molecule verify
the error is got was
molecule verify
--> Validating schema /path/mol_docker_test_2/molecule/default/molecule.yml.
Validation completed successfully.
--> Test matrix

└── default
    └── verify

--> Scenario: 'default'
--> Action: 'verify'
--> Executing Testinfra tests found in /path/mol_docker_test_2/molecule/default/tests/...
    ============================= test session starts ==============================
    platform darwin -- Python 3.7.3, pytest-4.4.1, py-1.8.0, pluggy-0.9.0
    rootdir: /path/mol_docker_test_2/molecule/default
    plugins: testinfra-1.19.0
collected 0 items / 1 errors

    ==================================== ERRORS ====================================
    ____________________ ERROR collecting tests/test_default.py ____________________
    tests/test_default.py:6: in <module>
        os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
    /usr/local/lib/python3.7/site-packages/testinfra/utils/ansible_runner.py:153: in __init__
        self.cli.options = self.cli.base_parser(
    E   AttributeError: 'PlaybookCLI' object has no attribute 'base_parser'
    =============================== warnings summary ===============================
    /Users/user_name/Library/Python/3.7/lib/python/site-packages/jinja2/utils.py:485
      /Users/user_name/Library/Python/3.7/lib/python/site-packages/jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
        from collections import MutableMapping

    /Users/user_name/Library/Python/3.7/lib/python/site-packages/jinja2/runtime.py:318
      /Users/user_name/Library/Python/3.7/lib/python/site-packages/jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
        from collections import Mapping

    /Users/user_name/Library/Python/3.7/lib/python/site-packages/yaml/constructor.py:126
      /Users/user_name/Library/Python/3.7/lib/python/site-packages/yaml/constructor.py:126: DeprecationWarning: Using or importing the ABCsfrom 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
        if not isinstance(key, collections.Hashable):

    -- Docs: https://docs.pytest.org/en/latest/warnings.html
    !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
    ===================== 3 warnings, 1 error in 0.46 seconds ======================

the versions i use
molecule --version
molecule, version 2.20.0
py.test --version
This is pytest version 4.4.1, imported from /usr/local/lib/python3.7/site-packages/pytest.py
setuptools registered plugins:
  testinfra-1.19.0 at /usr/local/lib/python3.7/site-packages/testinfra/plugin.py
docker --version
Docker version 18.09.0, build 4d60db4

my default_python.py file looks like
import os

import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')

def test_hosts_file(host):
    f = host.file('/etc/hosts')

    assert f.exists
    assert f.user == 'root'
    assert f.group == 'root'

Hi @vignajethkk, you've ran into a compatability issue with Ansible 2.8 here which we're tracking over at https://github.com/ansible/molecule/issues/1727. I would probably close this and track from there if you don't mind. Thanks.

Please feel free to re-open if I've got it wrong. Solution to this would be to downgrade Ansible?


bug: Change to use nightly types causes missing types for vim.uv.*

Did you check docs and existing issues?

[X] I have read all the neodev.nvim docs
[X] I have searched the existing issues of neodev.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.10.0-dev-2483+g6ab0876f5-Homebrew
Operating system/version
macOS 14.3.1
Describe the bug
The change in b354c3810f8f3a954f9d5ef8c1706451a27a4964 for https://github.com/folke/neodev.nvim/issues/175 (which is great BTW) causes warnings from lua_ls due to the fact that there are no types / functions / members exposed for libuv via vim.uv.* from the Neovim source:

The correct thing to do here is to expose those from Neovim, but I'm wondering if A) there's a shorter term fix you can make here, or B) You happen to have a PR for Neovim already in progress that I'm not aware of. I did search open PRs and issues over there though and didn't see anything.
Steps To Reproduce
Use any vim.uv.* method with lua_ls diagnostics turned on.
Expected Behavior
Member fields and types are properly accounted for.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/neodev.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

if vim.us.fs_access("init.lua", "R") then
   vim.notify("Foo")
end

Until https://github.com/neovim/neovim/issues/26268 is done, neodev could include the meta annotation file into the LuaLs library.

I did a stopgap measure to solve this.
require("lspconfig").lua_ls.setup {
  settings = {
    Lua = {
      workspace = {
        library = { require("neodev.config").types() },
      },
    },
  },
}


Scopes and blocking operations

I've run into a problem with scopes. It looks like scope switches to one of the thread-pool threads for its body. So if the body does any blocking operation, it is possible to run into a deadlock.
Example 1: I'd like to spawn a bunch of tasks on the thread-pool inside the scope so they can access the outer variables. Because processing is much slower than producing, this quickly pushes thousands of tasks into rayon queue and memory consumption is high. So I wanted to limit the number of tasks produced to a number low enough that memory is not a problem, but also high enough to allow parallel processing. Unfortunately any attempt to block the producer loop would cause a deadlock if rayon pool is sized to 1 thread.
Example 2: Spawning multiple tasks that send the results to the channel and receiving the results serially. I can't put the receiver loop inside the scope, because it can block and again - deadlock is possible if the pool is sized to only 1 thread.
Is there any way to get around this limitation?
Perfectly if scope did not switch to a thread pool thread, but ran the body on the parent thread would solve this.

We've talked about having having a scope that always runs on the parent thread, but we never added it. I'm trying to remember the details why we did not, @cuviper may recall if there are particular reasons.

See #562 to allow working without Send, which would also have the effect you want here, since that would guarantee we're not moving execution to the thread pool. There's a prototype implementation, but I haven't yet reviewed that further.

I suddenly find my program stuck because the machine has only one CPU core. Setting RAYON_NUM_THREADS to larger than one works but it's unexpected anyway.

Perfectly if scope did not switch to a thread pool thread, but ran the body on the parent thread would solve this.

Rayon 1.5.1 now has in_place_scope which works this way -- can you try it?

in_place_scope works in my case, thanks!


Revert "Replace ExpressibleAs protocols by ExpressibleBy protocols"

Reverts apple/swift-syntax#337

Stupid me, the protocols actually describe that these types are expressible as other types and not by other types.

https://github.com/apple/swift/pull/40200
@swift-ci Please test