Unresolved Reference warning for relative path

If I don't add ./ before a link to a local image file, it shows the warning. Could you please also support this format? Current behavior:
![](img/2024-04-17-15-14-12.png)

shows warning.
![](./img/2024-04-17-15-14-12.png)

no warning.

Thanks!


URLSearchParams silently fails for FormData under IE 11

What

Details
<!--
- calling URLSearchParams, passing FormData: body: new URLSearchParams(new FormData(form)),

Code example:
      	fetch("/getdata.php", {
      		method: "POST",
	    	headers: {
    			"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
  			},
			body: new URLSearchParams(new FormData(form)),
      	})

<!--
## Additional information

Problem is on the server side, I get php errors:

[13-Sep-2020 12:43:35 UTC] PHP Notice:  Undefined index: name in /getdata.php on line 4
[13-Sep-2020 12:43:35 UTC] PHP Notice:  Undefined index: address in /getdata.php on line 5

As far as I can check, the  URLSearchParams silently fails when passing FormData fails.

Everything works fine on Chrome and Edge.

calling URLSearchParams, passing FormData: body: new URLSearchParams(new FormData(form)),
Code example:
fetch("/getdata.php", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
},
body: new URLSearchParams(new FormData(form)),
})
Problem is on the server side, I get php errors:
[13-Sep-2020 12:43:35 UTC] PHP Notice:  Undefined index: name in /getdata.php on line 4
[13-Sep-2020 12:43:35 UTC] PHP Notice:  Undefined index: address in /getdata.php on line 5
As far as I can check, the  URLSearchParams silently fails when passing FormData fails.
Everything works fine on Chrome and Edge.

@wak45 Could you give a small amount of code which replicates the issue with URLSearchParams and FormData please?


First react frontend

I haven't made it perfect obviously. There are many things to fix. It's just a start.
If you have node and npm installed, you should be able to run it locally with:
npm install
npm run dev

Example:
https://github.com/user-attachments/assets/1c2b350b-6bb7-4e09-a73c-c9968e548047

Cool!!


Removed need for -Z build-std

Fixes the error discussed at pd-rs/crankstart#30 by removing the need to build std from source. That does appear to be a bug caused from a regression in rust nightly, but this may still be a better option to lower the reliance on nightly rust.
Nightly is still necessary for the aloc feature, update readme to accommodate.

Is it possible to make this configurable?

What is the benefit of making this configurable?

What is the benefit of making this configurable?

I don't use rustup and build-std works fine for me (and propagating an appropriate rust-std build without rustup may be annoying). But if allowing build-std (or even just making cargo flags in general configurable via environment variable, e.g. CRANK_CARGO_FLAGS) is prohibitively difficult, I can probably figure out how to propagate a thumbv7em-none-eabihf build of rust-std separately
So if it's too difficult, it doesn't have to hold this up

Makes sense. If you want to add in a flag for it, I'll merge it.

-Z build-std needed to build alloc and use heaped c-strings (CString) properly. Strings is just as example. We're need to build alloc crate for this target.

I've return build-std just now in the #42, but in nearest future I'll try to get it configurable as requested.


Pred should only return Booleans

Through the cracks

Looks like we were not returning Boolean values from runWith in Pred, we should.
This PR fixes that.

Coverage remained the same at 100.0% when pulling dd58c05c48b5c16e6155774d2fb11e982fd767a4 on fix-pred-result into bd8b6e55fe2da10dca19a03681e377bdbbd41bbe on master.

This PR addresses issue#92

Updated to provide better coverage around the coercion, so this will not slip past again.

Coverage remained the same at 100.0% when pulling 6da2aef01f49f3a65aa97b17350f0ce488d1a9fe on fix-pred-result into bd8b6e55fe2da10dca19a03681e377bdbbd41bbe on master.


CreateOutputsStep attempts to call mkdirs on existing file when OutputFiles annotation on FileTree

Expected Behavior
A task that extends SourceTask and that source is both an input and an output, when declaring that source set to be two files, the task should execute successfully.
Current Behavior
val ktlintScriptSourceSets = files("build.gradle.kts", "settings.gradle.kts")

tasks.ktlintKotlinScriptFormat {
    setSource(ktlintScriptSourceSets)
}

https://github.com/JLLeitschuh/ktlint-gradle/blob/0c2b0353ecfe8c95f675646376bd417ef4c18bcc/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/KtlintFormatTask.kt#L26-L33
The above fails on the master branch of gradle/graddle with the following exception:
Caused by: org.gradle.api.UncheckedIOException: Cannot create directory '/Users/jonathanleitschuh/code/work/gradle/build-logic/integration-testing/build.gradle.kts' as it already exists, but is not a directory

Full Stack Trace (clicky)

10: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':build-logic:integration-testing:ktlintKotlinScriptFormat'.
> Cannot create directory '/Users/jonathanleitschuh/code/work/gradle/build-logic/integration-testing/build.gradle.kts' as it already exists, but is not a directory

Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':build-logic:integration-testing:ktlintKotlinScriptFormat'.
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:60)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.gradle.api.UncheckedIOException: Cannot create directory '/Users/jonathanleitschuh/code/work/gradle/build-logic/integration-testing/build.gradle.kts' as it already exists, but is not a directory
at org.gradle.util.GFileUtils.mkdirs(GFileUtils.java:291)
at org.gradle.internal.execution.steps.CreateOutputsStep.ensureOutput(CreateOutputsStep.java:58)
at org.gradle.internal.execution.steps.CreateOutputsStep.access$000(CreateOutputsStep.java:29)
at org.gradle.internal.execution.steps.CreateOutputsStep$1.visitOutputProperty(CreateOutputsStep.java:43)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.visitOutputs(ExecuteActionsTaskExecuter.java:328)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:40)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92)
at java.base/java.util.Optional.map(Optional.java:265)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:83)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:40)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:96)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:77)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:48)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:95)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:43)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:42)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:30)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:39)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:281)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:39)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:29)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
at org.gradle.internal.execution.impl.DefaultExecutionEngine.execute(DefaultExecutionEngine.java:41)
at org.gradle.internal.execution.impl.DefaultExecutionEngine.execute(DefaultExecutionEngine.java:32)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:182)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:182)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:172)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:60)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:834)

Context
This issue currently blocks this PR:
https://github.com/gradle/gradle/pull/15669
Steps to Reproduce
Checkout #15669
Run ./gradlew sanityFix --dry-run --stacktrace
Your Environment
Build scan URL: https://ge.gradle.org/s/3zl6bpfybzbse

Tasks that have the same directory as input and output is not currently supported. This is a use case (e.g. code formatters) that we would like to address sometime in the near future, but it will require some dedicated changes in how we declare inputs and outputs.

Tasks that have the same directory as input and output is not currently supported. This is a use case (e.g. code formatters) that we would like to address sometime in the near future, but it will require some dedicated changes in how we declare inputs and outputs.

This seems to be an actual bug:
We consider file trees always as type output directory. Though there is the rare case when a file tree is a single file, and in that case the root of the file tree is an actual file.
https://github.com/gradle/gradle/blob/2db7fc6b55044374a60b6c9c9cfbac49b3422153/subprojects/core/src/main/java/org/gradle/api/internal/tasks/properties/FileParameterUtils.java#L163-L172
So we need to decide whether or not the output is a directory or not. For inputs, we don't try to resolve the file collections, so that is not a problem.

This seems to be an actual bug:
We consider file trees always as type output directory. Though there is the rare case when a file tree is a single file, and in that case the root of the file tree is an actual file.
https://github.com/gradle/gradle/blob/2db7fc6b55044374a60b6c9c9cfbac49b3422153/subprojects/core/src/main/java/org/gradle/api/internal/tasks/properties/FileParameterUtils.java#L163-L172
So we need to decide whether or not the output is a directory or not. For inputs, we don't try to resolve the file collections, so that is not a problem.

We consider file trees always as type output directory. Though there is the rare case when a file tree is a single file, and in that case the root of the file tree is an actual file.

I stumbled upon this issue as well while working on: https://github.com/cortinico/ktfmt-gradle/issues/12
It seems there is no easy way to specify the source as a list of files rather than being a directory.

I thought a little bit more about this. This is the current situation for outputs: Each output property has one TreeType, FILE or DIRECTORY. We resolve things annotated with @OutputFile or @OutputFiles to output properties with tree type FILE, and things annotated with @OutputDirectory or OutputDirectories to output properties with tree type DIRECTORY. The only exception to this rule is directory trees in output file collections, which are resolved to DirectoryTreeOutputFilePropertySpec with tree type DIRECTORY.
Now the output location preparation and the validation is bound to the tree type:

