Rest (*) character not showing up in macros

Crystal::Macro::Def#args is supposed to list all arguments, but if you include a rest character it only shows up as an empty string.
Example: https://carc.in/#/r/3m9b

The original idea was to correctly wrap a method, and generate a new method with the exact same signature. But there doesn't seem to be a way without using a bit of boilerplate like:
macro wrap(def_node)
  {% splat_no = def_node.splat_index %}
  def {{ def_node.name }}_wrapper(
    {% for arg, i in def_node.args %}
      {% if i == splat_no %}*{% end %}{{ arg }},
    {% end %}
  )
    # wrapper content!
  end
end

wrap def foo(a : String, *rest : Bool, named : String)
end

wrap def foo(a : String, *, named : String)
end

https://carc.in/#/r/3mc6 ( :point_left: @watzon this works )
It would be nice to have a SplatArg & DoubleSplatArg (and BlockArg?) in the array from def_node.args, that would have the correct to_s for their kind. This way we would only need to do *def_node.args to replicate the def_node's signature.

Thanks @bew, I figured you'd be able to describe it a bit better

Instead of changing the AST grammar, perhaps it is better to have this as part of #13082


Convert fastparse.byte to use scodec.bits.ByteVector instead of Array[Byte]

This is an experiment to see what it will look like if we use ByteVector instead of Array[Byte]. Major changes:

hexBytes is gone, replaced by Scodec's hex"" interpolator

FastParse now depends on scodec-bits.

scodec.bits.ByteVector is now aliased to fastparse.byte.Bytes, usually used as just Bytes, for conciseness

Implicit conversion between Array[Byte] => Parser[Unit, Byte, Array[Byte]] is now gone, as if we make it Bytes => Parser[Unit, Byte, Bytes], then using the | operator on two Bytes values within a parser behaves surprisingly: it bit-wise |s the two Bytes values together rather than constructing a parser that can parse either.

BS now constructs Parser[Unit] instead of constructing Array[Byte] and relying on the implicit to convert it to a parser, since the implicit is gone. It is also overloaded to take Bytes instead of the literal byte-values, so if you want to convert Bytes to a Parser[Unit] you just wrap it in BS

Add example unit-tests for Bytes/ByteVector, and use as documentation on how to use it

Update all existing parsers in the repo to make use of Bytes, hex"" and the rest of the new API. All the old .toSeq calls before comparing arrays are now gone, since == works.

Woo build is green! @vovapolu this is ready for you to review. What do you think of this change in general? Good/Bad?
CC @mpilquist in case you want to poke around the diff to see how I'm using scodec.bits.ByteVector

FWIW I ran perftests.binary.MidiParse locally and as far as I can tell there's no big difference in the runtimes

Well, if there's no big difference, so why we need to change anything?

A few things

Having the underlying data-model be immutable is nice, v.s. "here's a mutable Array, but please please please don't write to it". When you look at our original code, we had nice immutable case classes with these mutable Array[Byte]s as fields everywhere, which kind of defeats the point of immutability.

Having a good .toString, == makes a lot of things easier: e.g. testing and debugging. Having all our case classes have non-working == due to some Array[Byte] nested deep inside was annoying.

Get a bunch of nice things for free, e.g. the hex"" interpolator, that we no longer need to implement ourselves

Convenient constructors from hex, base64, ByteBuffer, fast concats and appends, and many other useful things. Many more than if we tried to implement our own immutable byte array

Overall, adding a dependency on a third-party library is a negative, but I think this one is lightweight enough and non-changing enough that the benefits are worth it.

bump @vovapolu

If there's no other feedback I'm moving forward with this

@lihaoyi Sorry for such late, it was a busy week.

@vovapolu sure no problem =) I'm working on polishing the API and cleaning up parts of the codebase so we can release 0.4.0. Hoping to get it out this weekend, so people can start using your summer's worth of work


Support webmaps

