feat: add -o flag to override the output file for a single input file

While this could be seen as redundant given the existing flag -stdout, redirecting stdout is difficult in some environments such as Bazel (https://github.com/bazelbuild/bazel/issues/5511).
Expected behaviour
Starting point:
$ ls
foo.templ  go.mod  go.sum out/
$ cat foo.templ
$ cat go.mod
module foo

go 1.22.2

require github.com/a-h/templ v0.2.680 // indirect

New behaviour:

templ generate -f foo.templ -o bar_templ.go generates bar_templ.go.
More interestingly for Bazel, templ generate -f foo.templ -o out/bar_templ.go generates out/foo_templ.go.
Setting -o without -f returns an error stating the missing requirement.
Simultaneously setting -o and -stdout returns an error citing the incompatibility.

Hi, folks!
I didn't start a discussion because it seemed a small enough feature not to warrant the "major" piece of work described in CONTRIBUTING.md, but please do let me know if you prefer it that way.
Thanks in advance for your time.
PS: I have only been using Templ for a few days, but I'm very impressed so far. Nice job!

I had somehow overlooked https://github.com/a-h/templ/pull/198. Sorry. It's discussion issue seems closed, so I'll carry on here.
While I totally understand the reticence to allow generating files in a separate package, let me expand a bit on the Bazel situation.
Due to how Bazel works, generated files need to be written to a directory different to that of the source, even if they conceptually belong there. And in fact when you try to use the generated source files as targets for other rules (e.g., to build a Go library), it will be as if they are there. Just not during generation. Having -stdout offers some respite here, but then we get to the second problem: the support for redirection in Bazel is very limited, and forces you to go with shell scripts that you might have to customise per platform (e.g., can't assume that Bash is everywhere). I believe that the fix really belongs in Bazel, but it's an unrealistic target for me. Hence why I implemented a rather minimal support in templ that I hoped wouldn't be too offensive, even if I'm not the biggest fan of -o flags myself.
Ultimately, I'd like to create reusable Bazel rules for templ to remove as much of the hackery as possible at the point of usage. Possibly even integrate them with Gazelle (which autogenerates Bazel targets), and ensure that the templ binary tracks the version in go.mod. But I'm happy to scale down my ambitions here and go with a much more limited solution here if you do believe that -o isn't really worth it. I only need Linux, and writing the Bazel rules was just a side-quest on some other project anyway. :grin:
Thanks for your time.

Thanks for the PR, sorry it's got conflicts now - but to be fair, that's because of the stdout -> stderr issue. 😁
I'm up for adding the feature, but I think we need a suite of tests to cover all of the scenarios, or it will introduce flakiness. The existing unit test suite covers the standard use cases, so up until now there hasn't been a specific suite of tests for generatecmd.
So to get us started, I added one:
package generatecmd

import (
	"context"
	"io"
	"log/slog"
	"os"
	"path"
	"testing"

	"github.com/a-h/templ/cmd/templ/testproject"
)

func TestGenerate(t *testing.T) {
	log := slog.New(slog.NewJSONHandler(io.Discard, nil))
	t.Run("can generate a file in place", func(t *testing.T) {
		// templ generate -f templates.templ
		dir, err := testproject.Create("github.com/a-h/templ/cmd/templ/testproject")
		if err != nil {
			t.Fatalf("failed to create test project: %v", err)
		}
		defer os.RemoveAll(dir)

		// Delete the templates_templ.go file to ensure it is generated.
		err = os.Remove(path.Join(dir, "templates_templ.go"))
		if err != nil {
			t.Fatalf("failed to remove templates_templ.go: %v", err)
		}

		// Run the generate command.
		err = Run(context.Background(), log, Arguments{
			FileName: path.Join(dir, "templates.templ"),
		})
		if err != nil {
			t.Fatalf("failed to run generate command: %v", err)
		}

		// Check the templates_templ.go file was created.
		_, err = os.Stat(path.Join(dir, "templates_templ.go"))
		if err != nil {
			t.Fatalf("templates_templ.go was not created: %v", err)
		}
	})
}

I also added another example test in the format command as a reference.
We need to support:

Input file, output file (that's what the test above demonstrates)
Input stdin, output file (not currently supported)
Input file, output stdout (not currently supported)
Input dir, output dir (defaults to same directory) - currently hard coded to same as input dir, without a specific unit test

The CLI design you did is good, adding the additional -o and -stdout flags to support output file/dir, and whether to use stdout is good.
This change makes another issue though. The templ lsp command would also need a output dir param, and the filenames remapped within the LSP in the same way as the templ generate command or the LSP wouldn't work for people that use the output flag to set an output directory.
I was reluctant to do something with this because it adds a number of combinations of behaviour which need to be tested, and may cause negative interactions with each other. Basically, worried that it would produce a lot of support work for what I think is potentially a very niche use case. I suspect it's <1% of Go users?
But... if you and @rowan-gud (author of #198) are up for working together on getting the support together for this, complete with tests, I'm willing to integrate the changes.

Challenge accepted. :grin: (just let me know if you want in, @rowan-gud!)
Agree on the testing concerns. Thanks for highlighting the LSP angle, which I was unaware of, and for the test. I also totally get you on complexity. I'm hoping that we can isolate the generation mechanism from the input/output file selection, maybe not just on the code but also on the tests. I recall seeing some potential opportunities for refactoring, but I won't know for sure until I try. To be honest with you, I had opened GitHub this morning to close the MR since I have my end sorted out in other ways, but this is a great development and I'm happy to delve deeper into the problem if you're willing to review the proposals. And on that front, I'm very much a CI/CD kind of guy and would prefer doing these changes incrementally rather than try to deliver a huge feature at once. Would you be happy with that?
It's true that we don't know the adoption rate of Bazel, Make or other build tools in Go because they aren't part of the Go Developer Survey, but most commercial projects that I have worked on use one of the first two in some capacity. After a while, you often need to generate code, data and/or derived artefacts (container images, gRPC or OpenAPI specs/clients/servers, etc.), and that's where only using the Go toolchain ends. My hunch (and experience) is that they are very rarely used in libraries, infrequently used in opensource applications, and frequently used on startups and enterprises (e.g., Google, Uber, etc.). Features such as logging to stderr, or supporting flexible input/output redirection will improve the experience for all build tools, not just Bazel, which I believe will be good for Templ.
Thanks again for your time!

Closing this PR to avoid littering. I'll probably open a new one once I can afford the time. :)


Unbreak master and more

Fixes two fatal bugs in https://github.com/stripe/timberlake/pull/67 relating to destructuring global vars: const {_} = window._; should have been const {_} = window; and likewise for s/_/d3/.


[Qualification]: Support confirmation for CSI-2.12.0 on MKE 3.6.13 - VISA

Operating System
Ubuntu 20.04.6 LTS
Container Orchestrator
MKE - 3.6.13
Storage Platform
PowerFlex
Protocol
iSCSI
Relevant log output
[2024-12-03 05:49:13]  INFO Starting cert-csi; ver. 1.5.0
[2024-12-03 05:49:13]  INFO Suites to run with vxflexos storage class:
[2024-12-03 05:49:13]  INFO 1. VolumeIoSuite {volumes: 2, volumeSize: 8Gi chains: 2-2}
[2024-12-03 05:49:13]  INFO 2. ScalingSuite {replicas: 2, volumes: 5, volumeSize: 8Gi}
[2024-12-03 05:49:13]  INFO 3. CloneVolumeSuite {pods: 2, volumes: 1, volumeSize: 8Gi}
[2024-12-03 05:49:13]  INFO 4. SnapSuite {snapshots: 3, volumeSize; 8Gi}
[2024-12-03 05:49:13]  INFO 5. ReplicationSuite {pods: 2, volumes: 5, volumeSize: 8Gi}
Does it look OK? (Y)es/(n)o
-> y
[2024-12-03 05:49:14]  INFO Using EVENT observer type
[2024-12-03 05:49:14]  INFO Using config from /home/jaikrish/oce-np-cert-01/kube.yml
[2024-12-03 05:49:14]  INFO Successfully loaded config. Host: https://api-oce-np-cert-01.trusted.visa.com:6443
[2024-12-03 05:49:14]  INFO Created new KubeClient
[2024-12-03 05:49:14]  INFO Running 1 iteration(s)
[2024-12-03 05:49:14]  INFO 	*** ITERATION NUMBER 1 ***
[2024-12-03 05:49:14]  INFO Starting VolumeIoSuite with vxflexos storage class
[2024-12-03 05:49:14]  INFO Starting ReplicationSuite with vxflexos storage class
[2024-12-03 05:49:14]  INFO Starting ScalingSuite with vxflexos storage class
[2024-12-03 05:49:14]  INFO Starting CloneVolumeSuite with vxflexos storage class
[2024-12-03 05:49:14]  INFO Starting SnapSuite with vxflexos storage class
[2024-12-03 05:49:14]  INFO Successfully created namespace clonevolume-suite-9d20b5a2
[2024-12-03 05:49:14]  INFO Creating 2 pods, each with 1 volumes
[2024-12-03 05:49:14]  INFO Successfully created namespace volumeio-test-279bed06
[2024-12-03 05:49:14]  INFO Successfully created namespace replication-suite-6c4a7448
[2024-12-03 05:49:14]  INFO Successfully created namespace scale-test-868c7605
[2024-12-03 05:49:14]  INFO Successfully created namespace snap-test-38c76ca5
[2024-12-03 05:49:14]  INFO Creating IO pod
[2024-12-03 05:49:14]  INFO Creating Snapshot pod
[2024-12-03 05:49:14]  INFO Created stateful set sts-scale-testdb7ps
[2024-12-03 05:49:14]  INFO Waiting for sts pods to become ready
[2024-12-03 05:49:15]  INFO Creating 2 pods, each with 5 volumes
I1203 05:49:16.009093 2569857 request.go:697] Waited for 1.062927972s due to client-side throttling, not priority and fairness, request: POST:https://api-oce-np-cert-01.trusted.visa.com:6443/api/v1/namespaces/snap-test-38c76ca5/persistentvolumeclaims
[2024-12-03 05:49:18]  INFO Waiting for all pods in clonevolume-suite-9d20b5a2 to be READY
[2024-12-03 05:49:20]  INFO Waiting for pod iowriter-test-2pqk5 to be READY
[2024-12-03 05:49:20]  INFO Waiting for pod iowriter-test-f9vpz to be READY
I1203 05:49:26.009304 2569857 request.go:697] Waited for 1.58688766s due to client-side throttling, not priority and fairness, request: GET:https://api-oce-np-cert-01.trusted.visa.com:6443/api/v1/namespaces/clonevolume-suite-9d20b5a2/pods
[2024-12-03 05:49:26]  INFO Waiting for all pods in replication-suite-6c4a7448 to be READY
[2024-12-03 05:49:27]  INFO Waiting for pod iowriter-test-mb7wf to be READY
I1203 05:49:36.209125 2569857 request.go:697] Waited for 1.308767743s due to client-side throttling, not priority and fairness, request: GET:https://api-oce-np-cert-01.trusted.visa.com:6443/api/v1/namespaces/clonevolume-suite-9d20b5a2/pods
[2024-12-03 05:49:37]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2024-12-03 05:49:37]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2024-12-03 05:49:39]  INFO Scaling to 2 replicas
[2024-12-03 05:49:39]  INFO Waiting for sts pods to become ready
[2024-12-03 05:49:39]  INFO Executing command: [dd if=/dev/urandom of=/data0/writer-0.data bs=1M count=128 oflag=sync]
[2024-12-03 05:49:39]  INFO All pods are ready in 21.761812313s
[2024-12-03 05:49:39]  INFO Creating new pods with cloned volumes mounted on them
[2024-12-03 05:49:40]  INFO Waiting until no Volume Attachments with PV oce-np-cert-01-k8s-20d5f878be left
[2024-12-03 05:49:41]  INFO Writer pod: iowriter-test-f9vpz
[2024-12-03 05:49:41]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2024-12-03 05:49:44]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2024-12-03 05:49:44]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2024-12-03 05:49:44]  INFO Waiting for all pods in clonevolume-suite-9d20b5a2 to be READY
[2024-12-03 05:49:45]  INFO All pods are ready in 18.740271562s
[2024-12-03 05:49:45]  INFO Creating a snapshot on each of the volumes
I1203 05:49:46.409189 2569857 request.go:697] Waited for 1.10538655s due to client-side throttling, not priority and fairness, request: DELETE:https://api-oce-np-cert-01.trusted.visa.com:6443/api/v1/namespaces/volumeio-test-279bed06/pods/iowriter-test-mb7wf
[2024-12-03 05:49:48]  INFO Scaling to 0 replicas
[2024-12-03 05:49:48]  INFO Waiting for sts pods to become ready
[2024-12-03 05:49:48]  INFO Creating 3 snapshots
[2024-12-03 05:49:48]  INFO Waiting for Snapshot 'snap' to be READY
[2024-12-03 05:49:48]  INFO VolumeAttachment deleted
[2024-12-03 05:49:49]  INFO Waiting for pod iowriter-test-tls2s to be READY
[2024-12-03 05:49:50]  INFO Waiting until no Volume Attachments with PV oce-np-cert-01-k8s-97fc13af2d left
[2024-12-03 05:49:52]  INFO Deleting all resources in namespace scale-test-868c7605
[2024-12-03 05:49:54]  INFO Waiting for Snapshot 'snap1' to be READY
[2024-12-03 05:49:55]  INFO Waiting for the snapshots in replication-suite-6c4a7448 to be READY
[2024-12-03 05:49:56]  INFO VolumeAttachment deleted
[2024-12-03 05:49:56]  INFO All pods are ready in 11.557229531s
[2024-12-03 05:49:56]  INFO Deleting all resources in namespace clonevolume-suite-9d20b5a2
[2024-12-03 05:49:57]  INFO Waiting for pod iowriter-test-nrzn6 to be READY
[2024-12-03 05:49:57]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-0.sha512]
[2024-12-03 05:49:58]  INFO Hashes match
[2024-12-03 05:49:58]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2024-12-03 05:49:58]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2024-12-03 05:50:01]  INFO Waiting until no Volume Attachments with PV oce-np-cert-01-k8s-20d5f878be left
[2024-12-03 05:50:06]  INFO Namespace scale-test-868c7605 was deleted in 14.02353785s
[2024-12-03 05:50:06]  INFO Waiting for Snapshot 'snap2' to be READY
[2024-12-03 05:50:07]  INFO Creating new pods with replicated volumes mounted on them
[2024-12-03 05:50:07]  INFO VolumeAttachment deleted
[2024-12-03 05:50:08]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-1.sha512]
[2024-12-03 05:50:08]  INFO Restoring from snap1
[2024-12-03 05:50:08]  INFO Creating pvc snap1-restore
[2024-12-03 05:50:08]  INFO Hashes match
[2024-12-03 05:50:08]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2024-12-03 05:50:08]  INFO Waiting for all pods in replication-suite-6c4a7448 to be READY
[2024-12-03 05:50:09]  INFO Namespace clonevolume-suite-9d20b5a2 was deleted in 12.815491411s
[2024-12-03 05:50:09]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2024-12-03 05:50:09]  INFO SUCCESS: CloneVolumeSuite in 55.100196486s
[2024-12-03 05:50:10]  INFO SUCCESS: ScalingSuite in 55.56296562s
[2024-12-03 05:50:11]  INFO Waiting for pod snap1-restore-pod to be READY
[2024-12-03 05:50:12]  INFO Waiting until no Volume Attachments with PV oce-np-cert-01-k8s-97fc13af2d left
[2024-12-03 05:50:16]  INFO VolumeAttachment deleted
[2024-12-03 05:50:16]  INFO Deleting all resources in namespace volumeio-test-279bed06
[2024-12-03 05:50:17]  INFO All pods are ready in 8.570423409s
[2024-12-03 05:50:17]  INFO The replication group name from pvc is
[2024-12-03 05:50:17]  INFO Deleting all resources in namespace replication-suite-6c4a7448
[2024-12-03 05:50:17]  INFO Checker pod: snap1-restore-pod
[2024-12-03 05:50:17]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-0.sha512]
[2024-12-03 05:50:18]  INFO Hashes match
[2024-12-03 05:50:18]  INFO Deleting all resources in namespace snap-test-38c76ca5
[2024-12-03 05:50:28]  INFO Namespace volumeio-test-279bed06 was deleted in 12.050228519s
[2024-12-03 05:50:30]  INFO SUCCESS: VolumeIoSuite in 1m15.513602673s
[2024-12-03 05:50:35]  INFO Namespace replication-suite-6c4a7448 was deleted in 18.051216955s
[2024-12-03 05:50:35]  INFO Deletion callback function is not empty, calling it
[2024-12-03 05:50:35]  INFO Deleting local RG
[2024-12-03 05:50:36]  WARN error when deleting local RG: no matches for kind "DellCSIReplicationGroup" in version "replication.storage.dell.com/v1"
[2024-12-03 05:50:36]  INFO Sleeping for 1 minute...
[2024-12-03 05:50:36]  INFO Namespace snap-test-38c76ca5 was deleted in 18.05733693s
[2024-12-03 05:50:37]  INFO SUCCESS: SnapSuite in 1m22.419999795s
[2024-12-03 05:51:37]  INFO SUCCESS: ReplicationSuite in 2m22.833735552s
[2024-12-03 05:51:37]  INFO Started generating reports...
Collecting metrics
5 / 5 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s
[2024-12-03 05:51:37]  INFO Started generating reports...
Collecting metrics
5 / 5 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s
Generating plots
5 / 5 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 8 p/s
[2024-12-03 05:51:38]  WARN No ResourceUsageMetrics provided
[2024-12-03 05:51:38] ERROR no ResourceUsageMetrics provided
report-test-run-83aef872:
Name: test-run-83aef872
Host: https://api-oce-np-cert-01.trusted.visa.com:6443
StorageClass: vxflexos
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-83aef872/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-83aef872/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-83aef872/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-83aef872/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-83aef872/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
            Started:   2024-12-03 05:49:14.806753843 +0000 UTC
            Ended:     2024-12-03 05:50:30.319902914 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
		    PVCBind:
			Avg: 2.000800342s
			Min: 1.29830558s
			Max: 2.703295105s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCBind.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCBind_boxplot.png
		    PVCCreation:
			Avg: 19.755959016s
			Min: 19.657737693s
			Max: 19.854180339s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCCreation_boxplot.png
		    PVCDeletion:
			Avg: 11.425806ms
			Min: 8.687652ms
			Max: 14.16396ms
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCDeletion_boxplot.png
		    PVCUnattachment:
			Avg: 20.619800574s
			Min: 20.478788558s
			Max: 20.76081259s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCUnattachment.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PVCUnattachment_boxplot.png
		    PodCreation:
			Avg: 11.941495487s
			Min: 7.120347611s
			Max: 15.808765097s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PodCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PodCreation_boxplot.png
		    PodDeletion:
			Avg: 1.5678156s
			Min: 1.412648311s
			Max: 1.750955609s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PodDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/PodDeletion_boxplot.png
			EntityNumberOverTime:
	/root/.cert-csi/reports/test-run-83aef872/VolumeIoSuite21/EntityNumberOverTime.png