For FILE, we ensure that the parent directory of the output location is a directory (possibly creating it), and ensure that after task execution the location is a file if it exists.
For DIRECTORY, we ensure that the output location is a directory (possibly creating it), and ensure that after task execution the location is a directory if it exists.

One option to support file trees as outputs which have a file as its roots is to introduce a new tree type, which then ensures that the parent directory of the output location is a directory (possibly creating it) and then doesn't do any validation on the actual created file type after task execution, because the output could be a directory or a file.
Doing so is also a slightly breaking change: Now, Gradle creates a directory for the root of the output file tree, so if your task relies on Gradle to create that directory, then it will break after introducing the new tree type.
The simpler solution is to detect whether the root of the file tree is a file or not, and then select the corresponding tree type for the DirectoryTreeOutputFilePropertySpec.
The current problem happens, since the tasks above use the sources of a SourceTask as the output. The SourceTask creates file trees of all the sources, so we are in a situation where we have file trees rooted in regular files if you add regular files as sources to a file tree. The tasks which want to support this can move away from extending SourceTask and declare a regular ConfigurableFileCollection as their inputs. You can still add filtered file trees to that file collection, though you can also add regular files without running into the problem above. The problem somewhat remains that @OutputFiles means that you can only have files in the outputs, and not directories, and file trees would somewhat violate that.

The tasks which want to support this can move away from extending SourceTask and declare a regular ConfigurableFileCollection as their inputs. You can still add filtered file trees to that file collection, though you can also add regular files without running into the problem above

Agree that this is probably the best workaround as of today. However moving away from SourceTask makes us lose several features that we would have to handle manually (Mostly @SkipWhenEmpty and Incremental support).

Agree that this is probably the best workaround as of today. However moving away from SourceTask makes us lose several features that we would have to handle manually (Mostly @SkipWhenEmpty and Incremental support).

You only need to add @SkipWhenEmpty on your new input property and you still have incremental support.


Not a issus, but more of a request: Turn on without purging water first?

Hello, is there a feature that you can turn the machine on, en make coffee without first cleaning/purging water out?
Like first cup of the day, if you come downstairs and the coffee is standing there.

Looks like no chance, cause cleanup is built-in function in device firmware.

To be honest making smart coffee machines is just a gimmick. Anyhow you need to put a cup under it, or remove it, or connect the milk frother. Maybe if you have a robot to do that...
Anyhow, @Arbuzov, please keep up with the good work!

Well, someone did:
https://drive.google.com/file/d/10KaSiyxfzsHwID3Yf1xVwlkXJx2uDMcw/view?usp=sharing
@GSzabados @cookie050

That looks awesome, but unfortunately not compatible with the WAF (Wife Acceptance Factor)!

Sorry, if it's not possible in the official app then we cannot really do anything about that here.


Lean pr testing 6128

For benchmarking

!bench