Definitely the most requested geoplot feature is webmap support.
There are two approaches: a static PNG time service based approach using contextily, and a JavaScript scrolly-panny approach using mplleaflet. The examples gallery currently has some demos demonstrating manual use of the latter, and there is some preliminary work (#48, #77) demonstrating the former.
I'm not sure yet what this feature would look like from an API perspective.

Implemented in #169.


Questions on event-timer and sync- based TPDOs

First of all, I would like to thank Michael Hillmann for the nice canopen-stack as well as the accompanying documentation. These have helped me to make progress in developing a CANopen servo drive, in which the canopen-stack is implemented (bare-metal) in a 32-bit microcontroller. I have reached the point where I am able to control the servo drive through SDO read/write and event-driven RPDO/TPDO based on mapped object changes.
Now I intend to trigger the PDOs based on different mechanisms as the title of the issue suggests.
Event-timer-based TPDO
I have not been able to properly implement this.
I did the following:

Followed the timer driver implementation based on co_timer_dummy.c and co_timer_swcycle.c
Set up a hardware timer ISR that is triggered every 1 msec.
as explained in https://canopen-stack.org/v4.2/api/timer/, I put COTmrService(&(AppNode.Tmr)) in the hardware timer ISR and COTmrProcess(&(AppNode.Tmr)) inside the main while (1) loop
Following https://canopen-stack.org/v4.2/examples/use-dynamic-object-dictionary/, I added a few objects through ODAddUpdate() and set the 3rd function parameter (*type_OD) as CO_TEVENT. These are the objects that are also mapped to a TPDO.
Through ODCreateTPDOCom(), I set the type to 254, inhibit time to 100 and evtimer to 10.

Observation:

The code gets stuck in the while(1) after looping for around 3 times.

Question:
what could have gone wrong here?
Sync-based TPDO
What was done:

followed the example on SYNC consumer from https://canopen-stack.org/v4.2/usage/tpdo/
Mapped the objects into the TPDO by using ODCreateTPdoMap(). The mapped objects' *type_OD (from the function ODAddUpdate) is set as 0.

Observation:

The PDO is not being transmitted after SYNC messages are sent by the CANopen master for the number of times corresponding to what is defined in TPDO's subindex 2

Question:
What could have been missing in the implementation steps?

Hmm, hard to say what is going on. Is there any error code stated in the node object? Sometimes there may be missing timers/actions which leads to this kind of behavior.
Maybe the tests can give you some additional hints:

Event-timer-based TPDO: TS_TPdo_Tmr

Sync-based TPDO: TS_TPdo_After3Sync

Thank you for the reply Michael.
After more and more debugging, finally I have solved the event-timer-based TPDO issue and it came from the following:

improper timer driver implementation
In the while loop in Main(), there was a COObjWrValue to an object that is  set for an event-timer-based TPDO. This caused the code getting stuck during the execution.
The sync-based TPDO is also working now, though I cannot ascertain where the problem really came from.
Once again, thank you!

good to hear. have a nice day 👍


Bug on Browser Engine

⚠ Please verify that this bug has NOT been raised before.

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

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
I get this error with the browser engine checks:
browser.newContext: Target page, context or browser has been closed.

The Checks using the Browser Engine work great for an initial period of time and then all of the checks using the browser engine start to fail at the same time and never recover.
👟 Reproduction steps
Configure Browser Engine monitor
👀 Expected behavior
To continue to work
😓 Actual Behavior
return the error :
browser.newContext: Target page, context or browser has been closed

🐻 Uptime-Kuma Version
1.23.11
💻 Operating System and Arch
Debian 12.4
🌐 Browser
Brave v1.61.116
🐋 Docker Version
K8s 1.27.7
🟩 NodeJS Version
No response
📝 Relevant log output
No response

What exactly is returning this log message? the browser console or the node/docker log?
To be able to reproduce this: what website are you monitoring? Is this reproducible?

I'm seeing this error in Kuma.  The services are internal services (Jellyseerr, Radarr, Sonarr, Sabnzbd, and Scrypted)

This shot shows they all went down in the same check period.

Prior to that, they had all been up for about 6.5 hours when they all failed in the same way.

Thanks ^^
We might have a race condition in the playwright code as in https://stackoverflow.com/questions/61933492/playwright-error-target-closed-after-navigation
Given that this does not seem very widespread/reprducible I am not going to prioritse reproducing/debugging this (I am currently quite under the water Uni-wise).
If somebody else wants to give this a shot, here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

Added a simple fix in #4417 but I'm not sure if this is the root cause, you can help by testing it if you're interested.
https://github.com/louislam/uptime-kuma/wiki/Test-Pull-Requests

@calebcall
I think this issue was fixed by https://github.com/louislam/uptime-kuma/pull/4417
Given that we cannot reproduce the issue, testing said PR would be greatly appreaciated ^^
I am going to assume that said PR works and does not contain bugs => closing as resolved


Typo in code example of README

Hi,
while using the alert notification example code provided in the README a typo was found: BasicAutentication instead of BasicAuthentication.
I will submit a PR resolving this issue.

Thank you @aweers, it is fixed a long time ago. I am closing the issue


When stopping and then starting the BPMs are not set to the starting point

What the title says, imagine I'm going from 100 to 150 BPM increasing by 5 and I fck up at 135 and want to restart again so I can practice slowly, I click the "timer" with the BPMs to stop it, then press start again and goes back to 135, there should be to start from 0, that is your decision but I would make default to go back to the start if it is stopped by pressing the "timer" and then another button down with the pause ( || ) icon and then when it pauses and you press start continues with the BPM it was on.
Hope I explained myself,

Hi. Thanks for writing this. Really appreciate it.
I'm aware of this. I earlier had a reset button which I removed thinking just a start/stop should be sufficient. I did contemplate on this and thought that if someone stops it they might want to resume it where they stopped. Let me mull over this. I'll either do what you asked or add a separate reset button to achieve the same. For now, you can simple re-edit the starting tempo field and it will pick whatever value you enter.

I've added a reset option.


Default Domain Admin cannot by secured "Smart card is required for interactive logon"

Hi Windows Server Team,
The recommendation in the document is contradictory and cannot be implemented like this. The document recommended to set Default Domain Admin account with the account option "Smart card is required for interactive logon".

Controls for Built-in Administrator Accounts
Setting : Enable the Smart card is required for interactive logon flag on the account

Based on test and the following link, a 128 bit random password is set for an account when setting the account option "Smart card is required for interactive logon". As a result, no one knows the password of the default domain admin after activating the account option. To use the account, the account option must first be deactivated and a new password must be set.

Configure user accounts to disallow password authentication
When you configure a user account for SCRIL, Active Directory changes the affected user's password to a random 128 bits of data

https://learn.microsoft.com/en-us/windows/security/identity-protection/hello-for-business/passwordless-strategy#configure-user-accounts-to-disallow-password-authentication
Here is the contradiction to the AD Forest Recovery Guide.
In the AD Forest Recovery Guide it is mandatory to know the password of the Default Domain Admin, because only with this password it is possible to log in without GC. But in a recovery case nobody knows the password of the default domain admin, because the account option "Smart card is required for interactive logon" was set. This leads to the fact that a forest recovery is no longer possible.

Rehost all GCs
Warning:  The password of the Domain Administrator account for all domains must be ready for use in case a problem prevents access to a GC for logon.

https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/ad-forest-recovery-single-domain-in-multidomain-recovery#rehost-all-gcs
What is valid? Should the default domain admin be configured with the account option or do we need to know the password of the default domain admin in case of recovery scenario.

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

ID: a861650d-0499-c46b-7ca8-d1fb04546192
Version Independent ID: 3967b664-f419-6e8e-5ad8-f98cdcb21733
Content: Appendix D - Securing Built-In Administrator Accounts in Active Directory
Content Source: WindowsServerDocs/identity/ad-ds/plan/security-best-practices/Appendix-D--Securing-Built-In-Administrator-Accounts-in-Active-Directory.md
Product: windows-server
Technology: ad-ds
GitHub Login: @iainfoulds
Microsoft Alias: daveba

+1 for some guidance!
My opinion: I would recommend against setting SCRIL because of the mentioned forest recovery scenario.
Instead I would plan for proper password strength, storage of password, retrieval processes and good monitoring of the account.

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


Bash shell script in "Create Dashboard" section doesn't work as expected

[Output is: sed: 1: "/workspace/c\   \t\t\t" ...": extra characters after \ at the end of c command]

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

ID: e17f2434-814c-4ebc-c05d-501566aa3c0f
Version Independent ID: 6cf80861-2ab6-0c28-8a68-4f641491a61a
Content: Use dashboards to visualize Azure Databricks metrics - Azure Architecture Center
Content Source: docs/databricks-monitoring/dashboards.md
Service: architecture-center
Sub-service: reference-architecture
GitHub Login: @Petertaylor9999
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#

You're welcome, it looks like a simple sed syntax error. I tried to manually perform the sed intent replacing the environment variables but didn't work as expected.

@justPaulo -- since the fix for this will be in mspnp/spark-monitoring repo, I've opened up a mirror of this ticket in that repo.  I'll close it here.
See & follow @ mspnp/spark-monitoring#108


Allow expecting a runtime panic

Suppose a macro expands to a block which asserts invariants at runtime, e.g. using assert!(). It might be useful to be able to test that the macro's expansion compiles successfully even though it will panic at runtime.
Neither pass() nor compile_fail() expresses this; perhaps a runtime_fail() function could be added?
Checking a .stderr file could also be useful in this case, to ensure that the panic is communicated effectively.

Agreed. This is definitely something I could use with my macros.

I would prefer not to build this into trybuild. Testing panic messages of successfully compiled code is already covered by #[should_panic(expected = "...")] in ordinary unit tests / integration tests, or by catch_unwind + assertions on the resulting error object for any more complicated assertions.


Stop dragging

Hi,
I've noticed that stop dragging on ESC key up was implemented in the new version, but since that isn't usable yet, is there any other way to force stop drag on JS?
Thank you!

Dispatch drag:stop event can do this. (Notes: elements that have been moved can't be automatically reset.) For example:

A

B

C


Derive the Annex A value set

@skounis or @kruzikh (or anyone else): could you have a look at this PR, and possibly approve it (so I can merge it)?
(Note that I had to re-create the PR to target the 2.11.0 release branch.)

Hi Meinte,
this PR goes a bit out of my expertise, so I am not able to check if it is correct. I can aprove this PR formally but I would prefer if somebody else with scripting experiance will do so.
BTW, the annex A will have to change again after new version of the guidelines will be approved by EHN as ATC codes are now deprecated. So, shouldn't we wait with this PR till then?

Hi Hynek,
No worries: Stavros and Ryan approved the PR, and I've merged it in the meantime.
You're right: Annex A is going to change. However, I think that's an excellent test of the contents of this PR that we propagate that change.


Custom generator does not work on the standard world

What steps will reproduce the problem?

Create a new world with custom generator and set this world to standard world in 'server.properties' (level-name=world)
Restart the server
The custom generator is inaktiv on the standard world. Fresh generated terrain is no custom terrain on this world.

Bukkit-1.1-R3
MultiVerse-Core 2.3-AB
CleanroomGenerator v0.0.4

Thought I had an FAQ for this, but I guess not. You need to put them in your bukkit.yml as described here. After you do this, delete your main world from the MV config.yml. When the server starts the next time, Multiverse 2 will detect the bukkit.yml generators. I'll get a MV FAQ topic up later on this if you need further assistance.

It works. Thank you for fast reply.


Full screen not hidden header

In the Example click image hidden header and statusBar, but in my project not hidden header, why?
I use NavigatorIOS.

Hey @stoneWeb,
Please make sure you are passing alwaysShowControls props as false.

set alwaysShowControls={false}, Still no hidden header, and the title not become “… photos ...  1 of 5”

I just tested the component with NavigatorIOS. It doesn't work nice with navigationBar as the component has it's own bar currently.
It works good if you pass navigationBarHidden: true property to your new route though. Can you try that?

I tried, It worked. but click backbutton statusbar color not restore

It work now, Great ✌

I'm glad it worked out. Thanks for your time :)


Dart2JS interop breaks if there are no classes annotated with @JS

Was trying to reproduce a different issue and was unable to use js iterop at all until I had some class annotated with @JS() regardless of wether that class was used.
VM362 main.dart.js:1001 Uncaught TypeError: v.getIsolateTag is not a function
    at VM362 main.dart.js:1001
    at Object.a.<computed> (VM362 main.dart.js:27)
    at Object.bh (VM362 main.dart.js:617)
    at Object.bk (VM362 main.dart.js:626)
    at Object.aX (VM362 main.dart.js:628)
    at VM362 main.dart.js:1013
    at VM362 main.dart.js:1008
    at dartProgram (VM362 main.dart.js:1011)
    at VM362 main.dart.js:1013

So, for instance, if I only have top level methods annotated then getIsolateTag function is not written and the interop does not work.

There are many other conditions which can also make it work - this is most likely to show up in very small samples. Here is one:
@JS()
library main;

import 'package:js/js.dart';

@JS('doStuff')
external set doStuff(Function anything);

void main() {
  print('Started');
  doStuff = allowInterop(dartStuff);
}

void dartStuff(String arg) {
  print('Dart has: $arg');
}

We don't emit the getIsolateTag in that case. We do emit it for
@JS()
library main;

import 'package:js/js.dart';

@JS('doStuff')
external set doStuff(Function anything);

@JS()
class Foo {}

void main() {
  print('Started');
  doStuff = allowInterop(dartStuff);
}

void dartStuff(String arg) {
  print('Dart has: $arg');
}

After syncing with @rakudrama this isn't trivial to solve.
The short story is that we track "impacts" of different pieces of code. A call to "allowInterop" should have the impact of emitting getIsolateTag, but it doesn't and noticing where that happens isn't easy. Things work when some other bit of code is known to have that impact.
This might get easier to solve if we have the constant update turned on.

Compiling the program with asserts enabled (dart2js_developer) shows there are some other problems:
org-dartlang-sdk:///sdk/lib/js/dart2js/js_dart2js.dart@21484+1:
Internal Error: The compiler crashed when compiling this element.
The compiler is broken.

...

Unhandled exception:
'package:compiler/src/ssa/types.dart': Failed assertion: line 67 pos 12: 'abstractValueDomain.isEmpty(result).isPotentiallyFalse': Unexpected empty return value for NativeBehavior(returns: [JavaScriptFunction], creates: [JavaScriptFunction], sideEffects: SideEffects(reads anything; writes anything), throws: may).
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      AbstractValueFactory.fromNativeBehavior (package:compiler/src/ssa/types.dart:67:12)
#3      KernelToTypeInferenceMapImpl.typeFromNativeBehavior (package:compiler/src/js_model/js_strategy.dart:616:33)
#4      KernelSsaGraphBuilder._handleForeignJs (package:compiler/src/ssa/builder_kernel.dart:4688:27)
#5      KernelSsaGraphBuilder._handleInvokeStaticForeign (package:compiler/src/ssa/builder_kernel.dart:4043:7)
#6      KernelSsaGraphBuilder.visitStaticInvocation (package:compiler/src/ssa/builder_kernel.dart:3766:7)
#7      StaticInvocation.accept (package:kernel/ast.dart:2976:36)
#8      KernelSsaGraphBuilder.visitVariableDeclaration (package:compiler/src/ssa/builder_kernel.dart:3526:24)
#9      VariableDeclaration.accept (package:kernel/ast.dart:4661:35)
#10     KernelSsaGraphBuilder.visitBlock (package:compiler/src/ssa/builder_kernel.dart:1715:17)
#11     Block.accept (package:kernel/ast.dart:3955:35)
#12     KernelSsaGraphBuilder._buildFunctionNode (package:compiler/src/ssa/builder_kernel.dart:1297:23)
#13     KernelSsaGraphBuilder.build.<anonymous closure> (package:compiler/src/ssa/builder_kernel.dart:451:15)
#14     CompilerDiagnosticReporter.withCurrentElement (package:compiler/src/compiler.dart:751:15)
#15     KernelSsaGraphBuilder.build (package:compiler/src/ssa/builder_kernel.dart:436:21)
#16     KernelSsaBuilder.build.<anonymous closure> (package:compiler/src/js_model/js_strategy.dart:514:22)

The call  JS('JavaScriptFunction', ...) in js_dart2js.dart should have registered JavaScriptFunction as having been created.

https://dart-review.googlesource.com/c/sdk/+/114302/ tracks calls to allowInterop and produces impacts which emit getIsolateTag.
Even with this fix, the sample program still breaks the compiler, as Stephen mentioned above. The NativeBehavior from allowInterop does correctly mark JavaScriptFunction as being returned, but we don't mark JavaScriptFunction as being instantiated, so we produce an empty type mask for it.
@rakudrama, @johnniwinther: Should we mark JavaScriptFunction as abstractly instantiated in this case?

Digging deeper, although the NativeBehavior marks JavaScriptFunction as being instantiated, the NativeResolutionEnqueuer fails to process the NativeBehavior correctly because the NativeClassFinder does not mark JavaScriptFunction as a native class.
We should add all classes instantiated by a NativeBehavior to the set of native classes during resolution, or at least treat them like it.
Basic fix here: https://dart-review.googlesource.com/c/sdk/+/114466/


cmd/cgo: no console output after invoking a go c-shared dll via Windows Powershell

What version of Go are you using (go version)?

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?
Uncertain.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build351334670=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I cross-compiled a very simple c-shared dll for Windows with one exported function (HelloWorld). I then invoked the dll from Powershell.
The go code was:
package main

import "C"
import (
        "fmt"
)

//export HelloWorld
func HelloWorld() {
        fmt.Println("Hello World")
}

func main() {}

The build command (from linux) used was:
GOARCH=amd64 GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -v -buildmode=c-shared -o helloworld.dll .

I then copied the resultant .dll to Windows and invoked the HelloWorld() function using the following Powershell script:
$signature = @"
[DllImport("c:\\cshared\\helloworld.dll")]
public static extern void HelloWorld();
"@

Add-Type -MemberDefinition $signature -Name World -Namespace Hello

[Hello.World]::HelloWorld()

What did you expect to see?
I expected the dll's HelloWorld() function to be invoked successfully (causing the text "Hello World" to be written to the console) and then I expected to be able to use my powershell prompt to execute further console commands such as "hostname" or "ipconfig" etc.
What did you see instead?
This is really odd. The HelloWorld() function is indeed executed successfully and I see the text "Hello World" on the console. However, after the function has been invoked, I am no longer able to see any console output from cmd.exe commands in my powershell window. For example, calling "hostname" just returns with no output and the same happens with "ipconfig".
e.g. initially hostname.exe works and provides output, but after executing the cshared dll I am unable to see any further output from hostname..exe on the console:
PS C:\cshared> hostname
nwood-host
PS C:\cshared> hostname
nwood-host
PS C:\cshared> .\helloworld.ps1
Hello World
PS C:\cshared> hostname
PS C:\cshared> ipconfig
PS C:\cshared> hostname

If I pipe the output of hostname.exe to a file (e.g. "hostname > out.txt") then I can confirm that the output is present and the command is succeeding....so it seems like executing the c-shared dll somehow causes stdout to be redirected or not shown properly?
I tried removing the fmt.Println from the go code to see if that helps, but the issues is still the same. I am also only seeing this with Powershell (if I do the same experiment but invoke the helloworld.dll from python on Windows, I do not see any issue afterwards).
Any ideas?

cc @alexbrainman @zx2c4
@gopherbot add OS-Windows

/cc @ianlancetaylor

@nwoodmsft Can you try to reproduce this issue on Go 1.16?

Investigation results (hi! I own the Windows Console :smile:)
The go runtime disables handle inheritance for stdin/stdout/stderr on Windows.
https://github.com/golang/go/blob/4662029264e79f144eef4323631b3356624e884f/src/syscall/syscall_windows.go#L468
https://github.com/golang/go/blob/4662029264e79f144eef4323631b3356624e884f/src/syscall/syscall_windows.go#L472-L476
https://github.com/golang/go/blob/4662029264e79f144eef4323631b3356624e884f/src/syscall/exec_windows.go#L141-L143
When the runtime is loaded in a DLL, it immediately disables the inheritance of stdin/stdout/stderr. 😊

Thank you so much for taking a look @DHowett ! @alexbrainman It looks like a fix is needed in golang to address this. I did try on 1.16 and the issue was the same.
@DHowett Until a fix can be made, is there any workaround we can do after the p/invoke to "repair" a console which is in this state? My current workaround is to execute the PS cmdlet in a new session (i.e. "$result = Powershell.exe -command { Hello-World }" or to execute it as a PS job potentially.

A harmless workaround would be to P/Invoke SetHandleInformation to restore inheritance to those three handles. :smile:

Previously we likely twiddled with inheritance because our invocations of CreateProcess were unsafe. I've fixed that for 1.16 already. That means we can safely stop changing stdio handle inheritance.
I'll send a CL.

@nwoodmsft
Thank you for creating this issue.
I can reproduce your problem here.
I am trying to add new syscall test that fails because of this issue. Unfortunately I don't know much about Powershell.
If I put this
hostname

$signature = @"
[DllImport("c:\helloworld.dll")]
public static extern void HelloWorld();
"@

Add-Type -MemberDefinition $signature -Name World -Namespace Hello

[Hello.World]::HelloWorld()

hostname

into a file, like a.ps1. And then run this command
powershell -Command "c:\a.ps1"

I get correct output
sharik
Hello World

Unfortunately I had to run this powershell command set-executionpolicy remotesigned, otherwise I get this error message:
c:\a.ps1 : File U:\rw\helloworld.ps1 cannot be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ c:\a.ps1
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

I plan to run this test on other people computers. So I won't be able to run set-executionpolicy remotesigned command there, because that requires Administrator access.
Is there any way to run your Powershell script on command line or something? For example, I can run multiple commands there delimited by ;. Unfortunetly I don't know how to fit your $signature string there.
Alternatively, do you know of a way to reproduce your program with a C program built with Mingw GCC? That would be even better, because this way we don't need to rely on Powershell.
Thank you.
Alex


Parsing: NewsBlur cannot parse its own RSS feed

Adding https://blog.newsblur.com/rss to my feeds, it never shows any stories despite Feed Validator saying the feed is valid but contain some interoperability issues:
https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fblog.newsblur.com%2Frss

Do you have the feed trained? Right-click on the feed and open the intelligence trainer. Could be that it's thumbed down.

Also the newsblur blog is on tumblr and that should probably change.


Update autofill to 8.4.1

Task/Issue URL:
Autofill Release: https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/8.4.1
Description
Updates Autofill to version 8.4.1.
Autofill 8.4.1 release notes
What's Changed

Precompile regexes by @GioSensation in https://github.com/duckduckgo/duckduckgo-autofill/pull/382
Add perf tests by @GioSensation in https://github.com/duckduckgo/duckduckgo-autofill/pull/383
deps: remove deprecated content-scope-utils by @shakyShane in https://github.com/duckduckgo/duckduckgo-autofill/pull/384
Update dependencies by @GioSensation in https://github.com/duckduckgo/duckduckgo-autofill/pull/368
Fix perf regressions by @GioSensation in https://github.com/duckduckgo/duckduckgo-autofill/pull/385

Full Changelog: https://github.com/duckduckgo/duckduckgo-autofill/compare/8.4.0...8.4.1
Steps to test
This release has been tested during autofill development. For smoke test steps see this task.

Test failures are totally unrelated. Merging.


Improve rendering for tf.distribute.cluster_resolver.TPUClusterResolver in tpu_strategy API docs

This should fix the auto-linking and rendering

@8bitmp3  Can you please address Ubuntu Sanity errors? Thanks!

@8bitmp3  Can you please address Ubuntu Sanity errors? Thanks!

@8bitmp3 Can you please address Ubuntu Sanity errors? Thanks!

thanks @gbaned exited with error code 1  - do you have an idea what it means? @rxsang

Ubuntu Sanity errors? Thanks!

thanks

I don't think that's relevant, maybe a transient issue?

Ubuntu Sanity errors? Thanks!

thanks

I don't think that's relevant, maybe a transient issue?

@gbaned @rxsang I think I found it in the logs: 2. do_pylint: Python 3 pylint  FAIL

@gbaned @rxsang OK, PTAL, thank you


Feat: deep links support (AppsFlyer)

Requirements:

Remove Podfile.lock
Normal install: yarn install; yarn pod install

Test deeplink here: https://cmgustavo.github.io/website/

Closed in favor of https://github.com/bitpay/bitpay-app/pull/565


How to make KantanaAuthentication example work in WebAPI 2.2?

Hi,
I am trying to use IdentityModel in WebAPI 2.2. Inside KatanaAuthentication.Startup class, I need to call:
app.UseWebApi(WebApiConfig.Register());
But in WebAPI 2.2, the signature of Register is:
public static void Register(HttpConfiguration config)
How can I create/get the config obj?
Thank you,
Quynh.

well - you need the right authentication middleware - depending how you want to do authentication.

Hi,
Here is the code sample from the KatanaAuthenticationDemo solution for IdentityModel:

I am trying to follow the example but the signature of WebApiConfig.Register in Web API 2.2 is now:

Please note that Register now requires HttpConfiguration config as a parameter, and returns void. Instead of returning an HttpConfiguration object as in Web API 2.1.
Please advise how I can create a HttpConfiguration object to fix this call from OwinStart:
app.UseWebApi(WebApiConfig.Register());
Thank you,
Quynh.

Hi Dominic,
I have managed to figure it out. A HttpConfiguration object can be easily created. I found the answer in the code example for IdentityServer V3:
https://github.com/IdentityServer/Thinktecture.IdentityServer3.Samples/blob/master/source/MVC Authentication/Api/Startup.cs
There is still one issue here, which is the example for IdentityModel does not do your hardwork justice. I intend to write a detailed blog post explaining how to setup/user IdentityModel in common scenarios in the next few weeks.
Thank you,
Quynh.

@rosslynquynhnguyen when you write that blog post - put the link on this issue, I'd be interested to read it and I'll also forward it to my colleagues.


[Bug]: nan value in array causes snaphu to fail

Checked for duplicates
Yes - I have checked
Describe the bug
The current nodata value of nan does not agree with SNAHPHU. It causes the error NaN or infinity found in input float data:
ValueError: Error in file /home/conda/feedstock_root/build_artifacts/isce3_1657045316397/work/cxx/isce3/unwrap/snaphu/snaphu_io.cpp, line 2087, function int isce3::unwrap::ReadInputFile(isce3::unwrap::infileT*, isce3::unwrap::Array2D<float>*, isce3::unwrap::Array2D<float>*, isce3::unwrap::Array2D<short int>*, long int, long int, isce3::unwrap::paramT*, isce3::unwrap::tileparamT*): NaN or infinity found in input float data

This is coming from a check that snaphu does on input phase to immediately abort upon seeing a nan or an infinity:
https://github.com/isce-framework/isce3/blob/49f18304a8fcba33dbf33347a64b7f89117cdcf6/cxx/isce3/unwrap/snaphu/snaphu_io.cpp#L2083-L2089
https://github.com/isce-framework/isce3/blob/49f18304a8fcba33dbf33347a64b7f89117cdcf6/cxx/isce3/unwrap/snaphu/snaphu_util.cpp#L464-L476
What did you expect?
I expected SNAPHU to respect a 0 correlation mask, but it doesn't seem to matter if I change it to  corr = np.ones((w, l), dtype='float32'); corr[0] = 0; corr_raster = isce3.io.gdal.Raster(corr). The check right now is hardcoded to always fail upon a nan.
Reproducible steps
from isce3.unwrap import snaphu
import isce3.io

w = l = 5

unw_raster = isce3.io.gdal.Raster("unw.tif", w, l, np.float32, "GTiff")
ccl_raster = isce3.io.gdal.Raster("ccl.tif", w, l, np.uint32, "GTiff")

igram = np.ones((w, l), dtype='complex64')
igram[0] = np.nan
igram_raster = isce3.io.gdal.Raster(igram)

corr_raster = isce3.io.gdal.Raster(np.ones((w, l), dtype='float32'))

snaphu.unwrap( unw_raster, ccl_raster, igram_raster, corr_raster)

Environment
In [27]: %load_ext watermark

In [28]: %watermark
Last updated: 2022-08-21T14:04:50.917644-07:00

Python implementation: CPython
Python version       : 3.10.5
IPython version      : 8.4.0

Compiler    : GCC 10.3.0
OS          : Linux
Release     : 3.10.0-1160.59.1.el7.x86_64
Machine     : x86_64
Processor   : x86_64
CPU cores   : 224
Architecture: 64bit

If I am not wrong, we have the capability of changing the nodata value in our CSLC core module, please @LiangJYu can you confirm that?
If not nan+jnan, what would be a plausible nodata value for the displacement workflow?
Also, just out of curiosity, have you tried to give SNAPHU a mask with the nodata value locations?

We currently do not have the ability to change the nodata value. Updating CSLC to pass to replace the default nan + j * nan in isce3.geocode.geocode_slc shouldn't be difficult.

@vbrancat It does seem like the byte mask should ignore the nans, and perhaps we could change the SNAPHU code to make that work; as it stands, SNAPHU first runs first runs ReadInputFile which calls ValidDataArray to check for nans (and fails if there are nans), then runs runs ReadByteMask after that point :\

I'll say that my current opinion is this: If we can't think of a better option overall for a NoData value (and there's really nothing wrong for most cases with nan as long as you say "The nodata value is nan"), we can work around it. It shouldn't be a big cost to make a temporary file with nans replaced by 0s if we call SNAPHU

Closing this because it can be handled by tophu/other unwrapping scripts, which have to check for multiple unwrapper-specific quirks anyway


Change Ping IP

Ping IP changed to <IP_ADDRESS>

Ping IP changed to <IP_ADDRESS>

Please resolve the conflict first, thank you.


Fix layout of the map section.

#363
Remove "field" class from the map-container so that "display: flex" (applied for "field" class, which layouts its children horizontally) is not applied to the map-container.
Also applied minor HTML clean up.
Before: https://goo.gl/photos/ChASwkn3Mfq6mNvq7
After:

Thanks! Merged.


AOT compilation with ng2-bs3-model

Hi guys,
I have got this errors during rollup the project.
Export 'Ng2Bs3ModalModule' is not defined by '/Users/vdzundza/projects/demo-portal-angular/src/main/storefront-spa-webapp/aot/src/app/app.module.ngfactory.js'
'Ng2Bs3ModalModule' is not exported by node_modules/ng2-bs3-modal/ng2-bs3-modal.js (imported by src/app/app.module.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
Error: 'Ng2Bs3ModalModule' is not exported by node_modules/ng2-bs3-modal/ng2-bs3-modal.js (imported by src/app/app.module.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module

I've added the ng2-bs3-module to my ngModule import section and also updated the vendor.js file with import statement for a ng2-bs3 modal component.
My app.module.ts is listed below
import { NgModule } from '@angular/core';
import { BrowserModule }  from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule, JsonpModule } from '@angular/http';
import { RouterModule, Routes } from '@angular/router';
import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';

import { AppComponent } from './app.component';
import { PaymentsComponent } from './components/payments/payments.component';
import { InvoicesComponent } from './components/invoices/invoices.component';
import { CustomerListComponent } from './components/customers/customer-list/customer-list.component';
import { CustomerDetailComponent } from './components/customers/customer-detail/customer-detail.component';
import { NavbarMainComponent } from './components/navbar/navbar-main/navbar-main.component';
import { HeaderComponent } from './components/header/header.component';
import { BasketComponent } from './components/basket/basket.component';
import { SsoWidgetComponent } from './components/sso/sso-widget/sso-widget.component';
import { TitleComponent } from './shared/components/title/title.component';
import { ButtonsComponent } from './shared/components/buttons/buttons.component';
import { FormGroupComponent } from './shared/components/form-group/form-group.component';
import { ProductListComponent, ProductListItemComponent } from './components/products/index';

let appRoutes: Routes = [
  { path: '', redirectTo: '/customers', pathMatch: 'full'  },
  { path: 'customers', component: CustomerListComponent },
  { path: 'customer/:id', component: CustomerDetailComponent },
  { path: 'payments', component: PaymentsComponent },
  { path: 'products', component: ProductListComponent },
  { path: 'invoices', component: InvoicesComponent }
];

@NgModule({
  imports: [
    BrowserModule,
    HttpModule,
    JsonpModule,
    FormsModule,
    Ng2Bs3ModalModule,
    RouterModule.forRoot(appRoutes)
  ],
  declarations: [
    AppComponent,
    PaymentsComponent,
    ProductListComponent,
    ProductListItemComponent,
    InvoicesComponent,
    CustomerListComponent,
    CustomerDetailComponent,
    NavbarMainComponent,
    HeaderComponent,
    BasketComponent,
    SsoWidgetComponent,
    TitleComponent,
    ButtonsComponent,
    FormGroupComponent
  ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }
export { appRoutes as routes };

Does anyone know how to fix AOT compilation?

@vdzundza are you using angular-cli? What command are you using to compile your project?

me too!
here is my compile option
tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [ "es2015", "dom" ],
    "suppressImplicitAnyIndexErrors": true
  },
  "exclude": [
    "node_modules/*",
    "aot/*",
    "app/*-aot.ts"
  ]
}

rollup-config.js
import rollup      from 'rollup'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs    from 'rollup-plugin-commonjs';
import uglify      from 'rollup-plugin-uglify'

export default {
  entry: 'app/main-aot.js',
  dest: 'dist/build.js', // output a single application bundle
  sourceMap: true,
  sourceMapFile: 'dist/build.js.map',
  format: 'iife',
  plugins: [
    nodeResolve({ jsnext: true, module: true }),
    commonjs({
      include: [
        'node_modules/rxjs/**'
      ],
      namedExports: { 'node_modules/ng2-bs3-modal/ng2-bs3-modal.js': ['Ng2Bs3ModalModule'] }
    }),
    uglify()
  ]
}

and my build code in the package.json
"build": "npm run ngc && npm run rollup",
"ngc": "node_modules/.bin/ngc -p tsconfig-aot.json",
"rollup": "node_modules/.bin/rollup -c rollup-config.js",

the follow is the error
⚠   'Ng2Bs3ModalModule' is not exported by 'node_modules/ng2-bs3-modal/ng2-bs3-modal.js'
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
aot/app/app.module.ngfactory.js (589:31)
587:             return this._CommonModule_0;
588:         }
589:         if ((token === import3.Ng2Bs3ModalModule)) {
                                    ^
590:             return this._Ng2Bs3ModalModule_1;
591:         }

🚨   'Ng2Bs3ModalModule' is not exported by node_modules/ng2-bs3-modal/ng2-bs3-modal.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
app/app.module.js (14:9)
12: import { HttpModule } from '@angular/http';
13: import { FormsModule } from '@angular/forms';
14: import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';
             ^
15: import { GroupService } from './group/group.service';
16: import { GpDetailService } from './common/gp.detail.service';

please help

@dougludlow can you  help me

For me helped this steps:

Go to folder node_modules/ng2-bs3-modal
Create file tsconfig.json with next content:

{
    "compilerOptions": {
        "module": "es2015",
        "moduleResolution": "node",
        "target": "es5",
        "noImplicitAny": false,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "inlineSourceMap": true,
        "declaration": false,
        "rootDir": "./src/ng2-bs3-modal",
        "outDir": ""
    },
    "exclude": [
        "node_modules",
        "demo",
        "bundles",
        "components",
        "directives",
        "src/test",
        "**/*.spec.ts"
    ]
}

Run tsc

I would appreciate if something could be done about this. The quickfix above works, but in larger dev environments issues are bound to occur. Granted, Angular's support for AoT seems like a second thought :)

@wartab pull requests are welcome 😄. I don't currently have any projects using this and my time has been somewhat limited, but when I get a chance I'll be sure to address this.

I'm find solution
Need change
this
import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';
to this
import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/src/ng2-bs3-modal/ng2-bs3-modal';
Maybe this can help for some people :+1:

I would like to share my findings that I made over the past months and everything described above is not required if you are following Angular's tutorial on using AOT + Rollup.
All you need to do is import the module as described in this doc.
For Rollup, this config works for me using the Rollup common-js plugin.
export defaults {
    plugins: [
        commonjs({
            include: [
                "node_modules/ng2-bs3-modal/**",
            ],
            namedExports: [
                "node_modules/ng2-bs3-modal/ng2-bs3-modal.js": ["ModalComponent"],
            ]
        }),
    ],
}

I'm hoping this is fixed with my latest changes on v0.11. I'm using ngc to compile the project.

/node_modules/ng2-bs3-modal/modal/modal.js:1 (function (exports, require, module, __filename, __dirname) { import { Component, Input, Output, EventEmitter, ElementRef, HostBinding, NgZone } from '@angular/core';                                                               ^^^^^^
Not fixed ;-)

@glemiere try
import { BsModalComponent } from 'ng2-bs3-modal';

instead of
import { BsModalComponent } from 'ng2-bs3-modal/ng2-bs3-modal';

It looks like you're trying to import the ESM version.

I did import it the right way, I realised that it is not a problem with your library but with angular itself while using server rendering.
I'm trying to fix it using this workaround : https://github.com/angular/universal-starter/issues/428#issuecomment-331558400

use
import { BsModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';
instead of
import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';


2 new extensions | QuestionPopUpMenu and Calendar Utils

QAPopUp menu: Let’s you open a menu on a user’s screen and ask them a question with set answers.
CalendarUtils: Extra tools for time-based projects

GitHub had a stroke during all of this, so don’t mind me creating and deleting my own folder a few times.

1 extension per pull request please

1 extension per pull request please

Okay, I’ll fix that (and the image aspect ratio)


Error: Cannot find module 'mkdirp'

at: node_modules/@asyncapi/generator/cli.js:7:16
version<EMAIL_ADDRESS>mkdirp should be a dependency 👍

Thanks, @laat. A fix is on its way.


DevContainer Tasks/Debugging Issues

I'm interested in helping out with the coding for this project, it has a lot of potential. I see the Dev Documentation is still a wip but I was able to setup the new Dev Container in VS Code per instructions here: https://github.com/roflcoopter/viseron/blob/dev/docs/docs/developers/development_environment/setup.mdx
I am running into issues building and debugging the Frontend. I have not made any code changes yet but I get the same outcome even if I do change something simple like the title of one of the webpages.
When doing the Task: "Frontend: Build" it errors out quickly with the output below

Executing task: npm run build

<EMAIL_ADDRESS>build
tsc && vite build

sh: 1: tsc: not found

The terminal process "/bin/bash '-c', 'npm run build'" terminated with exit code: 127.
Press any key to close the terminal.

When doing the Task: "Frontend: Start" it errors out quickly with the output below

Executing task: npm run start

<EMAIL_ADDRESS>start
vite --host

sh: 1: vite: not found

The terminal process "/bin/bash '-c', 'npm run start'" terminated with exit code: 127.
Press any key to close the terminal.

This may be related to above but also when under "Run and Debug" in VS Code. If I choose "Frontend Debug" it will launch the browser and load with url set to about:blank . This is also with "Viseron" running in "Run and Debug". I see in launch.json it should be loading url: http://localhost:5173 but when pointing to that it never loads and there is no Running Process under that port.

Awesome that you want to help out!
Seems npm install did not run properly, does it work if you first cd frontend and then run npm install?

Also you can find the developer docs here: https://dev--viseron.netlify.app/docs/developers
As you said they are a work in progress but there might be something useful for you there

Thanks for the link.
After doing the cd frontend and then npm install the errors are gone and the Tasks are working. I rebuilt the container a few times and could reproduce the same situation each time.

Alright, and on your host? Thinking if its a permission issue between the host and the container


Retry failed models due to connection or server error

If a model fails due to intermittent failures not related to the model itself, it would be nice to have an auto retry.
For example, during the summer we have had some scheduled model failures due to "Remote end closed connection without response" or "Query could not be scheduled: HTTP Response code: 503. Please try again later. SQLSTATE: XX000".
For context we are executing DBT as a Databricks job using the DBT Task and SQL Serverless for compute.
For reference, I believe the bigquery adapter has such features.

In order to get that message, it generally has already retried for 15 minutes.  What did you have in mind?

In order to get that message, it generally has already retried for 15 minutes. What did you have in mind?

Ok, Well looking at the model execution timings it does not look like any retries where attempted.
See example log below.

...
03:35:29  Running with dbt=1.7.17
03:35:31  Registered adapter: databricks=1.7.10
...
03:42:45  134 of 158 START sql table model xx  [RUN]
03:42:46  134 of 158 ERROR creating sql table model xx  [ERROR in 1.09s]
...
03:43:47  Finished running 99 view models, 59 table models, 1 hook in 0 hours 6 minutes and 47.45 seconds (407.45s).
03:43:47
03:43:47  Completed with 1 error and 0 warnings:
03:43:47
03:43:47    Runtime Error in model xx (models/path/to/xx.sql)
  Runtime Error
    ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
03:43:47

Hmm, this is very strange, as it indicates the connection was actively broken; I don't think we have retry in that circumstance, but we file a bug against databricks-sql-connector to remedy that.  Does this happen often?  If so, I would file a ticket with Databricks to understand why you're getting disconnected.

Happened a couple of times in July, and tonight actually.
There is no entry in the query history, so I am assuming the query does not even get provisioned in the SQL engine.
It has been the same model each time which is strange. It has very simple logic so I am thinking it could be due to execution timing.
Maybe it is due to parallelism. I see in the dbt log that 7 models are starting at the same time (same second).  We run dbt in 7 threads on a 6 DBU serverless cluster.
Could be that the request sometimes is not queued properly or that we are exceeding some API rate limit?
I will file a support ticket to investigate this further.
Nevertheless, it would be nice with an auto retry :-).
I am considering to add a dbt retry task after dbt run in case it fails.

Would you mind filing against https://github.com/databricks/databricks-sql-python?  Basically explain that we don't retry when we get 'Remote end closed connection without response', but that it should be safe to do so?  In that package we aim to retry safe commands, i.e. ones that either are idempotent or that we know the server didn't receive, but in this case we have evidence that getting this response means the server didn't receive or otherwise that no action was taken.  I will also take into consideration some version of model retry, but do not have capacity to explore right now.

Ok. I filed a new issue.
https://github.com/databricks/databricks-sql-python/issues/433

I created a ticket with Microsoft to check if anything was going on server side that would cut the connection.
They consulted with the Databricks engineering team, and they found that it occurs when connections are reused after being idle for more than 180 seconds.
A max idle change is included in dbt-databricks version 1.7.14 that address the problem. We were using 1.7.10 at the time.

I can validate that we have not seen this issue since pinning to dbt-databricks == 1.8.5

also, I have been using 1.7.16 and its been good! 👍

we bumped dbt-databricks to 1.7.16 and it did not get rid of this issue.


Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'addAlgoliaAgent')

Description
When I try to focus in or start typing in the search box, the suggestion box doesn't appear and always shows this error

Reproduction
I use jquery and this is the way I initialize the autocomplete:

Environment

OS: macOS
Browser: Chrome
Autocomplete version: 1.7.3

why did you pass _searchClient instead of searchClient: _searchClient?

I just followed the example and got the wrong, and your answer is solved my issue, thanks


Unclear upgrade instructions for Log Encoding

Description
Observed Behavior:
The 0.32.0 upgrade guide mentions changes to log encoding:

The default log encoding changed from console to json. If you were previously not setting the type of log encoding, this default will change with the helm chart. If you were setting the value through logEncoding, this value will continue to work until v0.33.x but it is deprecated in favor of logConfig.logEncoding

However in 0.33.0 the logConfig.logEncoding helm value has no effect. Searching the repo doesn't show any usage of this value in chart templates
If support for changing the log encoding is intentionally removed, the guide should state as such.  Otherwise the templates arent using the value. I see the env var for LOG_LEVEL but nothing for log encoding so I'm not sure how it the chart would use the value.
Expected Behavior:
logConfig.logEncoding helm value affects the pod's log encoding
Reproduction Steps (Please include YAML):
helm template karpenter oci://public.ecr.aws/karpenter/karpenter --version v0.33.0 --set logConfig.logEncoding=foobar | grep foobar
Versions:

Chart Version: v0.33.0
Kubernetes Version (kubectl version): 1.28.0

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Anything in the logConfig section is deployed or not deployed through --set logConfig.enabled. There's mention that this value changed in v0.33.x here: https://karpenter.sh/docs/upgrading/upgrade-guide/#:~:text=v0.33.x drops looking,Guide for more details.

@jonathan-innis  Can I also get clarification?

0.31 -> 0.32: change to logConfig
0.32 -> 0.33: logConfig is now deprecated, use logLevel instead

What's the right way to configure outpath paths as logLevel only controls the severity of the messages outputted? I am using the helm chart to install Karpenter and its CRDs.

What's the right way to configure outpath paths as logLevel only controls the severity of the messages outputted? I am using the helm chart to install Karpenter and its CRDs

We're dropped the majority of the log configuration directly supported by Karpenter since the general stance that we have is that we surfaced too much logging configuration through the Zap config originally and are pulling back to take a more opinionated stance on how logs should be output.
You can still configure the output paths and error output paths through the logConfig.outputPaths and logConfig.errorOutputPaths repspectively.
How do you have this configured on your side that's different than the default?

You can still configure the output paths and error output paths through the logConfig.outputPaths and logConfig.errorOutputPaths repspectively.

but isn't using logConfig deprecated as I've linked above? is there a replacement for it yet?

is there a replacement for it yet

No, there's no replacement for it. In general, we looked across the project landscape and didn't see a ton of utility to supporting all of the API surface that Zap logger was directly supporting. Much of the logging config that they were supporting could likewise be supported in the log scraper or log aggregator.
We'd be open to considering additional API surface moving forward on a one-off basis, but (at least for tracking) it would be best if you opened a separate feature ask to return one of these fields. It'd be good to layout the reasons why you want the field back and the limitations that you are running into with the lack of proposed support around it.

No, I only wanted clarification on how to configure logging on 0.33.0 properly given the changes I mentioned earlier.
I'm still using logConfig.outputPaths and logConfig.errorOutputPaths since the 0.32.0 upgrade.

No, I only wanted clarification on how to configure logging on 0.33.0 properly given the changes I mentioned earlier

Unless you have explicit need, I would move away from using the logConfig and only set the --log-level on the karpenter controller, let karpenter handle the rest. If there are particular features that you need that are only supported in the logConfig, that's where I'd recommend that you open an issue.
Hope that helps 👍🏼

Understood 👍🏼
Yeah, we need still logConfig to forward logs. Fargate Fluent Bit doesn't support Loki yet (https://github.com/aws/containers-roadmap/issues/1242)

Got it, yeah. This is the type of feedback we are looking for to understand which configuration parameters need to be supported long-term and are actually critical to everyone else trying to run Karpenter.
It would be enormously helpful if you could open an issue for this as a feature request, ref-ing out the issue that you just referenced here so that we can track and consider this as we go to v1.


Is there a way to directly persist data into the target table instead of using an intermediate import table?

Hello,
I would like to know if there is a possibility for us, the users of the bundle, to change the way imports are managed into the database? Typically, instead of creating an import table with all the columns corresponding to the target table in addition to information related to the file and the state of the import, and then inserting the data there for the target table to later retrieve the saved data from the import table, I would like to persist the data directly into the target table and leave the import table to record important import information (path, error, number of lines, etc.). This approach is simpler and allows me to have a better overview of all imports performed on each table.
Thank you in advance for your response.
Sami

Hello,
We use a two-step import for several reasons:

You can add custom validation via an event subscriber after data is loaded in the temporary table;
Any issue with initial load would leave the temporary table in a broken state which is not something you want on the final target table;
Load uses COPY FROM (https://www.postgresql.org/docs/current/sql-copy.html) which is very fast but doesn't allow setting any conflict target.

Error recording is not in the scope of this bundle: you can use an event subscriber for that (to send an email or log in a table for example). Basic error information is already logged with a monolog Logger as well as other import steps.


[Bug] panic on interface conversion when using the verbose log option

Problem Description
When spinning up butterfish with the verbose option, such as:

butterfish shell -u 'http://localhost:8080/v1' -m llama3-8b-instruct -v -A

We land with a stacktrace from the logging mechanism it appears.  Output reformatted for readability:
 projects % butterfish shell -u 'http://localhost:8080/v1' -m llama3-8b-instruct -v -A
Logging to /var/tmp/butterfish.log
 projects % PS1=$'%{\033Q%}'$PS1$'🐠%{ %?\033R%} '
 projects % 🐠 cd scratchpad
 scratchpad % 🐠 Hi.
panic: interface conversion: interface {} is []string, not string
goroutine 11 [running]:
github.com/bakks/butterfish/butterfish.LogCompletionRequest({{0x14000176d80, 0x12}, {0x104f54d60, 0x1400000f710}, {0x0, 0x0}, 0x800, 0x3f333333, 0x0, 0x0, ...}) /Users/skarbek/projects/pkg/mod/github.com/bakks/butterfish@v0.2.13/butterfish/gpt.go:120 +0x188
github.com/bakks/butterfish/butterfish.(*GPT).InstructCompletionStream(0x1400006a120, 0x140001b6fd0, {0x1050687a8, 0x140000afb00}) /Users/skarbek/projects/pkg/mod/github.com/bakks/butterfish@v0.2.13/butterfish/gpt.go:402 +0x120
github.com/bakks/butterfish/butterfish.(*GPT).CompletionStream(0x1400006a120, 0x140001b6fd0, {0x1050687a8, 0x140000afb00}) /Users/skarbek/projects/pkg/mod/github.com/bakks/butterfish@v0.2.13/butterfish/gpt.go:366 +0x134
github.com/bakks/butterfish/butterfish.CompletionRoutine(0x140001b6fd0, {0x10506ccb8, 0x1400006a120}, {0x1050687a8, 0x140000afb00}, 0x1400002a360, {0x104d0bdcb?, 0x1045220b8?}, {0x104d0bde1, 0xb}, ...) /Users/skarbek/projects/pkg/mod/github.com/bakks/butterfish@v0.2.13/butterfish/shell.go:1732 +0xa4
  created by github.com/bakks/butterfish/butterfish.(*ShellState).SendPrompt in goroutine 1 /Users/skarbek/projects/pkg/mod/github.com/bakks/butterfish@v0.2.13/butterfish/shell.go:1715 +0x43c

Thanks for bug report, will take a look. Anything i need to know about how you're running llama? (curious in general for your setup)

Hey @bakks!  I feel like I'm late to the AI party.  So there could be something incorrect with my configuration or setup, but I'm learning and exploring.
Currently I'm running https://github.com/mudler/LocalAI ...locally.  I am using their local build option documented here in order to take full advantage of the M2 chip of my workstation.  Other than that, pretty basic.  I forget how I landed on the model that I chose.
Butterfish appears to play quite nicely with it overall.

Ok this should be fixed by 129ced22398f2e1aa22109884a1f14b7c520f064, please try it out.
Some FYI details -- I was a little confused here because I didn't expect you to be on the code path where you saw that error. Because the model you're using has an -instruct suffix, that mean butterfish is sending a request to /completions rather than /chat/completions on your localai server. This is hardcoded based on the OpenAI interface. I was surprised this is working at all 😃. But looking closer, it is working but it's not actually sending the system prompt when you do a shell prompt, so the completions may be lower quality than you would get otherwise. Maybe try it with a model not suffixed with -instruct and see if it's different.
Also btw if you're so inclined, if you want to write some instructions on making butterfish work with LocalAI i would love to merge and include that in the readme, I think it would help out other people. I haven't had time to look at this closely.

@bakks

Ok this should be fixed by https://github.com/bakks/butterfish/commit/129ced22398f2e1aa22109884a1f14b7c520f064, please try it out. I will cut a new release soon.

This indeed works now!

Maybe try it with a model not suffixed with -instruct and see if it's different.

These are some of the many things I'm still learning at the moment.

...if you want to write some instructions on making butterfish work with LocalAI...

Certainly will!

You appear to fix the heart of this issue, we can close this out.


Docs for deploying Cloud Foundry are stale

The docs in this repo for deploying Cloud Foundry to GCP are outdated. They may still work, but the document in cf-deployment describes an easier way to deploy to GCP, and it's supported by the Infrastructure and RelInt teams. Would it make sense to replace the doc in this repo with a link to the one from cf-deployment?

Hey @dsabeti, the cf-deployment repo looks awesome. We bolted on a lot of docs back when the CPI started simply because they didn't exist anywhere else, and I'd love to start unbolting that stuff and letting it live where it makes sense. Would you say that cf-deployment is the official (to the extent that anything is official) way to do a deployment of CF to GCP?
@mrdavidlaing and @johnsonj are the other two folks who have contributed to the CF docs in the CPI. Are you fellas OK with the idea of linking out to the cf-deployment docs @dsabeti mentions?

Hey @evandbrown. It's definitely the supported way to deploy to GCP and it works pretty well, but we're still advertising cf-deployment as not quite prod-ready. I'd say as long as you provide that caveat it should be fine.


What is the Unit of Measurement used for x and y coordinates?

Hello,
I'm coming over from pdfkit where the UOM for x and y coordinates are Points. I can't find anywhere in the documentation what UOM is used in this library. It does not appear to be Points because when I port over my code, the text is not plotted where I expect it to be.
Also, is there a way to specify the margin applied to pages? I would like specify 0 margin all around.
Thank you for your time.
Vincent

Sorry, I just found this answer in one of your closed issues. Weird that it seems to use the same UOM as pdfkit but my data is plotting differently in pdf-lib.
https://github.com/Hopding/pdf-lib/issues/19#issuecomment-412275915

OK, I figured it out. The x coordinate was fine. I had to use height - y coordinate to get it where I wanted on the page.

Hello @VinnyV88!
Glad you were able to get this working!


WIP: macOS module support & Android Library Support

Changes
This is a WIP PR (as we needed the fixes for our processes), as I didn't have enough time to go through the checklist and Windows is still missing Android Library support.
So there are several changes:

Injected build script now uses exportAsGoogleAndroidProject setting and applies it correctly.
Injected build script now applies buildAppBundle  setting, if set specifically. Default remains that it's read from .aab in build path filename. This enables the setting to be applied while exporting the project.
If exportAsGoogleAndroidProject is enabled, filename doesn't include .aab or .apk anymore, thus giving us backwards support, otherwise the behaviour is the same as previously. Enable the setting in your workflow: exportAsGoogleAndroidProject: true
MacOS Setup now correctly installs modules for Mac, iOS, tvOS and Android, which allows you to perform all of those builds (for some reason, Ubuntu on GitHub Actions has issues building iOS projects, but Mac works, didn't look into details, but scenes are corrupted and game crashes at launch time).

Let me know your feedback and proposed changes. I'll also need help with testing, as we don't use Ubuntu machines much. Use<EMAIL_ADDRESS>to test the action.
Checklist

[x] Read the contribution guide and accept the code of conduct
[ ] Readme (updated or not needed)
[ ] Tests (added, updated or not needed)

Is this something you intend to finish or shall we close?


Add some sort of versioning...

The only thing so far is the post-fork-baseline tag.
-> Now not even that, as it got promptly deleted for "changed my mind" reasons. :)

Well, sfw-0.1.0 and a corresponding "release" now exists as a stable baseline.


I2C refactoring breaks ENV IV unit

Hello M5Stack engineers
the recent I2C refactoring (machine_i2c.c) in UIFlow v2.0.8 seems to break the ENV IV unit.
Please see this post.
BTW: Compiling my own UIFlow v2.0.8 firmware for M5Dial, but replacing machine_i2c.c with the previous version from here makes the ENV IV unit work again.
Thanks
Felix

@felmue Processing.

@felmue This issue was resolved in 2.0.9.

Hello @lbuque
thank you for fixing the issue. I just ran a test with M5Dial and ENV IV and I can confirm v2.0.9 fixes the issue.
Thanks
Felix

Im facing same issue with CoreS3 and ENV IV with v2.0.9.

Hello @BitcoinRaven
I cannot recreate the issue you are seeing. I tested with M5CoreS3 (UIFlow firmware v2.0.9) and ENV IV and it works for me.

What is the error you are getting?

Thanks
Felix


ADAP-845: Update BaseAdapter to meet mypy standards

resolves #8396
Problem
mypy throws a lot of warnings that should be addressed.
Solution
Address the warnings by adding/updating types, checking types in code, or moving abstract methods towards the base class.
Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Looks good! Amazing how many changes were required just by adding a return type...

More than half of them were the protocol that you identified. I replaced it with the actual class (ConnectionManager). We can fix the protocol later since the only thing it specified was TYPE, which as you described it, was not very useful. I didn't need to import any new modules, just a new class from an existing module, so no concern for circular references.


"prereqs" dependency is missing from the "build" rule in the Makefile

What this PR does / why we need it:
'make build' does not complete cleanly without manual intervention
pkg/acsengine/fileloader.go:3: running "go-bindata": exec: "go-bindata": executable file not found in $PATH
The 'prereqs' dependency is missing from the 'build' rule.
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
https://github.com/Azure/acs-engine/issues/880
Special notes for your reviewer:
Release note:

This change is

@jsilberm,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

GTG?

Tried to make everything easier and more consistent by updating the acsengine.md file to reflect the simplicity.   Less is more.

cc: @colemickens

@rjtsdl @seanknox :  I would humbly suggest that your review orientation and reference should be external rather than MS internal/CI.   If you're trying to encourage acs-engine adoption, you should try to bias towards simplicity.   As a contributor, I'm less interested in internal CI and more interested in using the product as quickly as possible.  (I've hit this problem a number of times, otherwise I wouldn't have opened the PR).   Thanks.

Hi @jsilberm, I hear you and @rjtsdl is correct, though let me attempt to explain a bit more why developer bootstrapping is viewed as a one off task.

Project dependencies (via glide) due not change very often.
As a developer, I want to minimal number of things to run when building the project (speed).

That's why we don't run to attempt to re-install developer dependencies every time on make build. You should be able run make prereqs once and start using the project.


Filter evidences by a list of enabled target biotypes

The list of current biotypes Ensembl returns
"3prime_overlapping_ncRNA"
"antisense"
"bidirectional_promoter_lncRNA"
"IG_C_gene"
"IG_C_pseudogene"
"IG_D_gene"
"IG_J_gene"
"IG_J_pseudogene"
"IG_pseudogene"
"IG_V_gene"
"IG_V_pseudogene"
"lincRNA"
"macro_lncRNA"
"miRNA"
"misc_RNA"
"Mt_rRNA"
"Mt_tRNA"
"non_coding"
"polymorphic_pseudogene"
"processed_pseudogene"
"processed_transcript"
"protein_coding"
"pseudogene"
"ribozyme"
"rRNA"
"rRNA_pseudogene"
"scaRNA"
"scRNA"
"sense_intronic"
"sense_overlapping"
"snoRNA"
"snRNA"
"sRNA"
"TEC"
"transcribed_processed_pseudogene"
"transcribed_unitary_pseudogene"
"transcribed_unprocessed_pseudogene"
"translated_processed_pseudogene"
"TR_C_gene"
"TR_D_gene"
"TR_J_gene"
"TR_J_pseudogene"
"TR_V_gene"
"TR_V_pseudogene"
"unitary_pseudogene"
"unprocessed_pseudogene"
"vaultRNA"

This feature has to be

Setting a dictionary of data-sources as keys with a list of excluded bio-types as values on the Settings.py
If not passing fixing process in Validation step then it has to be reported as failed evidence with the reason (excluded bio-type)

the curated list of biotypes to exclude for expression_atlas evidences
"IG_C_pseudogene"
"IG_J_pseudogene"
"IG_pseudogene"
"IG_V_pseudogene"
"polymorphic_pseudogene"
"processed_pseudogene"
"pseudogene"
"rRNA"
"rRNA_pseudogene"
"snoRNA"
"snRNA"
"transcribed_processed_pseudogene"
"transcribed_unitary_pseudogene"
"transcribed_unprocessed_pseudogene"
"TR_J_pseudogene"
"TR_V_pseudogene"
"unitary_pseudogene"
"unprocessed_pseudogene"


Add fromBuilder once bytestring >= 0.10 is included in Debian stable

I'm opening this issue in order to not forget about the changes depending on the bytestring upgrade in Debian stable: https://github.com/jdnavarro/Haskell-Pipes-ByteString-Library
Meanwhile, I'll try to keep rebasing that branch with further changes introduced in HEAD.

I notice that the streaming-commons library has devices for dealing with streams of builders -- with a little class that covers both blaze and bytestring builders, here.
I made a little module to apply it. It is much simpler than the corresponding conduit module
I think, by the way, that streaming-commons doesn't presuppose a recent bytestring -- it seems it is supposed to pull in the bytestring-builder package if you have a pre-builder bytestring. On the other hand streaming-commons presupposes things like zlib and blaze, so it is probably not sensible to try to include something like a Pipes.ByteString.Builder, written this way, in pipes-bytestring
Here's a little test module that uses it:
{-#LANGUAGE OverloadedStrings #-}

import Pipes
import qualified Pipes.ByteString as PB
import Pipes.ByteString.Builder (fromBuilders)
import Data.ByteString (ByteString)
import Data.ByteString.Builder
import Data.Streaming.ByteString.Builder.Class
import Data.Monoid
import System.Environment

main :: IO ()
main = do
  xs <- getArgs
  case xs of
    []        -> runEffect $ builders    1000000 >-> PB.stdout
    ('x':_):_ -> runEffect $ bytes       1000000 >-> PB.stdout
    _         -> runEffect $ viaBuilders 1000000 >-> PB.stdout

builders :: MonadIO m => Int -> Producer ByteString m ()
builders n = fromBuilders defaultStrategy (loop n)
  where
  yn = char8 'y' <> char8 '\n'
  loop 0 = return ()
  loop n = yield yn >> loop (n-1)

bytes :: Monad m => Int -> Producer ByteString m ()
bytes = loop
  where
  yn = "y\n"
  loop 0 = return ()
  loop n = yield  yn >> loop (n-1)

viaBuilders n  = fromBuilders defaultStrategy builders_
  where builders_ = for (bytes n) (yield . byteString)

-- $ time ./pipebuilder  >> /dev/null
-- real	0m2.005s
-- $ time ./pipebuilder x >> /dev/null
-- real	0m0.565s
-- $ time ./pipebuilder y >> /dev/null
-- real 0m2.135s

-- $ time ./pipebuilder
-- real	0m6.689s
-- $ time ./pipebuilder x
-- real	0m14.472s
-- time ./pipebuilder y
-- real	0m7.081s

The builder routes is somewhat slower (0m0.234s vs 0m0.191s) if pipe the output to /dev/null.  But they are both much faster (0m2.153s vs 0m4.736s) if I just let it spill into my (os x) terminal, where some opaque buffering nonsense is at work. They also uses much less cpu as it goes along, just looking at 'top' ; this doesn't change if the number of lines is increased, whereas sending all the little bytestrings directly to stdout tends to become pathological at a certain point.

Sorry, I forgot to link the draft helper module I was talking about https://github.com/michaelt/pipes-builder/blob/master/Pipes/ByteString/Builder.hs

Yeah, so we can merge in all the Builder stuff now if you want

The current version of bytestring in Debian Jessie is <IP_ADDRESS> which includes the Builder module. I guess we can safely increase the lower version bounds for bytestring.

Yeah, you can definitely increase the lower bounds now

Does it make sense to merge my previous fromBuilder function? I think having just @michaelt implementation is better for a clean Builder API.

Alright, we can merge @michaelt 's code

Sorry, I saw this when I was abroad. My thought was that the streaming-commons dependency would be too much. If not, I will prepare a proper patch; streaming-commons is in any case a meritorious library. I could also try to reason the matter out and inline something more specialized; but on the other hand, one would prefer that bug-control be in the hands of streaming-commons.


Sidebar alignment in Safari

As can be seen in #100 there seems to be an issue with sidebar tabs in Safari.

I think it happens because Safari handles the height of rotated elements a bit differently. This fixes the problem and seems to be working with others.

This change will break the side bars for other browsers.

Well I just checked it out in safari technology preview and it appears to be fixed there 🎈.

The unmodified JLab is fixed in the safari tech preview?


Title above example for alert does not present the title above

Summary of the bug
In the code examples, the title above example for alert doesn't show the title above the message, they're still on the same line.
🪜 How to reproduce
Tell us the steps to reproduce the problem:

Go to page: Alert
Click on: Code
Scroll to title above
See the error

🧐 Expected behaviour
The title should show above the message.
📸 Screenshots or code

A wider fix for this work needs to be explored and later fixed.


can not open wechat link!

🐛 Describe the bug
I have used my VPN, so I can open this github page, but it can not load the picture, also can not load the wechat link! The lookings like below:

Environment
No response

Hi @Arsmart123 This should be caused by your personal VPN's poor support for GitHub.
Our global team has used many devices to access it from different network environments, and this problem has not yet occurred.
I just tested it again, and the page displays fine.


feat(storage): support flush as non-overlapping-level

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
Merged after https://github.com/risingwavelabs/risingwave/pull/9750
Background
In our system, we must flush sstable files to overlapping-level and then compact them again to non-overlapping level. But if the size of one overlapping-level  is large enough, it is not necessary to compact them again.
There is a compaction-size-limit in l0 compaction picker, and the value of it is usual set 128MB (which is the size limit of sub-level).  It means that if the size of a just flushed sub-level exceed 128MB, we can not compact it with other sub-level. We must compact it single just to make it to non-overlapping-level.
If we found that all sstables flushed in this group are sorted and not overlap with each other, we can mark this sub-level as non-overlapping directly to avoid once compact.
Checklist For Contributors

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
[ ] All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

[ ] I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

[ ] My PR DOES NOT contain user-facing changes.

Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.

Installation and deployment
Connector (sources & sinks)
SQL commands, functions, and operators
RisingWave cluster configuration changes
Other (please specify in the release note below)

Release note

main branch:

this PR:


ENH: make method updates augment rather than overwrite

Addresses #130

I like this approach, simplifies the code as well. Maybe add some tests of the base update_subtraits method to verify it is doing the right thing?

Tests added

Looks good, merging. Thanks!


laradock_workspace_1 exited with code 0

env
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion:   15F34

$ docker --version
Docker version 1.13.0-rc3, build 4d92237

$ docker-compose --version
docker-compose version 1.9.0, build 2585387

steps
$ git clone https://github.com/Porto-SAP/Hello-API && cd Hello-API
$ cp .env{.example,} # Set DB_HOST to mysql and REDIS_HOST to redis
$ git submodule add https://github.com/LaraDock/laradock.git
$ docker-compose up -d nginx mysql redis

$ docker-compose ps
         Name                        Command               State                      Ports
--------------------------------------------------------------------------------------------------------------
laradock_applications_1   /true                            Exit 0
laradock_mysql_1          docker-entrypoint.sh mysql ...   Up       <IP_ADDRESS>:3306->3306/tcp
laradock_nginx_1          nginx                            Up       <IP_ADDRESS>:443->443/tcp, <IP_ADDRESS>:80->80/tcp
laradock_php-fpm_1        php-fpm                          Up       9000/tcp
laradock_redis_1          docker-entrypoint.sh redis ...   Up       <IP_ADDRESS>:6379->6379/tcp
laradock_workspace_1      /bin/sh -c #(nop) WORKDIR  ...   Exit 0

$ docker-compose up workspace
Starting laradock_applications_1
Starting laradock_workspace_1
Attaching to laradock_workspace_1
laradock_workspace_1 exited with code 0

verbose:  http://pastebin.com/1nWbHE7f
logs: http://pastebin.com/CASvGq7v

@twlz0ne I see your Docker Version is 1.13.0-rc3, please move to the stable build.

1.12.3 worked.

Awesome, closing this.

His guys I have this issue, this is my second app and the first the laradock_workspace_1 is executing well. Bu my second app drops me the following :
laradock_mysql_1       docker-entrypoint.sh mysqld     Up       <IP_ADDRESS>:3306->3306/tcp laradock_nginx_1       nginx                           Up       <IP_ADDRESS>:443->443/tcp, <IP_ADDRESS>:80->80/tcp, 8080/tcp laradock_php-fpm_1     docker-php-entrypoint php-fpm   Up       9000/tcp laradock_workspace_1   /sbin/my_init                   Exit 0
This is weird and I dont any have idea why could be happening. Thanks guys in advance


Build docker container for all ADL tools

We've starting experimenting with multiple ADLs (#387, #346). I've been playing with flopoco and @gabizon103 has been using XLS. We should build a docker container to make it easy to set up these tools so that we can start playing with the gen framework. @UnsignedByte's Dockerfile is a good starting point for this.
For now, we want to:

[x] Install flopoco. We should probably use the bleeding-edge version because the last tagged release is 6 years old and has problems in the way it generates VHDL
[x] Install ghdl so that flopoco-generated modules can be converted into Verilog code
[ ] Install xls so we can play with generated modules

This has been added in #387 and published (manually) here: https://github.com/cucapra/filament/pkgs/container/filament-apps.

subsumed by #405


Please! There're any chance to publish releases rather than only tags

Hi,
Just want to know if there are any plan to publish releases rather then the tags, thanks!

I see you made the same issue across multiple repositories:

https://github.com/microsoft/vscode-emmet-helper/issues/66
https://github.com/microsoft/vscode-css-languageservice/issues/280
https://github.com/microsoft/vscode/issues/154138 (although in this case there actually are GitHub releases)

Why are you so interested in releases? Perhaps what you actually want is a changelog?

The published releases are on NPM (see https://www.npmjs.com/package/vscode-jsonrpc and co). I don't have any plans to published releases on GitHub .
Can you explain why the npm releases are not sufficient. The code of this repository can only be consumed via npm packages.
And a changelog exists in place in the readme. See https://github.com/microsoft/vscode-languageserver-node/blob/main/README.md


Added encoding parameter to initializer.

Updated to fix unit tests.  I added the UTF8 default to the convenience initializer, but the base initializer requires it to be specified.

@dbowen Thank you for PR! I want to keep the signature of the convenience initializer. Even if you add a default value for the encoding parameter, the completion for the initializer includes the parameter. So the default value should be given in the initializer, and the signature should be kept.

No problem.  I updated it to include a second convenience initializer to support encoding options so your original one maintains the same signature as before.

LGTM! :+1:


OpenCompare Chrome extension

So far it works quite well and the visualization/filtering tools are killer features.
Unfortunately it is very hard to save a matrix, or at least I don't get how it works.
I tried to change the "title" but it seems not working.
the deleteAfterLoad=true is quite strange
I have tried here for instance:
http://www.computerchess.org.uk/ccrl/4040/cgi/compare_engines.cgi?class=All+engines&only_best_in_class=1&print=Ponder+hit+table&table_size=100&match_length=30&cross_tables_for_best_versions_only=1&sort_tables=by+rating

Yes, it is a known issue. "Open in OpenCompare" needs its own method to allow saving. The "delete after loaded" comes from the fact That we save the pcm in database to load it from extension and because we don t want to keep it, it is destroyed when loaded. The id is already set but the database instance is destroyed, That s why we can t save. It should nt be too hard to fix

Thanks for the comment Hugo. We will fix it ASAP

I modified how the extensions and the OpenCompare API work when importing HTML.
Now, the PCM is not saved during the import but the user can save it afterwards in the editor.


Evil Deads

Adds functions for looking up resources and security group routables within a template.
Added function for building template from security group routable, removed .template on a routable
Changed automatic naming of subnets to manual to support using above functions.
Updated tests
Bumped Version

Looks good to me, CFTG passes tests for me, CFTG publishLocal + microservices-vpc tests pass, template copied to stax-int passes stax check tests


iOS build failed

Please test your issue using the example project then open a new issue completing the issue template in full.


Add BitToggleButton demo on the Button demo page

This issue is based on issue #278

please provide a separate demo page for each component.


Adding more control to output generation

Currently I encountered two problems that are caused by current design:

Generated members always are nested in parent's namespace. Sometimes it's good, sometimes it's not required.
Generated members always are placed in same assembly where attribute is declared. Again, sometimes it's good, sometimes it's not required.

I propose to add more customisation here. I think ICodeGenerator have to provide somehow information if it want inherit ancestor's usings/namespace or it doesn't and information about path where it want to be stored:
Task<GenerationResult> GenerateAsync(TransformationContext context, IProgress<Diagnostic> progress, CancellationToken cancellationToken);

public class GenerationResult
{
   SyntaxList<MemberDeclarationSyntax> GeneratedMembers { get; }
   string DestinationProjectDirectoryFullPath { get; }
   bool IsNestedInAncestor { get; }
}

It's just an idea, I don't really like how it looks now, but we may invent something better.
Use case: I have an attribute in a class in an assembly foo with multiple dependency, for example, ASP.Net. But I obviosly won't use it in my generator, so I don't want these dependencies. I can create assembly foo.generated without any dependency and store generation results there.
I can try to implement it if you agree that we need this feature and we can merge it in master. It's a bit more complicated than other changes and require some API rework, so I don't want to spend several days to get I cannot afford merging it, it completly ruins my design :)

Thanks for checking first. I need to mull this over a bit before advising you to proceed.
The most concern comes from creating an entirely new assembly for the generated. That is rather non-trivial because it turns out there are lots of concerns that spring up when you do that, like satellite assemblies, signing, added references, etc. I don't think I want to go there without at least one more use case from someone else to justify it. But I do appreciate you offering to do the work.
As for the ability to generate members in another namespace, that sounds like a bad idea in general, but for specific use cases may be perfectly legit (for example, if you're writing a generator specialized for your own purposes rather than for general reuse). I would accept a PR that makes this possible. And I like how your proposed design will allow for enhancements in the future in the generation result without breaking changes to existing generators (although this one itself will be a breaking change).

@AArnott completly different assembly may led to other multiple problems (such as how to reference it?). I think empty assembly for generated classes is quite OK. You can sign it, add versioning, and so on, using common flow. Implementing it as result of generation may be complicated and unwanted.

If code generation produces an assembly the signing has to be determined up front. As does most other aspects of it like versioning. My answer for extra assembly is no.

@AArnott I agree, this is what i have written :) But ability to choose project where cs is injected in is useful.

Sorry, I misunderstood your argument then.
So you want to generate code into another project (not the one that is currently building)? That sounds rather complicated on the CG.R side, and would require careful build scheduling as well, up-to-date checks, etc. I still feel like we need more than one user who needs it to justify the added complexity all around.

@AArnott in my case it's just practice: I want to generate some client for some API. This client is only using some http libraries while server side may contain tens of dependencies, such as performance counters for services/winapi calls/filesystem logging and so on... I want my client to be generated based on service's API, but really want it to be in an independent assembly. It works fine with WCF, where I can declare service contracts in one assembly and then implement them in this assembly with dependencies (and have my clients generated in this interface assembly), but it's not this cool with ASP.Net which doesn't have thing like routings on interfaces, so I have to work with actual classes.
I agree that it's complicated (a bit), but I just can't proceed further until it's done. So i'd better help you with implementing this rather than... I don't know... Implement my own mini-framework on top of ASP.Net to make attributes inherited from interfaces and move on WCF track :)

Interesting scenario. I just happened to notice this earlier today. Have you seen it? Might that fill your need?
https://github.com/paulcbetts/refit#refit-the-automatic-type-safe-rest-library-for-net-core-xamarin-and-net

@AArnott it looks more like my old version based on reflection and runtime generation. But my approach is different a bit. However, you are right that my pet project is targeting the same issue. But it's beside the point :) They are fine for same reason why my old RemoteClient was fine - it gets generated in dynamic assembly without dependencies and can easily be referenced from anywhere. However, with Roslyn we have to place .cs in project at compile time, and this is why we are using it: we may want to look on generated code, modify it in some other tricky way or whatever. We just have to place it in different project, and generation tool can easily read this intent from attributes and react accordinly.
About my needs: I don't need it right now so I can wait until I write it the way I suppose being better.

If we do support it in CG.R, I think the attributes must appear where the code will be injected. Could you work with that design? For example, in the 'other' project, you add:
[assembly: GenerateCodeForWebService(uriOrAssemblyName)]`

And that triggers your code generation, which loads your assembly to look at the webapi calls and then generates code in this project?

@AArnott interesting idea. Now it's my time to to mull this over a bit :)

@AArnott well, now I think that it may work, but not really elegant. Because if we change interface and rebuild it, dependend project won't know about it. So for example we have a project A, A.Clients and B.
B is referencing A.Clients. Now we rebuild project A. Interface gets updated but now we are getting erros in A.Clients that clients do not implement required interfaces. Now we have to rebuild A.Clients and finally get proper erros from B that now have to update usages of service.
And thinking logically, these clients are artifatcts of generating project A. They have to be stored in project A.Clients, but it's another story. In a nutshell generated classes belongs to A even if they are stored somewhere else. So they have to be generated when A is generated.
Your way is better when we just can't modify source code of these interfaces, but in this case we don't need this generation tool, it's useful when interface is changing frequently, and in this case it's frozen for centuries.

If A.Clients.dll contains the generated code, I think you should have an A.Clients.csproj responsible for generating that code. And folks consuming the generated code in other assemblies should reference A.Client.csproj.
Then if A ever changes, when you rebuild a consuming project, A.Clients also gets rebuilt and the interface updated. Why doesn't that solve the problem?

@AArnott if we can force A.Clients to rebuild then it's ok. But i'm not sure if it's possible via targets.

If a consuming project references A.Clients.csproj, msbuild will build it. The incremental build nature of A.Clients.csproj can be modified fairly easily if necessary to ensure that when A.dll changes, A.clients.csproj builds a new dll.

Sounds reasonable.

#80 resolved the first part at least (controlling namespace/type ancestry of generated code), possibly closing this issue.

I'm going to close this based on the part that is fulfilled. I think the rest of it won't get done since generating code in another assembly besides the one that applies the generator attributes is pretty far outside the scope of this project.

@AArnott well, I see that that would be weird. But this requirement was because we could have build-time dependency only, e.g. build some code based on server libraries without requiring them at runtime. For example, if we are generating some REST client based on server description we don't want to have any dependencies at all. But we need to have some dependency to make it possible to reflect it.
That probably could be solved via private assets, but I'm not sure though.

Yes, a PrivateAssets="all" attribute on your reference makes it a build-time only dependency (assuming you don't then create a runtime dependency within your code on it).
If you want to generate code in one project based on another project, that simply seems like another effort other than what this CodeGeneration.Roslyn project's scope is.


Support user account_host and check if blob size exists

Adlfs spec has the hostname with "blob.core.windows.net" but all the URLs that we access might not have the same extension in the host, it will be helpful if we can provide an ability to accept the URL host from the user.
We are checking the blob size here but we are seeing the error as the "size" parameter is not found. In order to overcome this, we can check if the size attribute exists and then check the size value.

Created pull request for this issue: https://github.com/fsspec/adlfs/pull/341


[Feature Request] Intercepting qos1/qos2/internal messages published to subscribers

Hi andsel. i'm trying to use moquette broker with an embedded form in my web application, and want to use InterceptHandler to trace every published message (trace message posted by the client and message received by the client, and so forth).
In InterceptHandler#onPublish I can do the above, but I have no idea which clients the message published to. So I add a new method onPublishedToSubscriber which will be called on qos1/qos2/internal messages published in BrokerInterceptor#notifyPublishedToSubscriber.
How do you think of this implementation? Any better suggestions? Thanks.

No more applicable in v0.12 due to heavy restructure


ConfigurableDevice accuracy

Hi,
in SDK 0.16.0 there was a ConfigurableDeviceScanner and it was possible to computeAccuracy or computeProximity from "ConfigurableDevicesScanner.ScanResultItem".
Now in 1.4.0 there is no ConfigurableDeviceScanner and we have  to use ConfigurableDeviceListener from BeaconManager.

There is no possibility to computeAccuracy/ Proximity from ConfigurableDevice.
If I use computeAccuracy(rssi, txPower), then I get huge values like: rssi = -59; txPower = -12; computeAccuracy =<PHONE_NUMBER>5227437

Is there a possibility to get the accuracy and proximity from ConfigurableDevice?

In 0.16.0 in ConfigurableDeviceScanner, it was possible to filter the devices with "setOwnDevicesFiltering(true);"

How can I do it in 1.4.0?

Please do not do this. Some of the devices do not advertise measured power and it won't be possible to calculate accuracy (that is why you are getting huge numbers.
ConfigurableDevice is intended to be used to configure device, not to provide proximity/location.
See discussion:
https://forums.estimote.com/t/configurabledeviceslistener-question/7550