--------------------------------------------------------------
2. TestCase: ReplicationSuite
            Started:   2024-12-03 05:49:14.806719996 +0000 UTC
            Ended:     2024-12-03 05:51:37.642007337 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
		    PVCAttachment:
			Avg: 8.75973025s
			Min: 1.344427871s
			Max: 18.373290739s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCAttachment.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCAttachment_boxplot.png
		    PVCBind:
			Avg: 1.91898717s
			Min: 788.935378ms
			Max: 2.697702247s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCBind.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCBind_boxplot.png
		    PVCCreation:
			Avg: 12.477884257s
			Min: 3.216517224s
			Max: 22.655316681s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCCreation_boxplot.png
		    PVCDeletion:
			Avg: 942.337583ms
			Min: 569.695748ms
			Max: 1.642312975s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCDeletion_boxplot.png
		    PVCUnattachment:
			Avg: 4.092402894s
			Min: 102.204159ms
			Max: 10.085707259s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCUnattachment.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PVCUnattachment_boxplot.png
		    PodCreation:
			Avg: 14.5993478s
			Min: 7.728004295s
			Max: 23.209401895s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PodCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PodCreation_boxplot.png
		    PodDeletion:
			Avg: 1.470706178s
			Min: 1.100994909s
			Max: 2.174217115s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PodDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/PodDeletion_boxplot.png
			EntityNumberOverTime:
	/root/.cert-csi/reports/test-run-83aef872/ReplicationSuite22/EntityNumberOverTime.png