(It's comparing to the wrong version. There are actually no significant changes.)


Add FSB School

Here is our school website: http://fsb.edu.vn

@trungduyen0220 I am sorry, due to the issues described in #9997, I have to close this request without merging. If you are a student of this school, please apply with official document ("OFFICIAL DOCUMENT" tab at https://www.jetbrains.com/shop/eform/students).


Add game: Ascension 2

Please add game to category: Platformer. Source code, itch.io page. Made with ggez and nphysics2d.

@ozkriff has already got a PR (https://github.com/rust-gamedev/arewegameyet/pull/307) raised to add it 😄

This is why I love this community 😀. Closing...


Recall Preset with variable number

I would like to use a variable to quickly shift through various numbers used as preset position.
However the Action only allows to select position 1-64 as a dropdown.
Is there a way to also allow the use of variables and e.g. MOD 64 them?

Can you expand on that? An example of your work flow and how the variable would be used may help me understand.

Sure, let me provide some screenshots :)

Usually the command set for calling or storing a preset is straight forward - one Button =  One Preset
I did create a companion internal variable (ideally part of the module) called
$(internal:custom_visca_preset_selector)

My workflow would use a button layout like this - the white field shows the number from the variable and + and - are used to modify the variable (using onboard companion Press Action "Value plus Value"
Line 1 and 3 are actions for my respective cameras (labeled in white)
e.g. pressing button 6.4 i would expect the currently selected "1" from my selector to be used as parameter "Preset Nr." in the Recall Preset Action.

Pressing 6.2 the current variable would increase to 11
Pressing 6.21 i would expect camera 2 to store it's current position to Preset 11
Considering that 0 and negative Preset numbers as well as >64 would be illegal parameters it would be best to incooperate the variable in the module and ensure it's altered accordingly e.g. 64+1 = 1 ...

@goseid do you have any updates / considerations in regards to this request?

I'll play around with that a bit. It seems doable.

Your feature has been implemented @bensteUEM and should be merged into the beta soon.


Stackscript search by username

Purpose
Adds the ability to search by stackscript by username
Also, adds a more advanced search. Trying searching for a term with the folllowing prepended:

username:
label:
description:

Example:
username:tory
Notes
Merged in PR #3959 because the table had some visual regressions

Coverage decreased (-0.01%) to 26.627% when pulling 557da4e6e86715a25c19c2cf12e47184c6405496 on martinmckenna:stackscript-search-by-username into 8a413e7c0e5aa597b38d824bbdc4faede95e1a9f on linode:develop.

Minor issue, the tooltip window displays behind the table (looks worse on firefox than it does on chrome)
Chrome:

Firefox:

(looks same in safari as it does chrome)


Add d017m account

Added --account=d107 to the SLURM template for Piz Daint

Thanks for adding this! Not sure how we forgot to add this...

Default CSCS account added as d107


Custom themes broken in Clarity 2.0 and Angular 8

Describe the bug
We have just created a new Angular (8) app and configured custom theme (Clarity 2) for it. After trying to run the application we've got the following error:
ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
@import<EMAIL_ADDRESS>// Includes light theme
       ^
      Can't find stylesheet to import.
  ╷
2 │ @import<EMAIL_ADDRESS>// Includes light theme
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  stdin 2:9  root stylesheet
      in /home/albert/dev/wincor-ui/src/styles.scss (line 2, column 9)

I've checked the sources and indeed this file seems to be missing. I didn't found it either here in clarity's github source. So i've removed this import and instead got this:
ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

  @return quote($inputs);
         ^
      $string: (((((((((), input[type=text]), input[type=password]), input[type=number]), input[type=email]), input[type=url]), input[type=tel]), input[type=date]), input[type=time]), input[type=datetime-local] is not a string.
   ╷
22 │   @return quote($inputs);
   │           ^^^^^^^^^^^^^^
   ╵
<EMAIL_ADDRESS>22:11             inputs()
<EMAIL_ADDRESS>48:16  @import
<EMAIL_ADDRESS>81:9            @import
<EMAIL_ADDRESS>34:9           @import
  stdin 10:9                                                             root stylesheet
      in<EMAIL_ADDRESS>(line 22, column 11)
ℹ ｢wdm｣: Failed to compile.

How to reproduce
Steps to reproduce the behavior:

Go to 'https://clarity.design/documentation/themes'
Click on 'Code examples'
Scroll down to 'Custom theme'
Follow the steps to configure custom theme on your project
Run ng serve

Expected behavior
You should be able to run the application. Removing this import obviously produces a series of different error regarding dependent variables, etc.
EDIT:
I've managed to get it working with easy workaround. First, you're not supposed to import dependencies.clarity file as it is not existent anymore. Second, DO NOT update to Angular 8 as it is responsible for producing multiple following errors regarding multiple Clarity's .scss files nor TypeScript as it will give you an error with Angular compiler. Ignore npm's info about unresolved dependency and stay with Angular 7.x and TypeScript > 3.4.
As for now, source code is not ready for those and documentation for Clarity v2 is just a copy-paste from previous version, so it needs an update too.

@coryrylan @hippee-lee this is done now right with rc.1?


Server unable to start: java.lang.NoClassDefFoundError: net/minecraft/client/particle/Particle

I've been running this server for about  a month now and it happened to crash and is unable to start now. since I'm not sure what was occurring with players using Thaumcraft at the time, I apologize in advance but I have attached the server crash log since the Java exceptions looked pretty descriptory
2018-06-30-3.log

I've been running an instance of FTB Revelations 2.0 and this exact issue popped up when one of the players on my server placed a thaumcraft stabilizer because they heard it would help get rid of a taint rift. However, as soon as power was fed it, the server closed and is now stuck in a crash loop because its all in a loaded chunk.
The crash log does not report the specific block that is causing the issue or the dimension. However, the player told me what dimension it was in so I cut the dimension folder out of the world and restarted the server and that fixed the problem for the time being.
crash-2018-07-02_11.15.28-server.txt

Update to B17+


Fix on GenerateProfile failing on unknown gender

Hey, cool project!
I encountered some problems while running the example on the README. Here are some fixes I came up with.

Fix typo on README - Ipv6Address -> IpV6Address
We have this line on the example

profile := randomdata.GenerateProfile(randomdata.Male | randomdata.Female | randomdata.RandomGender)

which seems to be trying to do a bitwise OR. It might not be the case though, since I don't think the gender constants are OR-able.
Running that would produce:
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/Pallinder/go-randomdata.GenerateProfile(0x3, 0x1)
	/home/jeff/go/src/github.com/Pallinder/go-randomdata/fullprofile.go:145 +0x1493

failing when indexing an unknown gender --- gender=3 on above.
As a failsafe, I decided it might be better if we consider unknown gender default to RandomGender.
Hope this helps.

Awesome! Thanks!


Allow delegating all linking

This is necessary when an external build system (e.g. Buck) is taking
care of linking in git-sys, and we don't want the Rust compiler to emit
any linking arguments.
To do so, this adds a flag to just bail out of the build script and not
build any native crate if LIBGIT2_SYS_DELEGATE_LINKING is set in the
environment.

Thanks for the PR! This feature though I think is handled by build script overrides, so I don't think there's a need to develop a libgit2-sys-specific solution here.

Ah, thanks a lot for the pointer, @alexcrichton! I'll update on our end to try and use this instead :)


Performances on streaming data (V2.3.0)

Hello,
I'm trying to use chartjs (LineChart) to plot dynamic data, but I'm stumbling on performances. I want my data to be updated at 30hz (the data granularity can be to the millisecond).  I went from react-stockcharts which has good performances on dynamic data but lack some features like multiple X axis and parametric plot that chartjs has.
Here is an example of streaming data with good performances on react-stockcharts (press 1 to start pushing data, + to increase speed): complete with pan and zoom
http://rrag.github.io/react-stockcharts/documentation.html#/updating_data

I'm trying to find / make a similar example (performance-wise) as the one above (with or without React) but to no avail. Does this exist / is it at all possible ?
The only method I found to update the chart with new data is by calling myChart.update() after modifying the 'data' array, which takes around 20 - 30 ms depending on existing data (around 1000 data points for a single curve) which is too long, especially for a single data point addition on a single curve. Am I missing something?

@Pinxie do you have a fiddle with what you've got so far?

Here is a plnkr
http://plnkr.co/edit/YhBdd4J1jUMcrapgEVf2
Which shows that it takes increasingly long to update the Chart when approaching the thousand data points with a very bare chart with no animation (here I approach 100ms on this plnkr).

@Pinxie I'm confident that Chart.js could be more optimized (PRs are welcome), but taking your example out of Plunker, I measured between 2-3 ms for each update with 1000 samples "filled", on Chrome with a canvas size of 2172x1241:

How did you profile the update() method (20-30ms)? on which browser, what canvas size? Anyway, I don't think timings mean something because it also depends on your CPU (and certainly GPU).

The @Pinxie is about the need to redraw everything each time you add point (event 1 new point in 1 line).
Is there an API to "add" some points and let Chart.js redraw only what is needed ?

@dbrugne It might be complex to implement because it would require to determine which regions need to be cleared and only redraw elements in these regions, taking in account many parameters, such as color change, z-index, Bezier curves, etc. At one point, it might even be a disadvantage to do that (time gain not significant, increase of the lib size and code complexity). So no, there is no API for that :)
In the @Pinxie case who want to animate data from left to right, each frame would need a full redraw of the data area, including scales, so this kind of optimization would be useless (except maybe for the legend / title).

Thanks @simonbrunel I understand now that full redraw is the most universal way to work.
But I suppose we should optimize things outside (before) chartjs to accelerate rendering.
By providing less points, ordered (is the API try to sort provided points before drawing or not ?) for example. Maybe I should jump in code but are you thinking other thing to take in consideration when we want to draw multiple curves in realtimes while sliding to the right with best performances ?

Providing a reasonable amount of data will help for sure (1k should be fine though), but it really depends on what you try to achieve. Do you guys have examples of "really" laggy animated charts?

1k is definitely fine. I think the upper bound on number of points is width * 4 with a min-max decimation algorithm.

Tested this out in v2.5.0. Rendering time for 1k points is 2ms less than v2.3.0. Per the conversation above I'm closing this since it seems resolved


Add Documentation to "Get User Data" Endpoint

Idea
At this point, we have a ton of endpoints and the number just keeps growing. We need to document all of these endpoints but the only way to do that is to write about each of them. That is where you come in. If you would like to document this endpoint, just comment on the post, and I will assign it to you.
Todo

[ ] Add an item to the OpenAPI file that shows how to "Get User Data"
[x] Add a documentation page about "Get User Data"

i can do it


Shopify

Hello!
I've had success with using PJAX-Standalone (https://github.com/thybag/PJAX-Standalone) version on Shopify. However integrating this version (jquery-pjax) does not seem possible. I believe this issue is because I am unable to set request.headers.
If you are unable to set headers on server side will jquery-pjax fail? or am I missing something here?

Hi sorry for the late reply. Did you solve your issue? Are you asking how to set custom request headers with jquery-pjax?

Is jquery-pjax not working with shopify ?


add Discoverable and Source to Account

Codecov Report

Merging #147 (738ed0b) into master (87278bd) will decrease coverage by 0.20%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   79.69%   79.48%   -0.21%
==========================================
  Files          31       31
  Lines        1438     1438
==========================================
- Hits         1146     1143       -3
- Misses        201      204       +3
  Partials       91       91

Impacted Files
Coverage Δ

accounts.go
100.00% <ø> (ø)

cmd/mstdn/main.go
65.60% <0.00%> (-1.21%)
:arrow_down:

Continue to review full report at Codecov.

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

Also add support for pinned posts

Thank you


There should be a --help command for Ceedling:

From my perspective, Ceedling should have a --help command to show the commands that can be used followed by options.  If possible a sub help for each command like ceedling new --help or ceedling clear --help should print the flags that can be passed for a new project.

There is. It's called ceedling help (note there are no dashes) ;)

Interesting! Could I ask what method you used to install ceedling? It appears you're missing at least one dependency (thor).

I used a git clone command to study Ceedling for Ceedling-ui.

I did that gem install command and I got OpenSSL errors.  You can assume stack trace messages.
/usr/local/lib/ruby/2.6.0/rubygems/request.rb:84:in `rescue in configure_connection_for_https': Unable to require openssl, install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources (Gem::Exception)

Then at the end of the errors:
/usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- openssl (LoadError)

This seems to be a common problem with a few versions of Ruby: https://github.com/rvm/rvm/issues/4357

If you are using it from cloning the repo, there's a lot that can go wrong. There's not really a good path to installing it locally without extra rake hooks and if you don't make sure the submoudles are pulled down even if you install it, you may be missing things.
On a forked version, I've provided extra setup and install instructions to have rake install the locally built gem. https://github.com/BuLogics/Ceedling/tree/tmp-release-<IP_ADDRESS>. If people are interested, I can clean up the instructions and create a pull request for these improvements.

I am going to give it a look.  But i'm wondering if there is a Docker image for Ceedling.

You can find a docker image with a working snapshot here:
https://hub.docker.com/r/throwtheswitch/madsciencelab

yes. I've made a couple of attempts to do a release in the last couple months. I'll be trying again soon. It seems every time I prepare to do so, there are arguments about a few of the features. ;)

Great thank you ! Yes I saw many new features I would like to try 😉
I don't know how you make release and the work required for it but please let me know if I can help or test !

:) Thanks, I appreciate that. I'm honestly trying to aim towards a more regular release schedule and a formal process for releasing. It's definitely a work in progress though.


Unable to set 'no-build' and 'no-restore' when executing DotNetCoreRun

The DotNetCoreRunSettings class does not have properties that would allow us to set these two values.
To make matters worse, we can't use the usual workaround (which would look like this:  ArgumentCustomization = args => args.Append("--no-restore --no-build")) because the position is important: these settings cannot be appended at the end due to the fact the last position is reserved for arguments passed to the process being invoked.

@Jericho Sounds like something that should be supported.
To solve your issue until this is implemented, have you tried using ArgumentCustomization = args => args.Prepend("--no-restore --no-build")?

Unfortunately pretending the argument s is not an option either because the first position is reserved for the “run” command.

@Jericho Ah, that's true. As a last resort you could always rewrite the Arguments completely until this have been fixed.


[BUG] [Accessibility] Page should contain a level-one heading

Is there an existing issue for this?

[x] I have searched the existing issues

Current Behavior
Ensure that the page, or at least one of its frames contains a level-one heading

Element Location:
html
<html lang="en" data-capo="">

https://dequeuniversity.com/rules/axe/4.10/page-has-heading-one?application=AxeChrome
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- pnpm:

Anything else?
No response

This is a best practice section, not an issue


Request: inject svgs when this.props.path changes

currently props.path can only be set once, it would be nice to able to swap the svg path by change its props.

@goldensunliu this should be covered by #6 which I just released.

Re-opening this as upon further investigation I'm not sure this is fixed. Will likely continue discussion in #5.

@goldensunliu this issue should be fixed if you want to try grabbing the latest version now.

Closing due to inactivity. Feel free to post a new issue or reopen this one if you feel the issue isn't resolved.


Working Files?

Can I have the working files of this tut? Thanks

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0614115b-602d-cab2-307e-618f6a3dbd2f
Version Independent ID: 09e23d6d-c1f8-ca45-3ad0-47a6ff5ec213
Content: Use Quick measures to easily perform common and powerful calculations in Power BI - Power BI
Content Source: powerbi-docs/desktop-quick-measures.md
Service: powerbi
GitHub Login: @davidiseminger
Microsoft Alias: davidi

Thanks for your comment. Some of our tutorials include links to the sample data, others do not. I'll look into this article and see if the data is available, and if it is I'll update the article with a link.


(Binary) serialization of Taxonomies not supported

Brief bug description
I am attempting to cache the objects using a variant of your Webhooks version of the CachingDeliveryClient that I have modified to store into a distributed cache. But it seems the objects are not marked as serializable :(
I get this error when attempting to store my object into our distributed cache:
System.Runtime.Serialization.SerializationException: Type 'Kentico.Kontent.Delivery.DeliveryTaxonomyResponse' in Assembly 'Kentico.Kontent.Delivery, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
   at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(Type type)
   at System.Runtime.Serialization.FormatterServices.<>c.<GetSerializableMembers>b__5_0(MemberHolder mh)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, BinaryFormatterWriter serWriter, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Boolean check)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
   at ARRT.Kentico.Common.Extensions.Serialization.ToByteArray(Object obj) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Extensions\SerilizationExtensions.cs:line 20
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCacheManager.GetOrAddAsync[T](String key, Func`1 valueFactory, Func`2 dependenciesFactory, Func`2 shouldCache) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCacheManager.cs:line 95
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCachingDeliveryClient.GetTaxonomyAsync(String codename) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCachingDeliveryClient.cs:line 321
   at ARRT.Web.Helpers.Extensions.DeliveryClientExtensions.GetSitemapTaxonomy(IDeliveryClient deliveryClient) in C:\TFS\ARRT.All.Projects\ARRT.Web\Helpers\Extensions\DeliveryClientExtensions.cs:line 18
   at ARRT.Web.HostingServices.SitemapCacheHostedService.StartAsync(CancellationToken cancellationToken) in C:\TFS\ARRT.All.Projects\ARRT.Web\HostingServices\SitemapCacheHostedService.cs:line 36
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at ARRT.Web.Program.Main(String[] args) in C:\TFS\ARRT.All.Projects\ARRT.Web\Program.cs:line 27