--------------------------------------------------------------
3.   TestCase: SnapSuite
            Started:   2024-12-03 05:49:14.806758473 +0000 UTC
            Ended:     2024-12-03 05:50:37.231270134 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
		    PVCAttachment:
			Avg: 7.490974011s
			Min: 200.163062ms
			Max: 14.781784961s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCAttachment.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCAttachment_boxplot.png
		    PVCBind:
			Avg: 2.185478663s
			Min: 1.467037325s
			Max: 2.903920002s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCBind.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCBind_boxplot.png
		    PVCCreation:
			Avg: 11.162204564s
			Min: 2.869009668s
			Max: 19.455399461s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCCreation_boxplot.png
		    PVCDeletion:
			Avg: 844.964892ms
			Min: 8.007967ms
			Max: 1.681921818s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCDeletion_boxplot.png
		    PVCUnattachment:
			Avg: 5.217090698s
			Min: 1.920974661s
			Max: 8.513206736s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCUnattachment.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PVCUnattachment_boxplot.png
		    PodCreation:
			Avg: 11.297402173s
			Min: 4.90619606s
			Max: 17.688608287s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PodCreation.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PodCreation_boxplot.png
		    PodDeletion:
			Avg: 1.625439197s
			Min: 1.136013618s
			Max: 2.114864776s
			Histogram:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PodDeletion.png
			BoxPlot:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/PodDeletion_boxplot.png
			EntityNumberOverTime:
	/root/.cert-csi/reports/test-run-83aef872/SnapSuite25/EntityNumberOverTime.png

[2024-12-03 05:51:38]  INFO Avg time of a run:	 53.14s
[2024-12-03 05:51:38]  INFO Avg time of a del:	 27.17s
[2024-12-03 05:51:38]  INFO Avg time of all:	 82.29s
[2024-12-03 05:51:38]  INFO During this run 100.0% of suites succeeded

Additional Details
Hi Dell Team,
We have tested Cert-CSI on MKE 3.6.13 after upgrade CSI-2.12.0 with below sidecar images. Test has completed with 100% suite passes.Could you please complete the qualification.
CSI sidecars
attacher: registry.k8s.io/sig-storage/csi-attacher:v4.7.0
provisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0
snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0
resizer: registry.k8s.io/sig-storage/csi-resizer:v1.12.0
registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0
healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.13.0

/sync

@jaikrish248 - What is the version of PowerStore Storage Platform used?

Hi @rajkumar-palani ,
Version of PowerFlex Storage Platform is 3.6.4000
NFS protocol is using

Sorry Didn't look at the protocol drop down option. Could you please check and update in community qualified configurations then we will proceed with upgrades.


Dont highlight tab/space errors in the BTHelp buffers

NACK. We should rather fix those errors than hide them.

Hmm, good point. I bet you have tabstospaces set to false and you are not using the detectindent plugin, right? Yeah, we should probably address this case. We can force hltaberrors to false for BTHelp, like you did, or alternatively we can force tabstospaces to true for BTHelp, so that if hltaberrors is enabled, it doesn't erroneously highlight leading spaces, but still highlights leading tabs. Basically, both ways seem ok to me.

Hmm, good point. I bet you have tabstospaces set to false and you are not using the detectindent plugin, right?

Yeah

Yeah, we should probably address this case. We can force hltaberrors to false for BTHelp, like you did, or alternatively we can force tabstospaces to true for BTHelp, so that if hltaberrors is enabled, it doesn't erroneously highlight leading spaces, but still highlights erroneous leading tabs. Basically, both ways seem ok to me.

As a usual user don't want to see any errors of the program which doesn't affect me in any way. I just want to read help pages. I read them because I am not advanced which means that I don't need to see any red thing anyway. Yeah it could help the developer to notice them but if they are noticed and fixed and I can't update?
I disabled errors and not used tabstospaces because end user doesn't need this info... Anyway is there spaces or tabs or there leading spaces? User doesn't care, don't make users to see something red to scare them. If we use tabstospaces it will be not so user friendly becuase in some sitaution user can see error (if developer had made a mistake) so I think my solution is better

Especially the options.md currently is a pain in the ***. I was already changing it within a different PR not really related to that and it was correctly rejected, but we need to fix this mess. It will trigger neurotics. :smile:
Wasn't there already a PR to address this?

Wasn't there already a PR to address this?

The tab/space errors PR was merged recently. Maybe there were PR's like #3190 but I don't think there were PR's about disabling the unmerged for that moment feature

Maybe there were PR's like #3190 but I don't think there were PR's about disabling the unmerged for that moment feature

I'm fully lost and duplicated (while extending) your #3190. I need to bring my childs to bed first, then I'm more relaxed. :smile:

For the record, the user is free not to enable hltaberrors or hltrailingws. They are disabled by default.
(BTW hltrailingws is actually a tricky heuristic, so it may not be wanted by some users (e.g. if the user is working with code that uses tab indentation, yet for some reason the user wants to have tabstospaces enabled, and doesn't want to see those red colors as a result of that). But this behavior of hltaberrors is documented, and it is disabled by default, so I suppose it's ok: if the user enables hltaberrors, he knows what he is doing.)
Enforcing disabling hltaberrors for BTHelp makes sense, as I've already agreed. As for enforcing disabling hltrailingws, I don't see a necessity in it, once we clean up the existing whitespace errors in the help pages, and don't merge PRs introducing new errors. But if you insist on disabling hltrailingws as well, fine.

Ok... I see two options:

Force disable trailing spaces
Force enable trailing spaces (because if we just omit forcing it someone will have it and someone will not have it...)

One more thing. When someone edits original file. The settings of BTHelp buffers aren't applied so the maintainers will need to catch the mistakes so it doesn't really matter much...

No need to endlessly discuss such trivia, I think. Merged. :)


If a tester throws an exception, print it and quit

The previous behavior was to kill the busywait in the thread,
instead of just dying.
Note that a Tester should never throw an exception, it should
set_fail. This is only for help in debugging Testers.

Pull Request Description
What issue does this change request address?
closes #1275
What are the significant changes in functionality due to this change request?
Makes it simpler to debug testers that throw exceptions.

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[x] 1. Review all computer code.
[x] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[x] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[x] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[x] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[x] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[x] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[x] 8. If an analytic test is changed/added is the the analytic documentation updated/added?
[x] 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

Job Mingw Test on d9d554a : invalidated by @alfoa

Checklist passed...
Merging when tests pass.

Job Mingw Test on d9d554a : invalidated by @joshua-cogliati-inl
tests\framework\PostProcessors\BasicStatistics\general failed, seeing if repeatable.

Tests have passed. (but tests\framework\PostProcessors\BasicStatistics\general does seem to randomly fail, but not because of this merge.)


Proxy Authentication Support In RTMClient

It would be great if RTMClient supported proxy authentication. This is useful in our corporate environment that that has access controls around outgoing traffic and requires services to authenticate.
We're currently working around this by crafting a proxy url in the shape of "http://user:password@host" and creating a replacement for RTMClient that sets the right client properties on the underlying glassfish client:
Option(slack.getConfig.getProxyUrl)
  .map(URI.create)
  .foreach { proxyUri =>
    val auth = Base64.getEncoder.encodeToString(proxyUri.getUserInfo.getBytes("UTF-8"))
    val proxyHeaders = Map("Proxy-Authorization" -> s"Basic $auth")

    client.getProperties.put(ClientProperties.PROXY_URI, proxyUri.toString)
    client.getProperties.put(ClientProperties.PROXY_HEADERS, proxyHeaders.asJava)
  }

It would be great to get some flavor of proxy-auth support into the mainline slack-api-client. I'm happy to post a PR for the above approach if this looks good to the project maintainers.
Category (place an x in each of the [ ])

[ ] bolt (Bolt for Java)
[ ] bolt-{sub modules} (Bolt for Java - optional modules)
[x] slack-api-client (Slack API Clients)
[ ] slack-api-model (Slack API Data Models)
[ ] slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
[ ] slack-app-backend (The primitive layer of Bolt for Java)

Requirements
Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to the those rules.

@jbellenger Hello, thanks for the suggestion (and I personally love Scala code snippets)! I am happy to improve the RTMClient to be easier for your use case.
We have some unit tests for proxy support. https://github.com/slackapi/java-slack-sdk/blob/v1.2.1/slack-api-client/src/test/java/test_with_remote_apis/ProxyTest.java
Would you mind helping us write a specific unit test for this change?

It looks like this was fixed in the last update! Thanks @seratch !

Glad to hear that! Let me close this issue now.


Fix Craft extension to support Setapp version

Description
Fixes issue #4241
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Are you still around @0x77dev

Hey @pernielsentikaer @thomaspaulmann,
I pushed an update with application selector preference and updated views accordingly.


Overflow bug when running tf.keras.layers.ZeroPadding3D

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
2.13.0
Custom code
Yes
OS platform and distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
Due to the large integer value
Standalone code to reproduce the issue
import tensorflow as tf
import os
import numpy as np
try:
  padding =<PHONE_NUMBER>
  arg_class = tf.keras.layers.ZeroPadding3D(padding=padding,)
  arg_input_0_tensor = tf.random.uniform([1, 1, 2, 2, 3], dtype=tf.float32)
  arg_input_0 = tf.identity(arg_input_0_tensor)
  arg_input = [arg_input_0,]
  out = arg_class(*arg_input)
except Exception as e:
  print("Error:"+str(e))

### Relevant log output