Repro steps
Try serialize a DeliveryTaxonomyResponse to a distributed cache.
We use this code to take care of the serialization/deserialization:
public static byte[] ToByteArray(this object obj)
        {
            if (obj == null)
            {
                return null;
            }
            BinaryFormatter binaryFormatter = new BinaryFormatter();
            using (MemoryStream memoryStream = new MemoryStream())
            {
                binaryFormatter.Serialize(memoryStream, obj);
                return memoryStream.ToArray();
            }
        }
        public static T FromByteArray<T>(this byte[] byteArray) where T : class
        {
            if (byteArray == null)
            {
                return default(T);
            }
            BinaryFormatter binaryFormatter = new BinaryFormatter();
            using (MemoryStream memoryStream = new MemoryStream(byteArray))
            {
                return binaryFormatter.Deserialize(memoryStream) as T;
            }
        }

Expected behavior
All Kentico Kontent models should be serializable.
Test environment

Platform/OS: .NET Core 3.1.2, Kentico Kontent 12.3.0 librarys

Tried to work around this issue using BSON data format but no go on that front as well.
Attempted new serialization/deserialization routines:
 public static byte[] ToByteArray(this object obj)
        {
            if (obj == null)
            {
                return null;
            }
            //BinaryFormatter binaryFormatter = new BinaryFormatter();
            //using (MemoryStream memoryStream = new MemoryStream())
            //{
            //    binaryFormatter.Serialize(memoryStream, obj);
            //    return memoryStream.ToArray();
            //}
            using (MemoryStream ms = new MemoryStream())
            {
                using (BsonDataWriter writer = new BsonDataWriter(ms))
                {
                    JsonSerializer serializer = new JsonSerializer();
                    serializer.Serialize(writer, obj);
                }
                return ms.ToArray();
            }
        }
        public static T FromByteArray<T>(this byte[] byteArray) where T : class
        {
            //if (byteArray == null)
            //{
            //    return default(T);
            //}
            //BinaryFormatter binaryFormatter = new BinaryFormatter();
            //using (MemoryStream memoryStream = new MemoryStream(byteArray))
            //{
            //    return binaryFormatter.Deserialize(memoryStream) as T;
            //}
            using (MemoryStream ms = new MemoryStream(byteArray))
            {
                using (BsonDataReader reader = new BsonDataReader(ms))
                {
                    JsonSerializer serializer = new JsonSerializer();

                    return serializer.Deserialize<T>(reader);
                }
            }
        }

New Error:
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Kentico.Kontent.Delivery.DeliveryTaxonomyResponse. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Taxonomy'.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ARRT.Kentico.Common.Extensions.Serialization.FromByteArray[T](Byte[] byteArray) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Extensions\SerilizationExtensions.cs:line 52
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCachingDeliveryClient.GetTaxonomyAsync(String codename) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCachingDeliveryClient.cs:line 321
   at ARRT.Web.Helpers.Extensions.DeliveryClientExtensions.GetSitemapTaxonomy(IDeliveryClient deliveryClient) in C:\TFS\ARRT.All.Projects\ARRT.Web\Helpers\Extensions\DeliveryClientExtensions.cs:line 18
   at ARRT.Web.HostingServices.SitemapCacheHostedService.StartAsync(CancellationToken cancellationToken) in C:\TFS\ARRT.All.Projects\ARRT.Web\HostingServices\SitemapCacheHostedService.cs:line 36
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at ARRT.Web.Program.Main(String[] args) in C:\TFS\ARRT.All.Projects\ARRT.Web\Program.cs:line 27

hi @xantari. I'm looking into it right now.

Thanks so much! Let me know if you want any more of our code.

Hi @xantari ,
the code pointed out above is indeed not supported at the moment.

The first example would require models such as TaxonomyGroup to be marked with [Serializable] + potentially the model's properties & fields to be marked with some other attributes determining what should be serialized & what shouldn't.

The second example fails because the models don't have public constructors that could be used by the (binary) JSON serializers. Especially during deserialization.

This effectively prevents serialization and deserialization of Taxonomies.
Let me please further understand your scenario so that we can come up with a good fix:

Do you require binary serialization or would e.g. JSON serialization do? Even MS docs recommend avoiding binary serialization if possible
Do you need to serialize the whole DeliveryTaxonomyResponse or would it be enough to serialize just the TaxonomyGroup? In general, I would avoid serializing any *Response object as they contain metadata such as request URLs, raw content, etc. that are not relevant to the object's data itself.

IDistributedCache interface which is what nearly all of the distributed cache providers all have Set() and SetAsync() methods that require raw binary data:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.distributed.idistributedcache?view=dotnet-plat-ext-3.1

Do you require binary serialization or would e.g. JSON serialization do? Even MS docs recommend avoiding binary serialization if possible

IDistributedCache requires binary data (byte[] as shown in Set methods in link above).