```shell
Error:Exception encountered when calling layer 'zero_padding3d' (type ZeroPadding3D).

{{function_node __wrapped__Pad_device_/job:localhost/replica:0/task:0/device:GPU:0}} Encountered overflow when multiplying<PHONE_NUMBER> with<PHONE_NUMBER>, result: -8070450522584252414 [Op:Pad]

Call arguments received by layer 'zero_padding3d' (type ZeroPadding3D):
  • inputs=tf.Tensor(shape=(1, 1, 2, 2, 3), dtype=float32)
{}

Not an issue, that's an error that is being returned to the user instead of performing bad computations.
Please consult again the SECURITY.md guide, please don't spam with low quality issues.


More theme issues

Similar to https://github.com/oleeskild/obsidian-digital-garden/issues/97
THEME=https://raw.githubusercontent.com/bennyxguo/Obsidian-Obsidianite/HEAD/theme.css
BASE_THEME=dark
SITE_NAME_HEADER=1AR's stuff
dgHomeLink=true
dgPassFrontmatter=false
dgShowBacklinks=true
dgShowLocalGraph=true
dgShowInlineTitle=true
dgShowFileTree=true
dgEnableSearch=true

It chooses the wrong URL for the theme and builds fail,
The correct url for this theme is,
https://raw.githubusercontent.com/bennyxguo/Obsidian-Obsidianite/main/obsidian.css
Seems it is choosing both the wrong branch (HEAD) and also the wrong css file name :-)

Thanks for reporting this issue!
Using HEAD as branch is a trick to automatically use whatever the repo has set as their default branch. This way I won't have to implement any logic in deciding wether to use the main og master branch, as these often differ between the various themes.
But the filename is indeed wrong. When obsidian released version 1.0, they also released a theme migration guide. The way I read it was that any themes that are not marked as "legacy" will have a "theme.css" file instead of the old "obsidian.css". This is apparently not the case with all themes, as Obsidianite is not marked as legacy, yet it uses the old "obsidian.css" filename.
I've done some changes in the site template, so that it will detect if the css file is non-existent and then switch it with either theme.css og obsidian.css depending on what it first was set to.
Note that this is a change in the template, not the plugin, so you will need to update the template. Let me know if the update fixes it for you!


T8423 Flood Light Cam 2 Pro not working

Describe the bug
Live Streaming is not working for Flood Light Cam 2 pro.
To Reproduce
Steps to reproduce the behavior:
Follow the steps to install and add a Floodlight cam 2 pro as a camera. RTSP works like a camera, when you enable and disable it, you can view it in WebRTC, however, when you click on the camera, it doesn't stream or turn on for Flood Light Cam 2 pro.
Expected behavior
A clear and concise description of what you expected to happen. The other python eufy-security libraries are also failing while requesting the  RTSP stream. For e.g.  see the logs below from the python Eufy Security library

Camera Name: %s Front Door
Serial Number: %s XXXXX
Station Serial Number: %s XXXXXX
Last Camera Image URL: %s https://zhixin-security-pr.s3.us-west-2.amazonaws.com/thumb/2021/12/01/station/
Starting RTSP Stream
Stream URL: %s rtmp://p2p-vir-6.eufylife.com/hls/
Camera Name: %s Garage
Serial Number: %s T8423NXXXXXX
Station Serial Number: %s T8423XXXXXXXX
Last Camera Image URL: %s https://zhixin-security-pr.s3.us-west-2.amazonaws.com/thumb/2021/12/01/station/
Starting RTSP Stream
Unexpected error
I think the support for this has to be added and I am not sure which protocol it's using. Let me know if I can pull that information somehow to provide here.
Screenshots & Logfiles
Erro message:
Logger: homeassistant
Source: custom_components/eufy_security/alarm_control_panel.py:136
Integration: Eufy Security (documentation, issues)
First occurred: 10:33:10 PM (1 occurrences)
Last logged: 10:33:10 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/eufy_security/init.py", line 56, in update
coordinator.async_set_updated_data(coordinator.data)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 287, in async_set_updated_data
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 486, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 492, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/eufy_security/alarm_control_panel.py", line 136, in state
return CODES_TO_STATES[current_mode]
KeyError: -1
**Hardware Information about Home Assistant
**Hardware Information about Cameras

Camera Model : T8423
Live Streaming Protocol: RTSP or P2p : Don't know

Additional context
Add any other context about the problem here.

please engage with this repository to add support for your model. it is not supported as of now;
https://github.com/bropat/eufy-security-client#known-working-devices
Please let me know when it is done, until then, I am not able to help

I can open a new ticket if needed. It seems like it's failing for all the
Eufy Cameras that I have.
See the log below for the T814.
Logger: homeassistant
Source: custom_components/eufy_security/alarm_control_panel.py:136
Integration: Eufy Security (documentation
https://github.com/fuatakgun/eufy_security, issues
https://github.com/fuatakgun/eufy_security/issues)
First occurred: 6:13:31 PM (8 occurrences)
Last logged: 6:13:38 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/eufy_security/init.py", line 56, in update
coordinator.async_set_updated_data(coordinator.data)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py",
line 287, in async_set_updated_data
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py",
line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line
486, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line
519, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line
492, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/eufy_security/alarm_control_panel.py",
line 136, in state
return CODES_TO_STATES[current_mode]
KeyError: -1
Regards,
--
Omair Manzoor
@.***
"It is not the degrees you hold, but the mind you possess". -UmZ
On Thu, Dec 2, 2021 at 2:38 PM Fuat Akgün @.***> wrote:

please engage with this repository to add support for your model. it is
not supported as of now;
https://github.com/bropat/eufy-security-client#known-working-devices
Please let me know when it is done, until then, I am not able to help
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fuatakgun/eufy_security/issues/147#issuecomment-984942246,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD2HOUNAE5TY5QYREFGFOU3UO7DL7ANCNFSM5JGC2ESQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hi. The streaming issue with the Floodlight Pro 2 is now addressed in the upstream repository/project.
https://github.com/bropat/eufy-security-client/issues/75
Can this be integrated into the HA Eufy Security component as well?
Many thanks!

I think both the client and the web socket implementation have been updated with support - not 100% sure though. Are there any other pieces that are needed for the integration to be updated? Many thanks for your time and efforts.

after this vacation period, i will test it locally to be sure that everything is working for at least my setup (nothing broken :-) ) i will update the version and release it.


Parameters in documentation are not recognized

az network vnet-gateway create has a couple parameters in the documentation that are not recognized by the cli:

--aad-tenant
--aad-issuer
--aad-audience
--vpn-auth-type

azure-cli version 2.21.0

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

ID: 36e274d7-9619-d96b-4389-8de0883b98e6
Version Independent ID: 0c402156-30a9-6963-c8d1-64455536c541
Content: az network vnet-gateway
Content Source: latest/docs-ref-autogen/network/vnet-gateway.yml
Service: virtual-network
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

network

@supereddie There may be some time delay for docs. Now the docs have been updated : https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/network/vnet-gateway.yml


Send e-mail when a long geocoding it's finished

When a long geocoding process is finished, it'd be nice to receive an email with statistics of the results and so on.
This is related with #4019

To clarify you want to add more statistics to the import finish email? What kind of statistics?

There is no email at all, yesterday I had to run very long geocoding
processes and having to look on the screen to see if it was finished or not
(and it took hours) was a bit inconvenient.
Having statistics on the number of geocodings, success and fails and timing
would be just an enhancement, the mail is the main thing :)
On Wed, Jul 22, 2015 at 3:23 PM, Mario de Frutos<EMAIL_ADDRESS>wrote:

To clarify you want to add more statistics to the import finish email?
What kind of statistics?
—
Reply to this email directly or view it on GitHub
https://github.com/CartoDB/cartodb/issues/4604#issuecomment-123717876.

--
Jorge Sanz
Solutions Engineer
CartoDB · Map Your World's Data

There is a notification configured to send the email when the data import finish with all the next conditions:

The import time ellapsed was 300 seconds or more
It's not a sync table

If you don't received that email could be a bug in that part

On Wed, Jul 22, 2015 at 3:40 PM, Mario de Frutos<EMAIL_ADDRESS>wrote:

There is a notification configured to send the email when the data import
finish with all the next conditions:

The import time ellapsed was 300 seconds or more
It's not a sync table

If you don't received that email could be a bug in that part

Well we're not talking about imports here but about geocoding, they're
different processes.
Sorry I didn't realised that in your previous comment.

Ah! Ok you're absolutely right, I was talking about the importer. My bad


Unable to use Ref when _id type is not ObjectID

For my schema, I am using shortId to generate an id for user.
class User extends Typegoose {
   @prop({default: shortid.generate})
   _id!: string;
}

class Car extends Typegoose {
  @prop({ref: User})
  owner: Ref<User>
}

//  given we have a user with this id
const car = new CarModel({owner: 'abcdef'})

This worked well with mongoose, but when I try to Ref a prop to User I get validation error:
    ValidationError: owner: Cast to ObjectID failed for value "rJXP68_UX" at path "owner"

Is it possible to use refs with string types?

I'd like to know/suggest this too.
https://github.com/szokodiakos/typegoose/pull/149

ValidationError: owner: Cast to ObjectID failed for value "rJXP68_UX" at path "owner"

not an error from typegoose

Is it possible to use refs with string types?

should be possible

sorry, my previous comment was wrong, thanks to @mfulop you can now use types that are not ObjectID
@Ben305 this can be closed as "solved" - thanks to #369


ntp: virtual list for favorites

Asana Task/Github Issue: https://app.asana.com/0/1201141132935289/1208792034336660/f
Description

[x] only render the rows of favorites that are visible

this addresses a major pain-point from our native desktop browsers

[x] when expanded, defer rendering children until the main thread is free

this means users on the very slowest devices still get an instant feedback on click

Example
Part of this PR is optimizing the expand/collapse action of the favorites list. On slow devices this can cause over a second of input delay since the act of rendering a screen full of favorites can be an expensive main-thread-blocking operation.
To combat this problem, I separated the expand/collapse action from the rendering of the actual tiles, which had the following impact: 💪🏻
BEFORE (20x CPU slowdown)

AFTER (20x CPU slowdown)

TODO:

[x] add some perf metrics to explain the change

Testing Steps

https://deploy-preview-1269--content-scope-scripts.netlify.app/build/pages/new-tab/?favorites=100
Verify that the page works as expected with showing/hiding along with drag+drop

Checklist

Please tick all that apply:

[x] I have tested this change locally
[x] I have tested this change locally in all supported browsers
[ ] This change will be visible to users
[ ] I have added automated tests that cover this change
[ ] I have ensured the change is gated by config
[ ] This change was covered by a ship review
[ ] This change was covered by a tech design
[ ] Any dependent config has been merged

I have tested this on Windows ✅


Release 4.15.0

Questions
Answers

Description?
Release 4.15.0

Fixed ticket?

How to test?
Please verify the module works as expected (this is a release PR)

@jolelievre I am sorry two files are in git conflict


don't promote by default for app engine deployment

promote adds 10-15 seconds of deployment time.
Deploying without promote displays the version specific url to hit, and this is adequate for a development workflow.

The delay is only for flex, right? But I guess you need to be consistent in the both environments.

No it's for standard as well.
On Thu, Dec 8, 2016 at 10:42 AM, Chanseok Oh<EMAIL_ADDRESS>wrote:

The delay is only for flex, right? But I guess you need to be consistent
in the both environments.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-intellij/issues/1159#issuecomment-265771543,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHf5HR1N2izBF_48V9JOBzlV8IAgg1HWks5rGCVIgaJpZM4LH8Rg
.


dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire  ;   Reason: no suitable image found. (Xcode 9)

I am getting this error when trying to run the application on a real device and not a simulator.
So far I have installed Alamofire using Cocoapods. I am not able to get why this doesn't work. As I read somewhere on SO, I put Alamofire in Link Binary with Libraries. However, it still doesn't work. What should I do to avoid this error?

I would remove any special linking you've done and make sure you're running the latest versions of Xcode 9.4 and CocoaPods and then reinstall your dependencies.
Other than that, you may have better luck on Stack Overflow.
Cheers. 🍻

From our Contribution Guidelines
Asking Questions
We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.


TypeError: t_r307 is not a function

I tryed today to switch from l10n to transloco and i started with very basic stuff. I ng add the package, selected the http loader and json format.
Then i copied this from the docu:
<ng-container *transloco="let t">
	<h1>{{ t('hello') }}</h1>
</ng-container>

and i am wondering why i get this error:
ERROR TypeError: t_r307 is not a function
    at MenuComponent_ng_container_0_Template (template.html:6)
    at executeTemplate (core.js:11841)
    at refreshView (core.js:11688)
    at refreshDynamicEmbeddedViews (core.js:13053)
    at refreshView (core.js:11711)
    at refreshComponent (core.js:13128)
    at refreshChildComponents (core.js:11419)
    at refreshView (core.js:11740)
    at refreshComponent (core.js:13128)
    at refreshChildComponents (core.js:11419)

The first entry in console is 🍻 Translation Load Success: en so i think that everything is well configured.
(I dont add any service or something else to the ts file. But if i understand the documentation correct, i dont need any else then to load the directive in the html file)
Before i start trying this package, i ng update the whole project from angular 8 to 9. But everything was working before i start changing translation stuff. So i think the update was working correct.

@SvenBudak What's your Transloco version?

i used ng add @ngneat/transloco so i expected that its latest 2.13.2 ... but its 1.1.1 in my package.json... Sorry that i didnt checked this before i post. I didnt know that its possible that ng add install a old version :) But then this is maybe a thing that can be fixed.

@SvenBudak upgrade to the latest and see if you still have any issues and reopen 🙂

@SvenBudak for a cleaner start I would recommend you to revert what the ng-add changes install the new version and run then ng g @ngneat/transloco:init that should run the same procedure as ng-add

Thanks @itayod it worked with ng g @ngneat/transloco:init much better :) I am just wondering why configs are splitted in 2 files... Some are in transloco-root.module.ts and some others are in transolco.config.js.. Some stuff seems to be duplicate, like availableLangs: ['en', 'de'] and langs: ['en', 'de'].

I am wondering why i get exactly the same problem in a new project after 6 Months :)
The ng add command is not updated?
I use Angular 10.0.0 and @ngneat/transloco": "^1.1.1
It works only when i use the pipe like: {{ t('name', { name: 'Transloco' }) }}

@SvenBudak why not use the latest version? 🙂

i used ng add. i dont checked the version... ng add dont use the latest version?

@SvenBudak Should give you the latest... you can run ng add @ngneat/transloco@latest, maybe it's a cache thing.

Oh wow 😁
I didn't know there was a cache for ng add.
Thanks for your quick answer!
I will bookmark this issue for future projects 😂

Hi, I had the same @SvenBudak problem:

I use Angular 10.0.0 and @ngneat/transloco": "^1.1.1

I found also weird questions during the config/installation process. I used an old version of transloco on my device, but it was the 2.13.2.
Maybe some problem with the last version of angular?
Thanks in advance.

@timhecker Please update to the latest version of transloco and try

@timhecker Please update to the latest version of transloco and try

Yep, I solved with ng add @ngneat/transloco@latest and now I see the 2.17.3 on package.json.  Thanks

I had similar problems. After running ng add @ngneat/transloco (like in the installation guide), my modules changed and some files were added, but transloco was not added to package.json.


[1pt] Create new development branch in t-route repo

Part of Agile Story #193

https://github.com/GregCocks-NOAA/t-route/tree/GJC_Development

https://github.com/GregCocks-NOAA/t-route/tree/GJC_Development


Boolean fields never checked

Hi
I have the exact same issue as https://github.com/justinfrench/formtastic/issues/443
Im on Ruby 1.8.7 Rails 3.1.1 and Formtastic 2.0.2
fields are :boolean in MySQL but are always shown unchecked.
Also formtastic does not seem to recognise the :boolean fields for a start - it renders them as StringInput if you dont specify the :as => :boolean
Thanks
Michael

I have tried to further debug this and it seems that the variable "object" is nil and so the checked? method always returns false.
But I cant figure out why the object variable is nil ??

@mibock if you override the checked? method to use builder.object instead of just object does it work?

No - same thing - builder.object is also nil.
I tried to overwrite the Initialize method also - there the object
parameter coming in is also nil (same with builder.object). Dont know
if that helps you.
On Tue, Nov 8, 2011 at 8:26 PM, Justin French
<EMAIL_ADDRESS>wrote:

@mibock if you override the checked? method to use builder.object instead of just object does it work?

Reply to this email directly or view it on GitHub:
https://github.com/justinfrench/formtastic/issues/737#issuecomment-2672239

--
Michael Bock
RapidiOnline
Tel: +33 468 206 200

@mibock can I see your form code?

For some reason this did not get in the other day, but here it is again:
= semantic_form_for :transfer, :url => service_transfer_path(@service,
@transfer), :html => {:method => :put, :autocomplete => "off"} do |f|
= f.inputs do
= f.input :code
= f.input :enabled
= f.input :performupdate, :as =>  :my_checkbox, :label => 'Update'
= f.buttons
both :enabled and :performupdate are boolean. Both are true/1 in the
database. enabled is shown as text field and the code for MyCheckbox
is here:
class MyCheckboxInput < Formtastic::Inputs::BooleanInput
def checked?
p builder.object
true
end
end

@mibock I've noticed you're using  semantic_form_for :transfer where :transfer is a symbol, rather than @transfer (an instance of a Transfer model) – we need an instance of a model that has some state persisted in it in order to check the checkbox, reflect on the database columns, etc. Any reason you're knot using @transfer and instantiating an instance of a Transfer?
Closing for now as I'm confident this is the issue, feel free to re-open.

Hi Justin
That was it !  A lot of trouble for a little detail.
I was experimenting with a presenter and mixing in some details from
it into the form - I guess that got me confused.
Thanks a lot for spotting this and helping out (and for all your work
on Formtastic - makes forms look a lot better !)
Michael
On Tue, Nov 15, 2011 at 7:37 AM, Justin French
<EMAIL_ADDRESS>wrote:

@mibock I've noticed you're using  semantic_form_for :transfer where :transfer is a symbol, rather than @transfer (an instance of a Transfer model) – we need an instance of a model that has some state persisted in it in order to check the checkbox, reflect on the database columns, etc. Any reason you're knot using @transfer and instantiating an instance of a Transfer?
Closing for now as I'm confident this is the issue, feel free to re-open.

Reply to this email directly or view it on GitHub:
https://github.com/justinfrench/formtastic/issues/737#issuecomment-2741512

--
Michael Bock
RapidiOnline
Tel: +33 468 206 200


fix(es/minifier): Produce same result as transform()

Description:
Related issue:

Closes https://github.com/swc-project/swc/issues/6990.

It's not reproducible anymore
https://github.com/swc-project/swc/issues/6990#issuecomment-1510673271


[BUG] PodSecurityPolicy in the policy/v1beta1 API deprecated in Kubernetes v1.25

Describe the bug
PodSecurityPolicy in the policy/v1beta1 API version is no longer served in v1.25, and the PodSecurityPolicy admission controller was removed. This causes the installation of Longhorn to fail.
error: resource mapping not found for name: "longhorn-psp" namespace: "" from "https://raw.githubusercontent.com/longhorn/longhorn/v1.3.1/deploy/longhorn.yaml": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
To Reproduce
Steps to reproduce the behavior:

Deploy new K3s v1.25.0+k3s1 cluster.
Complete prerequesites for cluster nodes (open-iscsi, nfs-common)
Attempt to install Longhorn via Helm or Kubectl.
See error

Expected behavior
Installation should proceed as normal.
Environment

Longhorn version: 1.3.1
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): Kubectl & Helm
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: K3s

Number of management node in the cluster: 3
Number of worker node in the cluster: 2

Node config

OS type and version: Ubuntu 22.04
CPU per node: 2
Memory per node: 4096
Disk type(e.g. SSD/NVMe): SSD
Network bandwidth between the nodes: 20Gbps

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): KVM
Number of Longhorn volumes in the cluster: 0

Hi @runbgp,
Thanks for your reporting
We are migrating the PodSecurityPolicy to support k8s v1.25 and after.
ref: https://github.com/longhorn/longhorn/issues/4003

#4003

Thank you! Apologies for the duplicate issue. Appreciate your efforts.


Implement Error function, pass scope parameter to IfError, validate error kind

There are many tests that are using the Error function, but it is not currently implemented. This change implements that function, and updates IfError to pass the error information to the handler lambdas. To test this we're also allowing the error kind to be passed in .txt test files in the #error directive (if present the test will validate that they match the kind of the error result).

            // Timeout!!!

For better "under the debugger support", we could add this here:
if (Debugger.IsAttached) retry

Refers to: src/tests/Microsoft.PowerFx.Core.Tests/ExpressionTestHelpers/BaseRunner.cs:58 in b6a36de. [](commit_id = b6a36debed331a67186ef90ea3e52ff14042ea98, deletion_comment = False)


Sample notebook - Article Summarization

The notebook example for summarization in: G. Article Summarization using co.generate does not return a coherent summary of the text in the prompt.. I'm getting random results, such as
𝗦𝗨𝗜𝗡𝗧𝗘 𝗢𝗟𝗨𝗥𝗠𝗘𝗡𝗧𝗜𝗖��
or
𝓐𝓲𝓿𝓵 𝓐𝓲𝓿𝓲𝓲𝓲𝓷𝓪 𝓐𝓲𝓲𝓷,
See screenshot:

Can you provide suggestions on how to improve the summarization example?

The problem is the trailing white space. We are updating the notebook.


email type is not proper

the Email type function is not properly validate email correctly we need more improvement. and accept mutliemail styles not only the Gmail style
this is current Email function:
export const Email = (input) => {
  const regex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/

  return regex.test(String(input))
};

 const Email = (input) => {   return /[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/.test(input); }
This change in the regexp might be helpful to validate/accept "mutliemail" styles.

 const Email = (input) => { return /[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/.test(input); } This change in the regexp might be helpful to validate/accept "mutliemail" styles.
the email structure `[email name]@[domain name]
the current email regex it's true, but the email name wants some changes:

add more symbols to accept them and it's : & + ~
email don't accept the emain names that start with symbols

^[\w.+~&\-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,6}
This will match in the beginning [email name] if there is
\w (alphanumeric or underscore character with the stated symbols &,+,~) followed by domain name.
I tested from here regex101
I hope this helps:)

thanks and the finally the create pull request


Account for NH critters with varying time availability by month

Two fish in New Horizons (Char + Cherry Salmon) have different time availability depending on the month:
Time: 4 PM - 9 AM
North months: Mar - Jun
South months: Sep - Dec
Time: All day
North months: Sep - Nov
South months: Mar - May
Our New Horizons critter endpoints need to updated to account for this, by providing time on a per-month basis by hemisphere. While all bugs and sea creatures have uniform time availability, it is probably a good idea to provide the same for consistency, as well as to protect against the possibility that Nintendo decides to change spawn times in the future (Nintendo changed spawn rates for bugs in 1.2.0, so while such a change is very unlikely it is not outside the realm of possibility).

Branch created with code change: https://github.com/Nookipedia/nookipedia-api/tree/critter-times-by-month
Need to give it a second look and then write up the documentation.
Example return object:
{
    "url": "https://nookipedia.com/wiki/Cherry_Salmon",
    "name": "Cherry Salmon",
    "number": "27",
    "image_url": "https://dodo.ac/np/images/d/db/Cherry_Salmon_NH_Icon.png",
    "catchphrase": "I caught a cherry salmon! It's the perfect topper for a marlin sundae!",
    "catchphrase2": "",
    "catchphrase3": "",
    "location": "River (clifftop)",
    "shadow_size": "Medium",
    "rarity": "",
    "total_catch": "0",
    "sell_nook": "1000",
    "sell_cj": "1500",
    "tank_width": "1",
    "tank_length": "1",
    "time": "4 PM – 9 AM",
    "time_n_months": "Mar – Jun",
    "time_s_months": "Sep – Dec",
    "time2": "All day",
    "time2_n_months": "Sep – Nov",
    "time2_s_months": "Mar – May",
    "n_availability": "Mar – Jun; Sep – Nov",
    "s_availability": "Mar – May; Sep – Dec",
    "n_times_by_month": {
        "1": "NA",
        "2": "NA",
        "3": "4 PM – 9 AM",
        "4": "4 PM – 9 AM",
        "5": "4 PM – 9 AM",
        "6": "4 PM – 9 AM",
        "7": "NA",
        "8": "NA",
        "9": "All day",
        "10": "All day",
        "11": "All day",
        "12": "NA"
    },
    "s_times_by_month": {
        "1": "NA",
        "2": "NA",
        "3": "All day",
        "4": "All day",
        "5": "All day",
        "6": "NA",
        "7": "NA",
        "8": "NA",
        "9": "4 PM – 9 AM",
        "10": "4 PM – 9 AM",
        "11": "4 PM – 9 AM",
        "12": "4 PM – 9 AM"
    },
    "n_availability_array": [
        "3",
        "4",
        "5",
        "6",
        "9",
        "10",
        "11"
    ],
    "s_availability_array": [
        "3",
        "4",
        "5",
        "9",
        "10",
        "11",
        "12"
    ]
}