Do you need to serialize the whole DeliveryTaxonomyResponse or would it be enough to serialize just the TaxonomyGroup? In general, I would avoid serializing any *Response object as they contain metadata such as request URLs, raw content, etc. that are not relevant to the object's data itself.

I just took your current CacheDeliveryClient from here:
https://github.com/Kentico/kontent-boilerplate-net/blob/master/src/content/Kentico.Kontent.Boilerplate/Caching/Webhooks/CachingDeliveryClient.cs
Then I changed the CacheManager to use the DistributedCache. Which means doing binary serialization of all the objects there.
The CachingDeliveryClient.cs at the above URL is serializing the entire DeliveryTaxonomyResponse.

Whats interesting is I just noticed the extension methods here: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.distributed.idistributedcache?view=dotnet-plat-ext-3.1
Which show a bunch of strings.
So perhaps I can try serializing all of that data as regular JSON strings instead. Will try that and update this issue request when I finish.

So perhaps I can try serializing all of that data as regular JSON strings instead. Will try that and update this issue request when I finish.

Yup, that'd be great. There still might be a problem deserializing the taxonomies but a potential fix might be simpler than in the case of binary serialization.
Thanks for the effort!

Couldn't get it working with String's either :(
Get this error when trying to serialize DeliveryTaxonomyResponse.
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Kentico.Kontent.Delivery.DeliveryTaxonomyResponse. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Taxonomy', line 1, position 12.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCachingDeliveryClient.GetTaxonomyAsync(String codename) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCachingDeliveryClient.cs:line 352
   at ARRT.Web.Helpers.Extensions.DeliveryClientExtensions.GetSitemapTaxonomy(IDeliveryClient deliveryClient) in C:\TFS\ARRT.All.Projects\ARRT.Web\Helpers\Extensions\DeliveryClientExtensions.cs:line 18
   at ARRT.Web.HostingServices.SitemapCacheHostedService.StartAsync(CancellationToken cancellationToken) in C:\TFS\ARRT.All.Projects\ARRT.Web\HostingServices\SitemapCacheHostedService.cs:line 36
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at ARRT.Web.Program.Main(String[] args) in C:\TFS\ARRT.All.Projects\ARRT.Web\Program.cs:line 27

It is erroring on this line:
return JsonConvert.DeserializeObject(Encoding.UTF8.GetString(data));
        /// <summary>
        /// Returns a taxonomy group.
        /// </summary>
        /// <param name="codename">The codename of a taxonomy group.</param>
        /// <returns>The taxonomy group with the specified codename.</returns>
        public async Task<DeliveryTaxonomyResponse> GetTaxonomyAsync(string codename)
        {
            var data = (await CacheManager.GetOrAddAsync(
                CacheHelper.GetTaxonomyKey(codename),
                () => DeliveryClient.GetTaxonomyAsync(codename),
                CacheHelper.GetTaxonomyDependencies,
                response => response != null));

            return JsonConvert.DeserializeObject<DeliveryTaxonomyResponse>(Encoding.UTF8.GetString(data));
        }

Attached is my full DistributedCachingDeliveryClient.cs.
DistributedCachingDeliveryClient Code.zip

Yes, I suspected that would happen. As I said earlier:

The second example fails because the models don't have public constructors that could be used by the (binary) JSON serializers. Especially during deserialization.
This effectively prevents serialization and deserialization of Taxonomies.

We know for sure that we'll need to fix the taxonomies. But I'm more curious whether the other objects/methods work fine - like GetItemsAsync<T>.
Could you please verify that your implementation works fine for content items? If so, we'll know that if we replicate the pattern to taxonomies, it'll resolve your issue.
If possible, I'd like to avoid using the [Serializable] attributes in the SDK and rather rely on JSON/BSON serialization.
Thank you!

Couldn't get GetItemsAsync to work either.
Tried this:
var result = await deliveryClient.GetItemAsync<LandingPage>("home", new DepthParameter(100));

Then got the following error:
[11:03:39 FTL] Application start-up failed
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Kentico.Kontent.Delivery.DeliveryItemResponse`1[ARRT.Web.Models.LandingPage]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Item', line 1, position 8.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCachingDeliveryClient.GetItemAsync[T](String codename, IEnumerable`1 parameters) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCachingDeliveryClient.cs:line 112
   at ARRT.Kentico.Common.Caching.Webhooks.DistributedCachingDeliveryClient.GetItemAsync[T](String codename, IQueryParameter[] parameters) in C:\TFS\ARRT.All.Projects\ARRT.Kentico.Common\Caching\Webhooks\DistributedCachingDeliveryClient.cs:line 75
   at ARRT.Web.HostingServices.SitemapCacheHostedService.StartAsync(CancellationToken cancellationToken) in C:\TFS\ARRT.All.Projects\ARRT.Web\HostingServices\SitemapCacheHostedService.cs:line 38
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at ARRT.Web.Program.Main(String[] args) in C:\TFS\ARRT.All.Projects\ARRT.Web\Program.cs:line 27

It seems the generated models are not compatible with serialization either.
This was the command we used to generate our models:
dotnet tool restore
dotnet tool run KontentModelGenerator -p "406ac8c6-58e8-00b3-e3c1-0c312965deb2" -o "..\Models\ContentTypes" -n "ARRT.Web.Models" -g -s -f "Generated" -b "ContentTypeBase"

If fails when it tries to deserialize the JSON data that is stored in the distributed cache:
return JsonConvert.DeserializeObject<DeliveryItemResponse<T>>(Encoding.UTF8.GetString(data));

Attached is what was in the JSON data that got returned from the distributed cache.
Example Distributed Cache JSON data.zip

I've been trying to figure out a way around this issue and started down the path of making the delivery client use it's own HttpClient that pulls it's json data from the distributed cache.
My issue is that I don't fully understand how the cache eviction works with the current sample code and those SemaphoreSlims to know how to correlate it to some JSON data that is in the distributed cache based off of the unique URL that is used as the Cache Key in the distributed cache.
I was inspecting the data within the CacheManager and it appears there is an ApiUrl property in the response. This would correlate exactly to what the cache key is that is being used in the HttpRequestCachingHandler shown below.
So perhaps this might be a way to solve this problem, but I don't fully understand all the internals here to complete it.
    public class HttpRequestCachingHandler : DelegatingHandler
    {
        private readonly ICacheManager _cacheManager;

        public HttpRequestCachingHandler(ICacheManager cacheManager)
        {
            _cacheManager = cacheManager;
        }

        protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            string jsonData;
            HttpResponseMessage response;

            //Try get the JSON data from our distributed cache
            if (_cacheManager.TryGet<string>(request.RequestUri.ToString(), out jsonData))
            {
                response = new HttpResponseMessage() { StatusCode = HttpStatusCode.OK };
                response.Content = new StringContent(jsonData, System.Text.Encoding.UTF8, "application/json");
                return response;
            }
            else //Not in cache, lets fetch it from Kentico.
            {
                response = await base.SendAsync(request, cancellationToken);

		//TODO: Put the JSON data into the cache here using request.RequestUri.ToString() as the cache key
            }

            return response;
        }
    }

The KenticoHttpClient:
    public class KenticoHttpClient
    {
        public KenticoHttpClient(HttpClient client)
        {
            Client = client;
        }

        public HttpClient Client { get; }
    }

The startup code:
            services.AddTransient<HttpRequestCachingHandler>();
            services.AddHttpClient("kenticoclient")
            .AddHttpMessageHandler((s) => s.GetService<HttpRequestCachingHandler>())
            .AddTypedClient<KenticoHttpClient>();

            services.AddSingleton<IContentLinkUrlResolver, CustomContentLinkUrlResolver>();
            services.AddSingleton<ITypeProvider, CustomTypeProvider>();

            services.AddWebhookInvalidatedCachingClient(builder =>
            {
                var client = DeliveryClientBuilder
                        .WithOptions(_ => deliveryOptions)
                        .WithTypeProvider(builder.GetService<ITypeProvider>())
                        .WithContentLinkUrlResolver(builder.GetService<IContentLinkUrlResolver>())
                        .WithHttpClient(builder.GetRequiredService<KenticoHttpClient>().Client)
                        .Build();
                return client;
            }, (options) =>
            {
                options.StaleContentTimeout = TimeSpan.FromSeconds(2);
                options.DefaultTimeout = TimeSpan.FromHours(24);
            });

@xantari thank you very much for all the information. Implementing IDistributedCache is much more complex than IMemoryCache (mostly due to the serialization).
We now need to decide what level of support we want to incorporate in the SDK. Questions we are asking ourselves are:

Do we want to cache HTTP responses (JSONs)?
Do we want to cache strongly-typed models?
Or do we want to cache whole Delivery*Response objects?

Caching HTTP responses
As you know, one of the things we're planning is better support for HttpClientFactory and, transitively, retry policies using Polly:

Use HttpClientFactory to implement resilient HTTP requests
Implement HTTP call retries with exponential backoff with HttpClientFactory and Polly policies

Since Polly also supports caching, it could be a way to go for caching HTTP responses:

https://nodogmablog.bryanhogan.net/2018/11/caching-in-polly-6-and-the-httpclientfactory/
https://github.com/App-vNext/Polly/wiki/Cache
Polly.Caching.MemoryCache
Polly.Caching.IDistributedCache
Advantages:
easy to implement (both for us and you)

Disadvantages:

Eviction of cache entries is not supported yet (planned for Polly v8 though)
You could probably build only a very flat cache with no sophisticated cache dependencies, etc. (but it might potentially be suitable for your scenario...?)

This can already be tested if you use the Generated clients approach of registering the HttpClientFactory:
services.AddHttpClient("FactoryClient", c => { /* Do whatever else you wish here... */ })
                    .AddHttpMessageHandler<LoggingHandler>()
                    .AddTypedClient(c => DeliveryClientBuilder.WithOptions(...).WithHttpClient(c).Build())
                    .AddPolicyHandlerFromRegistry(/* see https://nodogmablog.bryanhogan.net/2018/11/caching-in-polly-6-and-the-httpclientfactory/ */);

Caching strongly-typed models & Delivery*Response objects
Would require major refactorings:

Create public constructors (for DeliveryItemResponse<T>, ApiResponse, etc.)
Make the models (such as DeliveryItemResponse<T>) free of IModelProvider (move the logic outside the models)
add setters
reconsider the dynamic properties such as dynamic LinkedItems

So the question now is: Do we want to support object-level caching as for IMemoryCache or are we ok to support caching of JSON HTTP responses for IDistributedCache?
If you have any input on this @xantari please let us know or we can schedule a call if you'd be up for it.

Our main goal is as follows:

Cache all data from Kentico (including assets, which we are now doing).
Evict cache entries that change in Kentico Kontent by using Webhooks.

The caching of HTTP JSON data using Polly would work fine as long as there was a way to remove the entire cache when a change occurred so that it could start building up the cache again. However you need to know all the cache keys Webserver Node 1, Webserver Node 2, and Webserver Node 3 put into the cache for instance. (example of a 3 node web server).
So when the webhook came in, how would you know how to clear the cache? Even keeping track of keys on each node is hard, because Node 1 might only have 15 of the keys, Node 2 might have 30 of the keys, and Node 3 has 12 of the cache keys.
If there is a way to simply clear the entire distributed cache then we could perhaps easily solve this with Polly and when an incoming webhook came in, we just clear the entire cache so that all nodes start to re-fetch content again.
That is why I was trying to get it to work with what you already have working with IMemoryCache. Because it has all the dependency stuff figured out already and seems to figure out the depedency keys to evict. It would have provided the best solution as It would have just been a matter of swapping out IMemoryCache for IDistributedCache if it weren't for the serialization issue.

thanks for the video call, the motivation is now clear and let's treat this as a more generic issue of supporting distributed caching in #196


Create an asset cost sheet for GLM models.

Carryover todo item from GRIP project

@aivanova5, can you provide more information about what is required?


Waiters can be bad friends. How about retriers?

I'm seeing the following awkward behavior, but it's an instance of a broader issue with waiters in general (using boto3 here, but it's just calling through to botocore for the actual logic):
# Context is setting up a cross-account peering connection
conn = boto3.resource('ec2').VpcPeeringConnection(pcx_id)
conn.wait_until_exists()
conn.accept()

This will occasionally throw a ClientError with InvalidVpcPeeringConnectionID.NotFound on the conn.accept() call.
The issue, as I understand it, is that wait_until_exists() calls DescribeVpcPeeringConnections repeatedly until it gets a result. Unfortunately, there's no guarantee that the metadata infrastructure that responds to my DescribeVpcPeeringConnections call will be the same one that responds to my AcceptVpcPeeringConnection call, and if you're particularly unlucky (as I appear to have been recently) the former will see your peering connection when it hasn't propagated to the latter yet.
Given how AWS APIs are structured, I don't think there's much we can do better if we stick to the same user-facing API, but ultimately all I want is for my .accept() call to succeed, and the .wait_until_exists() call was an implementation detail for that. So how about adding a botocore concept of an "eventual consistency retrier" (better name proposals welcome!) that uses much of the same information to let me retry operations like AcceptVpcPeeringConnection automatically. For example, this code is basically enough information to know to retry AcceptVpcPeeringConnection automatically and to ignore (possibly with exponential backoff or similar) InvalidVpcPeeringConnectionID.NotFound errors.
I'm not too concerned about how the notion is presented to the user (we'd want to be able to opt in because if you aren't expecting a resource to show up, there's not much point in waiting) but it seems like this could be a useful building block.
Any thoughts? Is there a better way to get reliable "wait until X exists then do something with it" behavior with today's machinery?

I've run into this issue myself, and retrying the call until it succeeds is usually what I end up doing.
I like the idea of an eventual consistency retrier, but the interesting part is going to be how to introduce this in a general way.  One thing you have to be careful of is ensuring your operation is idempotent.  For example, if we there was something like this for run_instances, it could be possible to receive an error (say some sort of error in transit sending the response, timeout/connection error or a general service error) but still have the request succeed on the EC2 backend.  This would mean we'd retry the request, and possibly end up with two instances launched.
The way to deal with this in EC2 is to use their client tokens (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html), and we recently added support for these idempotency tokens (https://github.com/boto/botocore/pull/1081)
Just thinking out loud here.  Marking as others-chime-in.  Curious to see what others think.

From the perspective of a client, the wait function ensures that the resource is ready to be interacted with (it's online). Since there is a delay of 'eventual consistency', perhaps there should be and option within the wait function that will indicate if it should also probe other servers for consistency (check if service is fully online).

Stumbled upon this from reviewing https://github.com/boto/boto3/issues/3206. I'm going to reopen and make this as feature request.


Authentication support.

As above, summarize bot now can be accessed by everyone, need to add authentication feature, may related to https://github.com/bdim404/HackerNews-Summarize-Telegram-Bot/issues/1.

https://github.com/bdim404/HackerNews-Summarize-Telegram-Bot/pull/14


Update list of installation locations

Update the list of valid installation locations to reflect changes in RC4

Hi @StephanieSu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Stephanie Su). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


Fixes #2 ExpirationDateString localization

GetExpirationDateString is dependant on culture setting, this forces datetime and certificate to have the same culturesetting.
As requested by @ardalis

Thanks!


Implement File::replace_contents_async manually

The contents need to be owned until the callback has triggered.

Extracted from https://github.com/gtk-rs/gio/pull/108 as it's unrelated

👍 Even if appveyor fail

Thanks!


Add connect_timeout to configuration

This PR allows open_timeout to be configurable. I have a case where it is critical to quickly switch to another geocoding provider if the primary one is unavailable or responds too slowly.
Failed requests caused by exceeding open_timeout or timeout will be handled the same way thanks to the current error handling approach.

@alexreisner sorry for pinging again. any chance this could be merged?

Thanks for the suggestions 🙌  Updated.


Document setting up LabJack on linux

Taking notes here, maybe make a proper doc later

Installed the stable version for 64 bit linux from here
https://labjack.com/support/software/installers/ljm

Getting this error:
$ labjack_kipling
/opt/labjack_kipling/Kipling: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

This:
sudo apt-get install libgconf-2-4

did the trick

had to do:
sudo pip3 install labjack-ljm

for labjack python scripts to work

If at some point we set up another machine with labjack, need to confirm that these steps are correct. India team perhaps?


LineNumberSpec fails with Scala 3

org.apache.pekko.util.LineNumberSpec
https://github.com/apache/incubator-pekko/actions/runs/6242272017/job/16945926518
tested only in nightly build
has been failing a while
I think we can relax the line number matching to make the test pass.

#683 merged


fetch cors problem?

when i start project with "npm start", the fetch request server OK with cookie。But after npm run build project，the fetch request server without cookie.So i cant take the user's session. I do not know why it is?

It's not the problem of dva. You can use other request libraries like axio, or read the fetch doc.


Update index.md

👷 Deploy Preview for gladia processing.

Name
Link

🔨 Latest commit
d524f15f2ddfb37bb01fbe2d5ccbb9d423e331b1

🔍 Latest deploy log
https://app.netlify.com/sites/gladia/deploys/63dfeea249ca1000084871e9


Shape Inference code for the DepthToSpace operator

The DepthToSpace operator accepts an input tensor and has a blocksize attribute. The operator reshapes the input tensor according to the blocksize attribute. Specifically, given an input tensor of dimension [N,C,H,W] (where N is the batch axis, C is the channel or depth, H is the height and W is the width) and a blocksize, the output tensor will have shape [N, C / (blocksize * blocksize), H * blocksize, W * blocksize].
This PR implements the shape inference code for the operator.
Signed-off-by: Ettore Tiotto<EMAIL_ADDRESS>

Jenkins Linux ppc64le Build #1282 [push] Shape Inference code for... passed after 1 hr 2 min


Incorrect POJO name for resources of type array

When defining a resource named addresses, the generated file is Addres.java instead of Address.java
The raml file contains:
schemas:
  - Address: !include schemas/address.json
  - Addresses: !include schemas/addresses.json

/addresses:
  displayName: Addresses
  get:
    responses:
      200:
        body:
          application/json:
            schema: Addresses

And the schemas:
{
   "$schema": "http://json-schema.org/draft-04/schema",
   "id": "Addresses",
   "type": "array",
   "uniqueItems": true,
   "items": {
      "$ref": "pojogen/address.schema"
   }
}

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "Address",
    "type": "object",
    "properties": {
        "tString": {
            "type": "string",
            "description": "The type string."
        }
    }
}

To reproduce the issue, you may add a unit test in JsonSchema2PojoTest that parses the 2 schema files:
    @Test
    public void schemaHelper_ExtractsArray_Plural() throws Exception {
        URL url = Resources.getResource(path + "addresses.schema");
        String text = Resources.toString(url, Charsets.UTF_8);
        ApiBodyMetadata mapSchemaToPojo = SchemaHelper.mapSchemaToPojo(null, text, "com.test", "Fallback", null);
        assertThat(mapSchemaToPojo.isArray(), is(true));
        assertThat(mapSchemaToPojo.getName(), is("Address"));
    }

The problem seems to be that in the mapSchemaToPojo method, when we resolve the schema name, if it is an array we look for the subschema referenced in $ref and use it's ID as a name, thus for the Addresses resource we obtain Address. SchemaHelper.java#L560
Then, we instantiate ApiBodyMetadata with the resolved name Address and we singularize the name passed as parameter, since it is already a singular, it fails and gives Address -> Addres. ApiBodyMetadata.java#L94
I'm not sure of the impacts, maybe in ApiBodyMetadata.java#L94 we should disable singularization for array types ?

I think the issue lies in the InflectorBase which is not handling words ending in double s correctly for singularisation. I have added a small fix and will be providing a pull request for the raml parser


sheldon: 0.7.3 -> 0.7.4

Description of changes
Build on Unix instead of solely focusing on Linux.
Release notes:

Support optional access in templates. This allows you to use the
.? operator in templates to optionally access a field in templates, for
example {{ hooks?.pre }} will return None and not error if pre is not
present in hooks. You will now receive a deprecation warning if you use the
get filter which does the same thing.
Custom templates might have to be updated, for example if you were using a
custom defer template you would need to update it to the following.
[templates]
defer = "{{ hooks?.pre | nl }}{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}"

Release diff:
https://github.com/rossmacarthur/sheldon/compare/0.7.3...0.7.4
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofBorg build sheldon

Superseded by #337869.


Infer source locations from past alternatives

There is a convenience I enjoy in VS that would also be nice to have here.
The source file locations in my PDBs point to temporary CI build folders that have since been moved to longer-term backup locations.  The "Find alternative..." prompt in raddbg already makes debugging in this case possible, but it prompts again for each alternative source location.  Something VS seems to do is use previously specified alternative paths to guess at future alternatives.
This works perfectly in the "moved the entire folder" case where you end up only having to specify a single alternative and the rest are found automatically by comparing the relative paths.  (And in the event that doesn't find an automatic match, it simply falls back to the regular alternative prompt.)
Thanks!  This tool is already amazing.

Er... it looks like the "File Path Map" feature (that I just discovered) is already 98% of what I was hoping for.  Perhaps this should be titled something closer to "Automatic File Path Maps" where it tries to infer a path map one level higher than the individual source file?

I've improved this in 77190c4aa003af74a7bdf4c3a4d8bc522895de78. Instead of just having the "Find Alternative" button pick a replacement for a single file, it'll now try to override the common root directory between the source and destination paths, e.g.:

C:/foo/bar/baz.c mapped to D:/foo/bar/baz.c will cause an override of C: -> D:
C:/1/2/foo/bar.c mapped to C:/2/3/foo/bar.c will cause an override of C:/1/2 -> C:/2/3
C:/foo/bar/baz.c mapped to D:/1/2/3.c will cause an override of C:/foo/bar/baz.c -> D:/1/2/3.c
(and so on)

Let me know if you run into any issues with this.


feat: add github.com/pantheon-systems/autotag.yaml

Not sure if the PR failed the build or some other issue. LMK what I should do next.

I think I see. The build broke when tj/node-prune removed its goreleaser.yaml - https://github.com/tj/node-prune/commit/330b83e1fc4963b28206894403abcd3d604b84a3

Latest golangci-lint v1.27.0 has some updates that broke the build. I fixed most of them and added a .golangci.yml to ignore the goerr113 errors which would require more work to resolve, if we want to at all.
https://github.com/goreleaser/godownloader/pull/176/commits/e27f4ce5b6dbbfc015ad35aabbb90c3e620265ab

All fixed.
I saw another deprecation message, this one from hugo, in the travis output they may have to be addressed next but I couldn't find it in the repo:
Page.Hugo is deprecated and will be removed in a future release. Use the global hugo function.


Dump error, and refuse to run if Dir is missing trailing /

Dir needs a trailing /, let's check for that, and exit if missing.

Actually, if it's not there, let's just auto-append it.


about pdll inculded cpp function

I greatly appreciate your team's work. I have a question regarding the PDLL language in MLIR: How can I import C++ functions into PDLL? I haven't found this mechanism in the MLIR documentation. Is there any relevant information available?

Take a look at this: https://github.com/alibaba/BladeDISC/blob/da990f41641affe228ad5122aaa8badd2ccd70bd/tao_compiler/mlir/disc/transforms/disc_pdl_utils.cc#L411

Thank you very much.  This method resolved my question regarding the conversion between value and valueRange. Additionally, if possible, I would like to inquire whether such functionality can be directly implemented in PDLL without C++?


Fix bundle path for cocoapods resources for issue #2 noxt/ScrollableD…

Fix bundle path for cocoapods resources, base on this tutorial https://the-nerd.be/2015/08/07/load-assets-from-bundle-resources-in-cocoapods/

Nice work! Thx


Add UnmodifiableListMixin to pkg/collection

UnmodifiableMapMixin exists, so it seems strange that UnmodifiableListMixin doesn't as well.
See also issue #11178.

This issue has been moved to dart-lang/collection#7.


can.sub with strict properties mode

Now when any of values is missing the can.sub returns null
I understand to needs of this in can.control and templated bindings.
I came with idea, how to improve can.sub as templating system.
And I call it strict mode and can be controlled with fourth param in can.sub function
sub: function( str, data, remove, strict ) { ... }

When true is passed it returns null when any value is missing.
When false is passed it returns new template where missing values are kept as template (meta-template).
There is example of usage strict param:
// Without strict
can.sub("a:{a} b:{b}", {b:"hello"}) // -> "a: b:hello"

// Strict to true (third param is for remove value)
can.sub("a:{a} b:{b}", {b:"hello"}, false, true) // -> null

// Strict to false
can.sub("a:{a} b:{b}", {b:"hello"}, false, false) // -> "a:{a} b:hello"

There is initial implementation https://github.com/schovi/canjs/compare/can-sub-strict

@schovi Thanks for submitting this issue.  However, I don't think it's something most people need, and its not something the framework needs.  can.sub is just a means to an end. Hopefully you can get this in lodash or some other micro-templating library.  Thanks!


C# backend generates unoptimized enumerator pattern

If you look at the generated IEnumerable code, it generates a plain yield return enumerator. That means there's an allocation on every GetEnumerator call - which is normally avoided by providing a concrete StructEnumerator GetEnumerator() overload. The code seems to do a lot of redundant work (exception is checked on the indexer hot path, so indexer will never be inlined).
Would it make a bit more sense to return a ReadOnlySpan<T> view over the data? That would also give a bit of flexibility to the caller at no performance expense. That would also remove the inheritance information from the struct,s.

Thanks for the suggestion. Maybe I misunderstand, but would you want to return a ReadOnlySpan<T> from safe code? We already return one if you enable unsafe bindings via Config::use_unsafe.
About StructEnumerator, I haven't thought about it so much, but I'd be open to it. Could you sketch how exactly that would look like for one slice type? If this needs utility classes or structs (which StructEnumerator  seems to be), I'd also prefer if they could be generic, or at least be nested in the parent type to avoid clutter.

Thanks for the suggestion. Maybe I misunderstand, but would you want to return a ReadOnlySpan from safe code? We already return one if you enable unsafe bindings via Config::use_unsafe.

I was mostly shooting for use a ReadOnlySpan<T> implementation for the indexer internally. That would avoid having to use Marshalling machinery and written down bounds checks.
class SliceUseAsciiStringPattern : IEnumerable<UseAsciiStringPattern>
{
        public IEnumerator<UseAsciiStringPattern> GetEnumerator()
        {
            for (var i = 0; i < (int)len; ++i)
            {
                yield return this[i];
            }
        }
        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }
}