Why not an array of times and months?
"time": ["4 PM – 9 AM", "All day"],
"time_n_months": ["Mar – Jun", "Sep – Nov"],
"time_s_months": ["Sep – Dec", "Mar – May"],

Why not an array of times and months?
"time": ["4 PM – 9 AM", "All day"],
"time_n_months": ["Mar – Jun", "Sep – Nov"],
"time_s_months": ["Sep – Dec", "Mar – May"],```

Sounds good, let's do it. I originally didn't do that since time is an existing field and changing it to an array may break it for current users, as well as for simplicity's sake since that's how the data is currently stored on the wiki, but it's a change worth making + we can version it.

Here's an updated structure, feedback is welcome. This change includes some field renames, as well as replacing catchphrase, catchphrase2, and catchphrase3 with a single catchphrases array.
Re. the time/time_n_months/time_s_months: I'm thinking that instead of having three arrays that the user would be mapping data between, we could have just two arrays that hold month/time objects, like so:
    "availability_north": [
        {
            "months": "Mar – Jun",
            "time": "4 PM – 9 AM"
        },
        {
            "months": "Sep – Nov",
            "time": "All day"
        }
    ],
    "availability_south": [
        {
            "months": "Sep – Dec",
            "time": "4 PM – 9 AM"
        },
        {
            "months": "Mar – May",
            "time": "All day"
        }
    ]

Full body example below. There is some repetitive data within here, but I think it's worth keeping to minimize disrupting existing users, as well as to better serve different use cases (e.g. a user wanting to just display the months a fish is available can easily pull from months_south_array instead of having to iterate through times_by_month_X to filter out NA values).
{
    "url": "https://nookipedia.com/wiki/Cherry_Salmon",
    "name": "Cherry Salmon",
    "number": "27",
    "image_url": "https://dodo.ac/np/images/d/db/Cherry_Salmon_NH_Icon.png",
    "location": "River (clifftop)",
    "shadow_size": "Medium",
    "rarity": "",
    "total_catch": "0",
    "sell_nook": "1000",
    "sell_cj": "1500",
    "tank_width": "1",
    "tank_length": "1",
    "catchphrases": [
        "I caught a cherry salmon! It's the perfect topper for a marlin sundae!"
    ],
    "availability_north": [
        {
            "months": "Mar – Jun",
            "time": "4 PM – 9 AM"
        },
        {
            "months": "Sep – Nov",
            "time": "All day"
        }
    ],
    "availability_south": [
        {
            "months": "Sep – Dec",
            "time": "4 PM – 9 AM"
        },
        {
            "months": "Mar – May",
            "time": "All day"
        }
    ],
    "times_by_month_north": {
        "1": "NA",
        "2": "NA",
        "3": "4 PM – 9 AM",
        "4": "4 PM – 9 AM",
        "5": "4 PM – 9 AM",
        "6": "4 PM – 9 AM",
        "7": "NA",
        "8": "NA",
        "9": "All day",
        "10": "All day",
        "11": "All day",
        "12": "NA"
    },
    "times_by_month_south": {
        "1": "NA",
        "2": "NA",
        "3": "All day",
        "4": "All day",
        "5": "All day",
        "6": "NA",
        "7": "NA",
        "8": "NA",
        "9": "4 PM – 9 AM",
        "10": "4 PM – 9 AM",
        "11": "4 PM – 9 AM",
        "12": "4 PM – 9 AM"
    },
    "months_north": "Mar – Jun; Sep – Nov",
    "months_south": "Mar – May; Sep – Dec",
    "months_north_array": [
        "3",
        "4",
        "5",
        "6",
        "9",
        "10",
        "11"
    ],
    "months_south_array": [
        "3",
        "4",
        "5",
        "9",
        "10",
        "11",
        "12"
    ]
}

Update: will also make the values inside the months_north_array/months_south_array ints.

Update: will also make the values inside the months_north_array/months_south_array ints.

Is all of the information stored as strings in the database?
And the availability_north and availability_south arrays will contain the text versions of the availability?

Is all of the information stored as strings in the database?

Nope, they're stored as various data types. The issue is that the MediaWiki API we use to fetch the data gets it all as strings, so we need to re-cast values if we want non-strings (which isn't a problem per say, just an additional step).

And the availability_north and availability_south arrays will contain the text versions of the availability?

Yep. Here is the most updated structure. I've also cast several fields that could be ints into ints:
{
        "url": "https://nookipedia.com/wiki/Anchovy_(fish)",
        "name": "Anchovy",
        "number": "56",
        "image_url": "https://dodo.ac/np/images/7/7f/Anchovy_%28Fish%29_NH_Icon.png",
        "location": "Sea",
        "shadow_size": "Small",
        "rarity": "",
        "total_catch": "0",
        "sell_nook": "200",
        "sell_cj": "300",
        "tank_width": "1",
        "tank_length": "1",
        "catchphrases": [
            "I caught an anchovy! Stay away from my pizza!"
        ],
        "availability_north": [
            {
                "months": "All year",
                "time": "4 AM – 9 PM"
            }
        ],
        "availability_south": [
            {
                "months": "All year",
                "time": "4 AM – 9 PM"
            }
        ],
        "times_by_month_north": {
            "1": "4 AM – 9 PM",
            "2": "4 AM – 9 PM",
            "3": "4 AM – 9 PM",
            "4": "4 AM – 9 PM",
            "5": "4 AM – 9 PM",
            "6": "4 AM – 9 PM",
            "7": "4 AM – 9 PM",
            "8": "4 AM – 9 PM",
            "9": "4 AM – 9 PM",
            "10": "4 AM – 9 PM",
            "11": "4 AM – 9 PM",
            "12": "4 AM – 9 PM"
        },
        "times_by_month_south": {
            "1": "4 AM – 9 PM",
            "2": "4 AM – 9 PM",
            "3": "4 AM – 9 PM",
            "4": "4 AM – 9 PM",
            "5": "4 AM – 9 PM",
            "6": "4 AM – 9 PM",
            "7": "4 AM – 9 PM",
            "8": "4 AM – 9 PM",
            "9": "4 AM – 9 PM",
            "10": "4 AM – 9 PM",
            "11": "4 AM – 9 PM",
            "12": "4 AM – 9 PM"
        },
        "months_north": "All year",
        "months_south": "All year",
        "months_north_array": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12
        ],
        "months_south_array": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12
        ]
    }


Typescript Watch - Cleaning Target Files on Source Deletion

Can we add a compiler option to also glob-delete a target file when the source file is removed? We run into this constantly and have to gulp clean frequently - it makes the usage of tsc -watch pointless as we have to constantly purge the output directory.

For tsc --watch we have a list of output files from the previous iteration, we just need to diff that with the current list, and delete the old outputs.

Is there a recommended way to work around this today? We have prepended rimraf lib/ to our build scripts, which removes the folder containing the compiled JS files.
But this is caused problems with sym-linked modules. The importing project's watch then gets broken with TS2307: Cannot find module, as it only seem to register the disappearance of the lib folder, but not the new one put in its place.

Can someone provide some pointers where I can help implement this? @mhegazy?

Things have gotten a bit more complicated with the addition of the Builder the and the WatchProgram (see https://github.com/Microsoft/TypeScript/pull/20234), there is not really a place to keep this information, since it is always partial, and we are not rebuilding the information after every change as we used to do.  I suppose we could investigate restarting the builder if a file was removed. but we will need a way to detect that in the first place..

If you're using jest, you can use ts-jest

My 'solution' is obviously not the full thing that is trying to be implemented right now, it's just some very basic behavior I need myself, But I think it might help some people that need something like this right now. So if it's alright, I will just leave a link here for now: https://www.npmjs.com/package/ts-cleaner

This functionality would also be helpful on a simple --clean, this is effecting us in CI or when switching between branches locally

ts-cleaner didn't work for me, so I wrote ts-purify. It works exactly the same way as ts-cleaner but uses fb-watchman (its only dependency) instead of chokidar. This makes it very small and very efficient at watching, but on the other hand, you'll need to install watchman to use it.

Hello!!
I solved this issue with watch, diff-file-tree and rimraf:
tsconfig.json
{
  "compileOnSave": false,
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "./.tmp",
    "preserveSymlinks": true,
    "sourceMap": true,
    "declaration": true,
    "module": "umd",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es6"
    ]
  },
  "include": [
    "./src/**/*.*"
  ]
}

package.json
{
  "name": "diff-tree",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "build": "tsc && npm run build:copy",
    "build:copy": "node -e \"const d = require('diff-file-tree');d.diff('./.tmp', './dist').then((ch)=>{d.applyRight('./.tmp', './dist', ch)});\" && rimraf ./.tmp",
    "watch": "watch \"npm run build\" ./src --interval 1 --wait 0.1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "diff-file-tree": "^2.3.2",
    "rimraf": "^3.0.0",
    "tsc": "^1.20150623.0",
    "typescript": "^3.6.4",
    "watch": "^1.0.2"
  }
}

For cleaning up of not actual compilation results I use this https://github.com/whitecolor/ts-clean-built

Any update on this one? It's still causing a headache...

Any update on this one? It's still causing a headache...

Still causing problems...

Any updates on this?

Also facing this problem, would be a very nice addition

Bump

Just wanted to add that none of the 3rd party library workarounds mentioned above take care of cleaning up the .tsbuildinfo file. It keeps info about the deleted source file. Probably not a huge deal, but could lead to bloat with large refactors.

For tsc --watch we have a list of output files from the previous iteration, we just need to diff that with the current list, and delete the old outputs.

I found this issue after a bit of searching since this is still a very common source of bugs and poses an unfortunate workflow problem with tsc --watch. In fact, my initial conclusion is that I should be rolling my own watch that invokes tsc -p on individual files that are changed.
My question here is, why would our approach be to maintain a list of files necessarily? The underlying FS watch should receive events on file deletion or move (typically a "rename" event). On rename, we simply check if a corresponding JS file exists in the outDir that matches the file that had moved or been deleted, and delete that JS file. This is a stateless operation and hopefully shouldn't be too hard to implement, but what am I missing? (this is the approach I am going to take when doing this in user space anyways).

This a daunting issue, especially if you refactor often, which you should!
And this, is the story about my pursuit to fixing it, the 2023 way! Of course with the help of AI, ChatGTP in particular. So keep reading...
So I googled the issue with "typescript tsc watch remove deleted files", which is how we used to trouble shoot always. Google responded with current issue first, which was frustratingly still open after 6 years (!).
I followed more links but none seemed like solving the problem inherently:

Reading the current issue, I found ts-clean-built to be the best solution & project around at this time. Before even giving it a spin, with only issue, it seemed it would save me hours of wasted effort ;-)
But don't we all have ChatGPT plugins right now, next to the google search? It's just a click away, or as a paid customer you get ALWAYS ChatGPT's answer. Which read as:
ChatGPT
When using tsc with the --watch flag, it will recompile the files every time there is a change in the project directory. However, by default, tsc doesn't remove files that have been deleted from the project directory. To remove the deleted files from the output directory, you can use the --removeComments flag.

Here's an example command that uses both --watch and --removeComments:

tsc --watch --removeComments
The --removeComments flag removes all comments from the output files and also removes any files that no longer exist in the source directory.

If you want to keep comments in the output files, you can use the --clean flag instead, which removes any files that no longer exist in the source directory without removing comments:

tsc --watch --clean
Note that if you are using a version of tsc older than 3.8, the --removeComments flag will not work as intended. Instead, you can use the --preserveWatchOutput flag, which will also remove deleted files:

tsc --watch --preserveWatchOutput
Keep in mind that this flag is only available in TypeScript version 3.8 and newer.

Wow! Is that true? Did Chat GPT overwhelmingly solved my ;issue with one --clean commmand, but googled failed to tell me?
So I immediately added the --clean flag to my scripts: npx tsc --watch --clean -p tsconfig.json. Of course it failed:
error TS5093: Compiler option '--clean' may only be used with '--build'.

ChatGPT let down No 1. For a start, --clean can be used only along side --build for some reason something ChatGPT could and maybe should have known! Not sure about the dates tho.

Why so stringent? Another try...
npx tsc --build --clean --watch -p tsconfig.json
Guess what! Two errors this time!
error TS5072: Unknown build option '-p'.

error TS6370: Options 'clean' and 'watch' cannot be combined.

Ok, I had enough! In any case, --build --clean are useless when watching, its doesnt "mirror" src/ to dist/ amd has a myriad of issues - see https://stackoverflow.com/questions/68144771/whats-the-difference-between-tsc-build-clean-vs-rm-rf-js
So I tried on last thing, although I was sure its doomed:
tsc --watch --removeComments
For which for which ChatGPT said: The --removeComments flag removes all comments from the output files and also removes any files that no longer exist in the source directory.
As one would expect, it doesn't, it is just to Disable emitting comments..
So ChatGPT lied and tried to fool me twice in one problem, as many as the solutions! Welcome to the Brave New World of lies, AI powered!
TypeScript team, please, please solve this issue! Till then I'm going for ts-clean-built!

To anyone looking for a solution, I've completely stopped using tsc --watch and instead relied on chokidar-cli for watching over my files and triggering the tsc build command.
{
  "name": "myproject",
  "scripts": {
    "watch": "chokidar \"src/*\" \"tsconfig.json\" -c \"npm run build\" --initial",
    "build": "rimraf dist && tsc"
  },
  "devDependencies": {
    "@types/node": "^20.11.17",
    "chokidar-cli": "^3.0.0",
    "rimraf": "^5.0.5",
    "typescript": "^5.3.3"
  }
}

I don't know if it is as efficient as tsc --watch command but at least it works.

For anyone have this problem like me, i have made a library to solve this, and many more, take a look. typemon


Does not work

I'm getting this error:
TypeError: undefined is not a function
at refresh (http://localhost:9000/assets/javascripts/app/directives.js:249:30)
at init (http://localhost:9000/assets/javascripts/app/directives.js:254:21)
at link (http://localhost:9000/assets/javascripts/app/directives.js:278:17)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6736:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6730:24)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)

and lines 249 thru 278 of your directive are these lines:
line 249=>        $($elem).slimScroll({ destroy: true });
$($elem).slimScroll(option);
};
var init = function () {
line 254=>          refresh();
if ($attr.slimscroll && !option.noWatch) {
off.push($scope.$watchCollection($attr.slimscroll, refresh));
}
if ($attr.slimscrollWatch) {
off.push($scope.$watchCollection($attr.slimscrollWatch, refresh));
}
if ($attr.slimscrolllistento) {
off.push($scope.$on($attr.slimscrolllistento, refresh));
}
};
var destructor = function () {
$($elem).slimScroll({ destroy: true });
off.forEach(function (unbind) {
unbind();
});
off = null;
};
off.push($scope.$on('$destroy', destructor));
line 278= >            init();
Is this the correct HTML syntax to call the directive:

{{ someTextHere || 'nuttin here' }}

If not can you please provide a sample syntax of calling the directive?
Thank you
Gary

You can use this directive:

Sorry, I did not copy the syntax I used correctly.
I used your syntax:

{{ somestuffhere || 'nuttin here' }}

and I'm still getting the error thrown:
TypeError: undefined is not a function
at refresh (http://localhost:9000/assets/javascripts/app/directives.js:249:30)
at init (http://localhost:9000/assets/javascripts/app/directives.js:254:21)
at link (http://localhost:9000/assets/javascripts/app/directives.js:278:17)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6736:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6730:24)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)

Got it working.    Needed to download and include the jquery.slimscroll.min.js file from github.com/rochal/jQuery-slimScroll.  Second:  The correct syntax to use is:  (single quotes required around the value).

i want to give my custom style for slim scroll i have used div class="scroll-body" slimscroll="{height: '250px'}"  but it is not working it is using its default height


🚀 Feature: Add handlebars/mustache templating based on the original issue/PR

Feature Request Checklist

[X] I have tried restarting my IDE and the issue persists.
[X] I have pulled the latest main branch of the repository.
[X] I have searched for related issues and found none that matched my issue.

Overview
I'd like to be able to set up a template that includes lines like Thanks for reporting, {{ reporter }}! -- where the {{ reporter }} is the name of the person who filed the issue. https://www.npmjs.com/package/mustache is a very good templating engine we could use to power this.
Additional Info
No response

I was thinking of this exact feature. I wasn't sure if Saved Replies had basic templating support natively or not, but it doesn't really matter since it can be solved "JIT" style e.g. at runtime with the extension. Any other templating {{ key }}s that would be worth supporting too?

Great question 😄. Putting a little more thought into it, maybe a starting set like...

author: probably a better name than reporter, so it'd be the same for PRs?
branch (PR only)
commits (PR only)
issue (for PRs, including linked issue - if it exists)
pr (PR only)
organization
repository

If we were working for GitHub & making this a "real" figure I'd want to put much more thought into this, and consider having nested objects like repository.full_url. But for the sake of simplicity & trying things out I think it'd be good to get just a limited set of things. If you want to just put the easiest from that list, and leave the remaining ones as good first issues.

We're chatting on a 1:1 and talking about how the GitHub REST API has basically all this info!

Issue: https://api.github.com/repos/JoshuaKGoldberg/refined-saved-replies/issues/45
PR: https://api.github.com/repos/JoshuaKGoldberg/refined-saved-replies/pulls/67


Merge strict dns and logical dns into single implementation

Title: Merge strict dns and logical dns into single implementation
Description:

from #36353, since logical dns and strict dns have pretty much the same options, it makes sense to merge them into a single implementation.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

/no-stalebotSent from my iPhoneOn Dec 14, 2024, at 11:01 AM, github-actions[bot] @.***> wrote:Re: [envoyproxy/envoy] Merge strict dns and logical dns into single implementation (Issue #37145)This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.—Reply to this email directly, view it on GitHub or unsubscribe.You are receiving this email because you authored the thread.Triage notifications on the go with GitHub Mobile for iOS or Android.


Fix spark_udf invocation to work with mlflow 1.0 api

Adapted to minor breaking change in mlflow api.
Closes #431, Resolves #426.

Codecov Report

Merging #477 into master will decrease coverage by 0.16%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
- Coverage   93.33%   93.17%   -0.17%
==========================================
  Files          29       29
  Lines        3780     3778       -2
==========================================
- Hits         3528     3520       -8
- Misses        252      258       +6

Impacted Files
Coverage Δ

databricks/koalas/mlflow.py
94.87% <100%> (-0.26%)
:arrow_down:

databricks/conftest.py
92.85% <0%> (-3.58%)
:arrow_down:

databricks/koalas/utils.py
97.29% <0%> (-2.71%)
:arrow_down:

databricks/koalas/namespace.py
88.46% <0%> (-1.29%)
:arrow_down:

databricks/koalas/frame.py
94.87% <0%> (-0.14%)
: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 7f6bb77...23e20c0. Read the comment docs.

Thanks! I'd merge this one for now.


distribute cli via installer (instead of gem)

Just like vagrant... https://github.com/mitchellh/vagrant-installers

Now that Windows and OSX is going to have better Docker  support (https://blog.docker.com/2016/03/docker-for-mac-windows-beta/) maybe we could package cli as a docker image and just install wrapper script to host?

There is work ongoing to create installers with https://github.com/chef/omnibus
see #1019

OSX installer now available

Omnibus installer is available for OSX, let's use new issues for tracking other missing platforms.


Update machine-learning-live-chat.md

Changing owner

Hi @LuisCabrer, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (luisca). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@LuisCabrer
Please resolve merge conflict. Thanks.

@LuisCabrer
If you need help with this merge conflict, let me know. Closing due to inactivity.

Ok, thanks. I think we are ok for  now.
From: Ross McAllister<EMAIL_ADDRESS>Sent: Wednesday, February 24, 2016 1:43 PM
To: Azure/azure-content<EMAIL_ADDRESS>Cc: Luis Cabrera-Cordon<EMAIL_ADDRESS>Subject: Re: [azure-content] Update machine-learning-live-chat.md (#5687)
@LuisCabrerhttps://github.com/LuisCabrer
If you need help with this merge conflict, let me know. Closing due to inactivity.
—
Reply to this email directly or view it on GitHubhttps://github.com/Azure/azure-content/pull/5687#issuecomment-188464721.


Add or update your RH pull secret

@sakthi-vetrivel FYI. I think we still need sign off that we want to publish this procedure, but this is ready for the team to review.

@lamek : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ms-jasondel @kwoodson @jim-minter
Could you provide feedback on whether we want customers following this type of procedure? Per my own testing this does work.

@ms-jasondel @kwoodson @jim-minter
Could you provide feedback on whether we want customers following this type of procedure? Per my own testing this does work.

Yikes... these additional operator steps scream to me too much...  I guess it's great to have this documented at this phase, but I really think that this now belongs in the rp with an --update-pull-secret CLI argument.  The pull secret was one thing, but these additional operator steps should be automated.  I don't think that should block publishing this doc, but would love to see a feature added to the RP for this in the future.

@lamek : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Create a React App to generate Topmate README Badges

The idea is to create a web app similar to Badges Generator or Shields.io to generate Topmate README badges.
Contributing guide
Please branch off from feature/web-app and raise a PR to feature/web-app. Currently, this branch contains a client directory that contains a basic React boilerplate which can be developed further as a React app to generate Topmate badges dynamically.
API documentation
![topmate](https://topmate-readme-badge.herokuapp.com/vinitshahdeo)

Please refer to the Postman collection.
Local development
git checkout feature/web-app
cd client/topmate-readme-badge
npm install
npm run start

Related

Try out: Peerlist README Badge Generator
Refer to this repository

In case, you have other frameworks in mind, please check out a branch feature/web-app- from develop and create your app within the client directory.

will like to work on this with you

Hey @Yash-Yadav-git @yhoungdev
Thanks for your interest. This has been created: https://deploy-preview-43--topmate-readme-badge.netlify.app/
Apologies - I couldn't assign this to you.


67 update dependencies

?

Merge Conflicts.
Do git pull from main branch to have up to date repo.


chore(testnet): bump testnet dag genesis

Purpose

For reviewers

Related Github issues

Changes

Tests

Deployment Considerations
Version Notes
{ major | minor | patch }

NOTE: Include the version notes in the squash commit message

prnet cleaned-up successfully


Question: Should I expand_address before parsing?

Hi
As it was written in issue title I wonder if I it is recommended to expand address before running parse_address?
My main goal is to identify unique addresses in dataset and it seems natural to first normalise an address and then parse it to extract labeled parts.

Usually the other way around, parse then expand each component with its specific dictionaries. See the https://github.com/openvenues/lieu project for some examples in Python


wsl.conf generateResolvConf = false always deleted /etc/resolv.conf

Version
Microsoft Windows [Version 10.0.22000.978]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
Ubuntu 20.04
Other Software
None.
Repro Steps
I want to set up the company nameserver to /etc/resolv.conf.
step 1:
Ref doc https://learn.microsoft.com/en-us/windows/wsl/wsl-config add /etc/wsl.conf and config:
[network]
generateResolvConf = false

step 2:
Close WSL terminal and run wsl --shutdown to restart the WSL instance. Open a new WSL terminal.
step 3:
ls /etc confirm folder, no /etc/resolv.conf file. sudo nano /etc/resolv.conf set up company nameserver.
step 4:
re-step 2, if WSL instance restart, /etc/resolv.conf always is deleted. We must set up a new  /etc/resolv.conf for every restart WSL instance.
Expected Behavior
[network]
generateResolvConf = false

My understanding is to turn off the auto-generating function, But he seems to have deleted the ResolvConf function. I need persistence to be set in the /etc/resolv.conf file.
Actual Behavior
Every restart WSL instance, always deleted /etc/resolv.conf.
Diagnostic Logs
No response

Same issue here, I temporarily fixed the issue by using chattr +i /etc/resolv.conf.


Remove restriction to use  Interfaces as content parameter

RestyGWT does not accept intefaces as content parameter in Rest methods.
This commit removes this restriction as it works fine on the server (jackson) and on the client (gwt-jackson).

cool.
a small test-case would be great. maybe extend on of the integration tests using an interface as parameter.


Support Ally Invest?

Feature Request
https://invest.ally.com
Doesn't appear there is a proper Python SDK, but it seems there is just an OAuth client used to do things... Ruby should be a straightorward translation - https://www.ally.com/api/invest/documentation/ruby/

More work on the fundamentals is currently needed.

Gotcha. I assume that progress is being tracked?


"Latest" documentation will break bookmarks.

I imagine that some developers build a knowledge base about the technologies they are working with and rely on bookmarks to access web resources within that system.
For example i have a 4.x tag and a link to the changelog. I access that at the end of this year and I am looking at 5.x changelog.
Is there an architectural reason why latest is used in the url?

A 4.x tag where? The changelog part confused me. Can you explain with more detail?

Sorry. I meant in my knowledge base system, i have tagged that link with 4.x.
When I query against 4.x and changelog tags in my system, it will bring up a link that now really is for 5.x
The point being, over time latest in the URL will mean something different. Why not just use an explicit version?

Latest was an idea that began with the project but never took place. So latest is just another piece of the url that conveys no meaning. Our doc will be always the latest docs, except the one we have in v2.angular.io which is the v2 edition.
We are migrating to a new site and we are getting rid of it.

What will happen when 5 comes out?

we will archive the current site probably like we did with v2

And new versions of the documentation will have URLs that will never change?

yes sir

Ty sir!


Fix the getMoment function

This fixes #1311.
The function trimmed newly created moments to the hole day by default
which caused problems with the useCurrent option. Removing
`.startOf('d') fixes the problem.

Hey guys, has this been fixed/merged by any chance?
The useCurrent method fallbacks to current date at 00:00:00, not to current time.

This is available in the development branch but hasn't been released yet. Should come with 4.17.42.


add(tools): prettier-plugin-tailwind

Name
Link

prettier-plugin-tailwind
https://github.com/Acidic9/prettier-plugin-tailwind

Prettier plugin that sorts a classlist based on tailwind plugins.

[x] My item is in the right category
[x] My item is logically grouped below similar items
[x] My item's name and description respects the conventions of the list
[x] My item is awesome
[x] I have read and followed the contribution guidelines

Really nice, thank you!

Nice plugin! Didn't know prettier supported plugins now

@joshmanders thanks! Actually plugins are meant to add support for entirely new languages, but I had to override their html/javascript/typescript language parsers to implement this... hopefully they'll add a proper way to extend the default languages.