The above would be turned into something like the below, and it's likely not everything is needed, I just adapted the implementation of dotnet's List.cs.
class SliceUseAsciiStringPattern : IEnumerable<UseAsciiStringPattern>
{
        public Enumerator GetEnumerator()
        {
            // Writing this, I wonder if it's easier to just `new ReadOnlySpan<T>(this.data.ToPointer(), (int)this.len).GetEnumerator()`
            return new Enumerator(this);
        }
        IEnumerator<UseAsciiStringPattern> IEnumerable<UseAsciiStringPattern>.GetEnumerator()
        {
            return this.GetEnumerator();
        }
        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }

        public struct Enumerator : IEnumerator<UseAsciiStringPattern>, IEnumerator
        {
            private readonly SliceUseAsciiStringPattern _list;
            private int _index;
            private T? _current;

            internal Enumerator(SliceUseAsciiStringPattern list)
            {
                _list = list;
                _index = 0;
                _current = default;
            }

            public void Dispose()
            {
            }

            public bool MoveNext()
            {
                var localList = _list;
                if ((uint)_index < (uint)localList._size)
                {
                    _current = localList.localList[_index];
                    _index++;
                    return true;
                }

                _index = _list.len + 1;
                _current = default;
                return false;
            }

            public T Current => _current!;

            object? IEnumerator.Current => _current;

            void IEnumerator.Reset()
            {
                _index = 0;
                _current = default;
            }
        }
    }
}

I also think the Enumerator implementation can be removed if an IReadOnlyList<T> constraint is satisfied, as that gives us an indexer implementation.

The above would be turned into something like the below

Ah, yes, I'm generally open to that. I don't have so much time to test this right now, but I'd accept PRs.
The only question / caveat I have, is this really faster than the KISS version existing right now? You'd have to pay for the bounds check anyway as you just move that cost to MoveNext (and I'd unscientifically argue that most people only access elements once anyway when iterating).  Then again, removing allocation sources alone might be worth it.

// Writing this, I wonder if it's easier to just new ReadOnlySpan<T>(this.data.ToPointer(), (int)this.len).GetEnumerator()

Doesn't this need unsafe?
In any case, checklist for PRs implementing this

[ ] Implement code gen in C# backend
[ ] Have some (out of project) benchmark showing this makes a difference (perf or mem), attach results here or in PR
[ ] Add appropriate C# unit test in safe or unsafe backend


1.0.0-rc3 release

[x] fix https://github.com/Leaflet/Leaflet/issues/4783
[x] update changelog (cf https://github.com/Leaflet/Leaflet/pull/4786)
[x] update version in src/Leaflet.js (cf https://github.com/Leaflet/Leaflet/pull/4786)
[x] update version in package.json (cf https://github.com/Leaflet/Leaflet/pull/4786)
[ ] run npm run release
[ ] wait for the Travis to build and upload artifacts (the build, leaflet.zip, etc.)
[x] update the download page in gh-pages to point to the new release (cf https://github.com/Leaflet/Leaflet/pull/4787)
[x] update the website to use the new release (examples, tutorials, etc.) (cf https://github.com/Leaflet/Leaflet/pull/4787)
[x] update documentation with Leafdoc (cf https://github.com/Leaflet/Leaflet/pull/4787)
[x] update the playground to show an option for rc3
[ ] tweet about the new release
[ ] publish the GitHub release entry
[x] write and publish blog post (cf https://github.com/Leaflet/Leaflet/pull/4787)

cc @yohanboniface @perliedman @hyperknot @IvanSanchez

Turns out I can just rebuild the jsbin public/js files and rsync them to rhcloud. Yay!


Element improvements

TODO:

[x] splash.scroll_position
[x] element:png() and element:jpeg() should work for out-of-window elements;
[x] element:mouse_click() should work for out-of-window elements (#578);
[x] element:mouse_hover() should work for out-of-window elements
[x] updated Element docs
[x] don't use .node everywhere

Codecov Report

Merging #633 into master will decrease coverage by 0.02%.
The diff coverage is 80.95%.

@@            Coverage Diff             @@
##           master     #633      +/-   ##
==========================================
- Coverage   87.57%   87.54%   -0.03%
==========================================
  Files          41       41
  Lines        5489     5509      +20
  Branches      761      764       +3
==========================================
+ Hits         4807     4823      +16
- Misses        513      516       +3
- Partials      169      170       +1

Impacted Files
Coverage Δ

splash/browser_tab.py
93.68% <100%> (+0.05%)
:arrow_up:

splash/qtrender_lua.py
95.84% <71.42%> (-0.29%)
:arrow_down:

Tests are failing because of #635, but they pass for me locally (with a cached PyQT version), so I'm merging this pull request.


Create CI configuration for "next" branch

Creates a workflow for checking PRs to the next branch that skips the version increment check in ct lint. Remove the existing configuration we added to master, which should be kept as-is.
Tested locally to confirm desired effect: https://gist.github.com/rainest/95149d16e4f683d282a4777e68278ec7

Updated to handle this the other way around: the default ct.yaml now disables version checks, and master's CI jobs explicitly specify a different config, ct-master.yaml, which enables version checks.
Did not use flags for master's jobs since (a) it appears that install also does some increment checking but doesn't have a flag to control that alone and (b) there are several master jobs, and it's simpler to just point them at a single config file rather than add flags to each individually if need be in the future.


Refactor Light Client verification predicates interface for use from IBC

Closes #956
The main aim of this PR is to remove references to the LightBlock type from the verification predicates, as the LightBlock type isn't used in https://github.com/informalsystems/ibc-rs/pull/1252
Tomorrow I'll try working on refactoring that PR to make use of this code to see if it will work.

[x] Referenced an issue explaining the need for the change
[ ] Updated all relevant documentation in docs
[ ] Updated all code comments where relevant
[ ] Wrote tests
[ ] Added entry in .changelog/

The rustdoc error seems to only pop up with Rust nightly 1.57.0, whereas it compiles just fine with 1.56.0.
It's a problem in prost-derive's documentation:
error[E0034]: multiple applicable items in scope
Error:    --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-derive-0.7.0/src/lib.rs:109:14
    |
109 |             .intersperse(quote!(|));
    |              ^^^^^^^^^^^ multiple `intersperse` found
    |
    = note: candidate #1 is defined in an impl of the trait `Iterator` for the type `Map<I, F>`
    = note: candidate #2 is defined in an impl of the trait `Itertools` for the type `T`
help: disambiguate the associated function for candidate #1
    |
105 ~         let tags = Iterator::intersperse(field
106 +             .tags()
107 +             .into_iter()
108 +             .map(|tag| quote!(#tag)), {
109 +         let mut _s = $crate::__private::TokenStream::new();
110 +         $crate::quote_each_token!(_s $($tt)*);
  ...
help: disambiguate the associated function for candidate #2
    |
105 ~         let tags = Itertools::intersperse(field
106 +             .tags()
107 +             .into_iter()
108 +             .map(|tag| quote!(#tag)), {
109 +         let mut _s = $crate::__private::TokenStream::new();
110 +         $crate::quote_each_token!(_s $($tt)*);
  ...


Player setup script not working

There are no errors apart from more than one audio listener and when the host or client spawns in the scene camera doesn't turn off and controls change both characters.

Maybe you should check your scene camera and make sure it was tagged as "main camera"