proposal: Go 2: sealed types

Related: #43123, #28987, #28939
Problems
This proposal aims to solve two problems:

Some types require instantiation with constructor, whether it is to set private fields, or initialize certain fields which may make the structure not very useful (ie nil maps).
Some types are meant to act as an enum, especially those which are declared via iota. Then validity of variables of these types need to be checked at runtime, when ideally these checks should never need to happen.

The issue with these both reside in the fact that types are allowed to be instantiated outside of the package in which they were declared in, allowing for the structure to have any shape. This means that some form of runtime validation must always be done.
Solution: Sealed Types
This is very similar to #43123, although it permits a few more actions to be done.
Usage
// chess/piece.go
package chess

type Piece sealed int

const (
	PieceNone Piece = iota
	PiecePawn
	PieceRook
	PieceKnight
	PieceBishop
	PieceQueen
	PieceKing
)

// engine/main.go
package main

import ".../chess"

func main() {

	var myPiece chess.Piece // legal
	myPiece = chess.PiecePawn // legal

	myPiece = 5 // illegal
	myPiece = chess.PieceRook + 1 // illegal
	myPiece = chess.PieceRook + chess.PiecePawn // illegal

}

Grammar Changes
- TypeDef = identifier Type .
+ TypeDef = identifier [ "sealed" ] Type .

Reflection considerations
A new method in reflect.Type: Sealed() bool which returns whether the type is a sealed type.
Sealed types may not be converted to via reflection (ie reflect.Convert).
reflect.Value.CanSet() bool should return false on sealed types, and on elements (ie fields, slice/array elements, or any recusive step thereof) of sealed types.
Behavior
When a Type is preceded by "sealed", this type becomes a sealed type. Inside the package that they are declared in, sealed types behave normally as any other type would. However, when used outside of the package they are declared in, values may only be created via copying, language-provided zero values, or from other packages.
Types which are based on these sealed types are not themselves sealed. For instance, consider type MyType other.PCT where other.PCT is a sealed type. MyType would not be a sealed type. However, aliases of sealed types are treated as if they were created in the other package.
This means that outside of the package that they are declared in, sealed types may not:

Be converted to

x := other.PCT(y)

Be converted from an untyped constant

var x other.PCTInt = 5

Be declared using composite literals

x := other.PCTStruct{...}

Be converted via reflection

value := reflect.Convert(value, otherPCTType)

Be used with mathematical operators

x := somePCTInt + 1
x := 5 * somePCTInt

However, even outside of the package they are declared in, sealed types may:

Be returned from a function outside of the current package

var x other.PCT = other2.ReturnsPCT()

Be copied

var x other.PCT; y := x

Be modified via an unsafe pointer

var x *myType := *myType(unsafe.Pointer(&someOtherPCT))

Be created via zero-value generation

var x other.PCT
x, _ := notOtherPCT.(other.PCT)
x, _ := stringToPCTMap["not in map"]

Be asserted to

x := myInterface.(other.PCT)
x := reflectValue.Interface().(other.PCT)

Unmarshaling considerations
Default unmarshallers should avoid unmarshalling to any sealed types which do not implement an interface some kind of Unmarshaller interface (ie: json.Unmarshal should fail for sealed types which do not implement json.Unmarshaller). This is also enforced by the fact that reflect.Value.CanSet will return false, so it's not like the encoding/json package would be able to unmarshal easily anyway.
Open questions

Struct field modification. Initially I had wanted to allow it, however it got complicated when considering that x := other.PCT{ y: 2 } is equivalent to var x other.PCT; x.y = 2. Not allowing struct field modification seemed a bit un-Go-like to me. But it seems like the best decision.

Would you consider yourself a novice, intermediate, or experienced Go programmer?

Intermediate
What other languages do you have experience with?
Java, C, Python, JavaScript, Kotlin, C#
Would this change make Go easier or harder to learn, and why?
It would make Go harder to learn. Sealed types are an additional feature that must be learned by users of a package that uses sealed types. However hopefully error messages are clear enough to teach users about sealed types.
Has this idea, or one like it, been proposed before?
Yes, in #43123
If so, how does this proposal differ?
It is a bit more permissible, as well as more details as to how some interactions with other language features work.
Who does this proposal help, and why?
This helps library writers ensure that data is valid at compile-time.
What is the proposed change?
above
Please describe as precisely as possible the change to the language.
above
What would change in the language spec?
above
Please also describe the change informally, as in a class teaching Go.
above
Is this change backward compatible?
No, it introduces a new keyword sealed. However if we do not wish to introduce this new keyword, using package instead (ie type Piece package int)
Breaking the Go 1 compatibility guarantee is a large cost and requires a large benefit.
I believe the benefit of having constructor-only types as well as compile-time enums is worth a reserved word. Although if it is decided that these features are not worth breaking Go 1 compatibility, package may be used instead (as well as phrasing in "reflect" package, etc)
Show example code before and after the change.
above
What is the cost of this proposal? (Every language change has a cost).
A bit of cognitive overhead, more compile-time errors, and slightly slower compile-times.
How many tools (such as vet, gopls, gofmt, goimports, etc.) would be affected?
Likely all of them, as a new keyword is being added. gopls will definitely need some changes, and gofmt may need some changes for the TypeDecl syntax changing.
What is the compile time cost?
I do not know much about the Go compiler, although the typechecker will have to keep track of which types are sealed and block some operations on sealed types.
What is the run time cost?
Quicker runtime for usages of enums and types intended to be used with a constructor, as less needs to be verified at runtime. However all calls to CanSet() do now need an additional Sealed() check.
Can you describe a possible implementation?
above
Do you have a prototype? (This is not required.)
no
How would the language spec change?
above
Orthogonality: how does this change interact or overlap with existing features?
It doesn't overlap with much, however it does interact with iota which is often used with enum types.
Is the goal of this change a performance improvement?
no
Does this affect error handling?
no
Is this about generics?
no

In general Go has a simple type system, and encourages programming by writing code, rather than programming by writing types.  This seems like a step away from that.
That said, you can get similar benefits by using a struct with unexported fields.  What advantages do sealed types provide over that approach?

I largely agree that we shouldn't be programming by writing types. Perhaps using this in order to require the use of a constructor wasn't great, although it certainly helps self-document that the type should not be used on its own. However for enums this provides a huge benefit. One of the large reasons that #28987 ("enums as an extension to types") wasn't ideal was that it tried to tie several features (named values, compile-time validation, and a way to define the values) all into a single feature. Instead, those three features should be implemented as three separate features that work harmoniously with each other.
Specifically, this proposal attempts to solve the "compile-time validation" portion of what we may want in order to have traditional enums.

It is not impossible. First of all - bitfields are already possible in Go today with very little runtime validation being needed, as it is common behavior that bits which get set and are not listed by the package are discarded. Sealed types don't particularly affect bitfields in any way. However, if a bitfield does in fact need validation that it only used constants provided, one may use a function instead:
// FieldUnion returns the binary OR of all fields provided.
func FieldUnion(fields ...Field) Field {
    var union Field
    for _, field := range fields {
        union |= field
    }
    return union
}

This function is provided by the package, so it is allowed to use the union operator. This however removes the ability to calculate the union of the fields at compile-time which is a bit unfortunate.
While I am tempted to make an exception for | operator, I don't think it's the right thing to do. I think in the case of bitfields, it is better to simply not use sealed types.

We use Enums extensively. We're sharing data/state produced by different technologies and have many Enums with values out of our control. A sealed type would offer additional confidence which would otherwise be quite convoluted to achieve.
Hoever this is possibly a niche situation that might not warren a language change, especially since proper etiquette and/or code-review policy should catch the practices from the OP example.

The proposal says that one of the problems to be solved is:

Some types require instantiation with constructor, whether it is to set private fields, or initialize certain fields which may make the structure not very useful (ie nil maps).

But this proposal permits creating zero values of sealed types, and it permits assignment of sealed types.  So it doesn't seem to solve this problem.
It's not clear how a sealed type would be used other than for enum-like types for which 0 is a valid enum value.

But this proposal permits creating zero values of sealed types, and it permits assignment of sealed types. So it doesn't seem to solve this problem.

Whether or not assignment to elements in a composite type is allowed is an open question. However, assuming that it isn't (which is what I suggest) there is no way to modify the values inside of a composite type. This means that the only values which can exist are the zero value, and values created by the package. This should solve the problem of creating a type that requires a constructor, as people cannot modify the components of the type on their own.
I have also realized while writing this comment that not allowing to modify values of composite types essentially makes this a form of a read-only types proposal (without the complex interactions of assignability). If those ever come to Go (not sure that they will) then it would be a bit complicated to figure out the logic between read-only and sealed types. Not sure how much I like that.
Also I am not sure how sealed would work outside of a type declaration, ie func Increment(i sealed int) int, it would seem that it is impossible for Increment to be called from outside the package (except with a zero value). Perhaps this should be illegal? Adding this as another open question.

I agree that this proposal doesn't permit modifying values inside a composite type.  However, one of the natural uses for a type that requires instantiating with a constructor is a type that contains a lock, as such types can't be copied by value (that's why the vet tool has a copylocks check, to look for this case).  It would seem natural to use sealed types for this, but it won't work, because sealed types can be copied by value.
I'm stressing this because it seems to me that this is one of the first things that comes to my mind when I read this problem statement, but the proposal doesn't actually avoid that problem.

I feel like this kind of defeats the purpose of the proposal - "sealed types may be created via zero-value generation". If we can instantiate zero-value sealed types then we are back to square one - either package needs to support zero values or make it programmer's responsibility to use it correctly.
I know it's ugly but what about restricting sealed types to pointers only (something similar was mentioned in the other proposal)? That way zero-value becomes nil pointer which will be less usable and in most cases would cause panics. We can go even further and force panics on function calls with nil pointer receiver of a sealed type. That makes sealed types very special and nothing like anything else in the language but at least it gets us closer to the desired behavior. But I feel like no matter what we do here Go's type system is too simple for this. Ideally we would want proper constructors to solve this.

@ianlancetaylor

I agree that this proposal doesn't permit modifying values inside a composite type. However, one of the natural uses for a type that requires instantiating with a constructor is a type that contains a lock, as such types can't be copied by value (that's why the vet tool has a copylocks check, to look for this case). It would seem natural to use sealed types for this, but it won't work, because sealed types can be copied by value.

In my personal experience I typically have troubles with reference types. I would like each type to have its own copy of the passed-in slice, so the way I typically enforce this is with a constructor function which makes clones of the slices/maps which are passed in.

I'm stressing this because it seems to me that this is one of the first things that comes to my mind when I read this problem statement, but the proposal doesn't actually avoid that problem.

It does solve the problem in a way. You could have a pointer to the mutex in the struct which the constructor would initialize, unless there is some other problem with this that I am missing.
@creker

I know it's ugly but what about restricting sealed types to pointers only (something similar was mentioned in the other proposal)? That way zero-value becomes nil pointer which will be less usable and in most cases would cause panics.

Going back to pointers doesn't actually help anything. Any time where we'd encounter an error with using zero values, we'd encounter errors with using pointers as well. Library writers would be inconveniencing users to need to deal with pointers everywhere with little benefit. Without zero values...
We can't conditionally initialize a value
var foo other.SealedType
if someCondition {
    foo = fetchFromResource(...)
} else {
    foo = fetchFromOtherResource(...)
}

// workaround...
var tempFoo *other.SealedType
if someCondition {
    temp := fetchFromResource(...)
    tempFoo = &temp
} else {
    temp := fetchFromOtherResource(...)
    tempFoo = &temp
}
foo := *tempFoo

It is literally impossible to check if an interface is of our sealed type
// what is `val` when `ok` is false?
val, ok := someInterface.(other.SealedType)

We can not use our type in any kind of composite type (without using pointers which, as shown earlier, inconveniences users of the package, as well as not adding any safety benefit)
slice := make([]other.SealedType, 2) // slice[0]
myMap := make(map[string]other.SealedType) // myMap[""]
ch := make(chan other.SealedType) // <-ch on a closed channel
myStruct := struct { st other.SealedType }{} // myStruct.st

In conclusion - zero values are necessary. I wholeheartedly believe that if we didn't allow zero values on sealed types, countless users would ask library writers to stop using sealed types because they would be so inconvenient to use.

@deanveloper

Any time where we'd encounter an error with using zero values, we'd encounter errors with using pointers as well.

There's an important difference. Non-pointer zero values are silent. They're in invalid state but otherwise behave like nothing's wrong. Only when something catastrophic happens or the code explicitly checks for invalid state will the user get an error. Or not, there's no telling. With pointers, especially if we force panic on method calls, the code will explode immediately. That's much more desirable behaviour that solves what this issue actually aims at - prevent users from using incorrectly initialized types.

We can't conditionally initialize a value

We can, just force users to use pointers or make pointer semantic implicit like it is with channels and maps.

It is literally impossible to check if an interface is of our sealed type

I don't understand this. In your example val will be nil. There's nothing special about pointer-only sealed types. They would behave like any other struct with pointer receiver.

We can not use our type in any kind of composite type

We can. Sealed types would be all nil.

I see what you mean now, I assumed you had meant that we would just make the zero value of nil types invalid (as the previous proposal had stated), and we would instead just force users to always use pointers to the value if we want to put it in maps and such. This would cause my scenarios to fail.
Essentially you would want all sealed types to be reference types then? I'll have to think about some of the implications of doing that. It'd definitely be strange, but it might work out okay since the package's consumers can't mutate the value. That may also solve the mutex problem that @ianlancetaylor mentioned. It would have some strange behavior for package writers, though.

This is an interesting idea but it has too many awkward edges.  Based on the discussion above, this is a likely decline.  Leaving open for four weeks for final comments.
(It may be worth considering whether #6386 would permit you to do what you want, by using exported const struct values.  That might be similar to this idea, I'm not sure.  Though of course that proposal has not been accepted either.)


[AutoDiff] Clean up SILFunctionType::getAutoDiffTransposeFunctionType.

Add doc comments and minor edits to
SILFunctionType::getAutoDiffTransposeFunctionType.
Add isTranspose flag to autodiff::getConstrainedDerivativeGenericSignature.
Use it to constrain Self == Self.TangentVector for linearity parameters.

Mirror of upstream PR https://github.com/apple/swift/pull/29755. Basically NFC.

@swift-ci Please test tensorflow


CORE: Create separate update.html page for recipe.

[x] Add edit icon and event listener from recipes home page
[x] Add fetch request to edit icon to endpoint to collect information
[x] Use thymeleaf templating engine to populate recipe information.
[x] Populate ingredients in table with edit and trash icons
[x] Write JS for the icons and have it all sent back and updated in a fetch request to a specific endpoint
[x] Add functionality for weight form update upon page load.

Crushed it!!!


IJulia not precompling within the process that jupyter launches

On Linux, launching jupyter form the shell with jupyter notebook and launching a new Julia 1.5 notebook from the browser prints the following in shell:
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package ZMQ does not have ZeroMQ_jll in its dependencies:
- If you have ZMQ checked out for development and have
  added ZeroMQ_jll as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with ZMQ
Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:906
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include(::Module, ::String) at ./Base.jl:368
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:331 [inlined]
 [6] eval(::Expr) at ./client.jl:467
 [7] top-level scope at ./none:3
in expression starting at /home/mauro/.julia/packages/ZMQ/R3wSD/src/ZMQ.jl:4
ERROR: LoadError: Failed to precompile ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] to /home/mauro/.julia/compiled/v1.5/ZM
Q/CaaO6_BNOax.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /home/mauro/.julia/packages/IJulia/tOM8L/src/IJulia.jl:36
ERROR: LoadError: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to /home/mauro/.julia/compiled/v1.5/IJulia/nfu7T_BNOax.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] exec_options(::Base.JLOptions) at ./client.jl:296
 [9] _start() at ./client.jl:506
in expression starting at /home/mauro/.julia/packages/IJulia/tOM8L/src/kernel.jl:1
[I 13:29:38.641 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports

However, precompilation of ZMQ within julia-repl functions fine (and the tests pass).  However, starting the notbook from within julia does not work either, although no error as printed to julia.
I tried nuking my ~/.julia but did not help either.
On Linux I have system-wide installations of python3, jupyter, zeromq.

I found out what it was: I started jupyter notebook within a julia project which I cloned.  After doing, ] instantiate in a julia-repl, the starting the jupyter notebook worked.  If there is a way to get some more helpful error message, that would be good.


None of the LocalServer samples work for 100.6

None of the LocalServer samples work in ArcGIS Runtime SDK for .NET (WPF) 100.6. The Local Server starts, but all the samples get an error when trying to start a service.
I also tried to reacreate one of the samples in Visual Studio 2019 locally on my machine with the same result.
I've enabled logging using the ArcGIS Runtime Local Server Utility, but no logs or error reports get generated.
I'm running the ArcGIS Runtime SDK for .NET (WPF) built with ArcGIS Runtime SDK for .NET version <IP_ADDRESS>3 installed from Windows Store and I've downloaded and installed ArcGIS Runtime Local Server SDK 100.6.0 from the ArcGIS for Developers Downloads page.
I also have ArcMap 10.5.1 and ArcGIS Pro 2.4.2 installed on my computer.

all the samples get an error when trying to start a service.

What is the error? I'm terrible at guessing :-)

It's a bit different for the different samples, but mostly that the map service could not be started because a map package could not be opened.

Thanks but could you provide the specific error message, the full call stack etc for at least one of them?

Running Local server feature layer sample displays the following error message:

Running Dynamic workspace raster sample and choosing the downloaded raster:

This is the third computer I tried it on with the same results. I don't have Visual Studio on this one, so I cannot provide any error details from a local sample until tomorrow when I'm back at the office.

Have you installed Microsoft Visual C++ Redistributable for Visual Studio 2017?

No, I had missed that prerequisite. :-)
Unfortunately it didn't help to install it (x64 version).
Reinstalling Local Server SDK after that didn't help either.
Neither did reinstalling the ArcGIS Runtime SDK for .NET (WPF).

When running the Local Server feature layer sample locally in VS2019 I get a ArcGISWebException from LocalFeatureService.StartAsync() with Message:
Failed to create service pointsofinterest MapServer. Service failed to initialize: Error unpacking map package hr=0x80004005 (No ErrorInfo)
and Response.RequestMessage:
{Method: POST, RequestUri: 'http://<IP_ADDRESS>:50000/8dB9Gv/arcgis/rest/admin/createService', Version: 1.1, Content: System.Net.Http.FormUrlEncodedContent, Headers:
{
User-Agent: ArcGISRuntime-NET/100.6
User-Agent: (Windows 10.0.18362; Win64; WOW64; .NET 4.8.0)
Content-Type: application/x-www-form-urlencoded
Content-Length: 149
}}
and StackTrace (replaced customer name in src path):
at Esri.ArcGISRuntime.Http.ArcGISHttpClientHandler.ArcGISClientHandlerInternal.d__14.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.LocalServices.LocalService.d__25.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at TestLocalServer.MainWindow.d__15.MoveNext() in C:\Dev\CustomerName\Src\TestLocalServer\TestLocalServer\MainWindow.xaml.cs:line 201
In my computer at the office I also already had Microsoft Visual C++ Redistributable for Visual Studio 2017 installed.

I tried the Sample Viewer built with 100.5 and there all Local Server samples worked.

@marhja
Can you open Control Panel > Programs > Programs and Features then search for C++ and paste a screen capture?

@mbranscomb  After I got the Dynamic workspace shapefile sample working with Local Server SDK 100.5, I uninstalled that version and reinstalled 100.6 again. Now that sample works in the Sample Viewer app 100.6! The Local Server feature layer sample also works now, but no other Local Server samples work.

@marhja It's been some time since you opened this. Unfortunately we were not able to reproduce the issue you were seeing. If you are still having trouble with the samples and this issue specifically, feel free to reopen, otherwise if you have any issues working with the API please get in touch via community.esri.com - runtime-sdk-dotnet-questions.


JetBrains Annotations: Part II

Thanks again for the annotating your methods with [NoEnumeration]. If possible, I'd like to expand on that to further support integration with Resharper.
One improvement that would be really nice would be to annotate the null guard methods, like this:
[ContractAnnotation("argument:null => halt")]
public void IfIsNull<TArg>(TArg argument, string argumentName, string message = null)
{
    // ...
}

For methods that only take a single parameter, the contract can be simplified:
[ContractAnnotation("null => halt")]
public void IfIsNull<TArg>(TArg argument)
{
    // ...
}

I'm still unable to open the Pommalabs.Thrower solution reliably without Visual Studio crashing, so I can't submit a pull request. However, I've tested these changes with simple analogs of some of your methods:

Hi @TAGC,
Your idea is interesting and I will add it as soon as possible in the following days.
Thanks!

Hi @TAGC,
Support for contract attribute should be avalaible in v4.2.2. Can you confirm it is OK? I added support for null clause, but I also added it for some methods like If/IfNot (I hope they are OK).
Thanks again!

Yep, looks great. And it was a really good idea annotating the If and IfNot methods too; I didn't think of that.

I've reviewed your changes and it all looks right, and it works at least for this snippet of code. 👍

Oh, not that it's a huge thing either way but I think those annotations would also fit here, for things like IsNullOrWhitespace, etc.

Hi @TAGC,
Missing annotations should be available in v4.2.3, released just now.
Thanks!


🐛 [BUG]: flickering on some phone browsers

Is there an existing issue for this?

[X] I have searched the existing issues and this is a new bug.

Current Behavior
The flows are flickering just like the video below.
https://github.com/bcakmakoglu/vue-flow/assets/58115075/0a03c4a2-bb44-480c-8316-774e61f19c44
Expected Behavior
Having the flows without flickering.
Steps To Reproduce

With Xiaomi Redmi Note 11 & Chrome: 123.0.6312.100 & OS: Android 13
I get the flickers on the vueflow.dev's home page and a website I have built. But flickers are not happening on vueflow.dev/examples.

Relevant log output
No response
Anything else?
No response

Can you provide a proper reproduction for this?
On the old Xiaomi Redmi I have lying around here there are no flickers, neither on my Mac, Windows or iPhone.

@bcakmakoglu  There wouldn't be any reproduction for this one since I guess it was happening only on my phone.
But here are the things I've tried.

On Chrome, there wasn't any flickering when I tried barebone (vue & vue-flow). But when I added "animate: true" on edges or connected handles the flickers came back.

USB debugging gave me this warning:
Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsiveAdded non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive

On Chrome, flickers are entirely gone after doing these:

clear all user and cache data
remove all Chrome updates
update back to 123.0.6312.100

On Brave (Chromium: 123.0.6312.105), there is always flickers even after uninstalling and clearing all cache & data.

Well, I can move this topic to discussions in case this happens to more people.

Interesting - might be that something about the svg animation isn't working right on your specific phone.
I've seen other users complain that animated edges can basically eat up all their CPU for some reason, so maybe it's connected to that 🤔
I'll keep the issue open for now until I can do some investigation on this.

Sounds good. I'll also look further and share it here if I find any leads.

@aryankarim Btw, does this even happen on any other flow besides the "Hero" flow on the vueflow docs?
That one has some listener for size changes which might just be working wrong on your end for some reason and not an indication of an actual problem in the library

@bcakmakoglu I remember it happening only on the 'Hero' flows, the other pages were fine.
BTW I just tested again on these browsers again:
Chrome: Chrome 126.0.6478.122
Brave: Chromium 126.0.6478.126
The issue has resolved, and there is no flickering.
Hence I think it was either related to some browser versioning or as you said some native code malfunctioning on my Android OS.
I think you can close this issue since it has only happened to me.

Thank you for the response! :)
I suspect there was something wonky going on with the breakpoint calculation that was done in the hero flow(s).
Will be closing this then.


Fix #74: Prevent shaking of theme icons on click by adding CSS transitions and positioning

What does this PR do?
Fixes the shaking of light and dark mode icons when clicked by adding CSS transitions and positioning rules.
What issues does this PR fix or reference?
Fixes #74 (addresses the issue of layout shifts causing icon shaking when toggling themes)

closing in favour of #99


HELP : package or namespace load failed for 'stats' in inDL(x, as.logical(local), as.logical(now), ...):

package or namespace load failed for 'stats' in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'D:/Program Files/R/R-4.2.1/library/stats/libs/x64/stats.dll':
LoadLibrary failure:  �Ҳ���ָ����ģ�顣

help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

hi, any update on the problem? I have the same problem. @duzhenyi did you find a solution or workaround?

See https://github.com/rdotnet/rdotnet/issues/151, including a workaround.


Improved some descriptions

@kenwith

Docs Build status updates of commit f0ac5d2:
:clock10: Full build: the average full build time is 11 min(s) 51 sec(s), this is based on the last 966 build(s) for this repository.

Docs Build status updates of commit f0ac5d2:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/New-CsTeamsEmergencyCallRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/New-CsTeamsEmergencyCallingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/Set-CsTeamsEmergencyCallRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/Set-CsTeamsEmergencyCallingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 4175efa:
:clock10: Full build: the average full build time is 11 min(s) 51 sec(s), this is based on the last 967 build(s) for this repository.

Docs Build status updates of commit 4175efa:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/New-CsTeamsEmergencyCallRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/New-CsTeamsEmergencyCallingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/Set-CsTeamsEmergencyCallRoutingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/Set-CsTeamsEmergencyCallingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


OKTA SSO V2 Data connector Fixes for Azure Gov (.us) Tenants

Fixes #
Proposed Changes

Created new ARM Template for Azure Gov (.us) Tenants
Updated OKTA SSO V2 Function App code to incorporate changes
Commented $TimeStampField = "published" as it is breaking the inbuilt OKTA rules & charts

@sreedharande - @nazang and @preetikr are reviewing the experience for all these types of data connectors for gov support. Will close on this review once have some clarity on that so that we have consistent experience for customers in the portal. Thanks.

@sreedharande - since there are gov changes already done for Okta (central framework change) as part of later PR which you've validated, can you please close this PR? Thanks.

gov changes already done for Okta (central framework change)


python/examples/alpha_zero.py crashes with CUDA_ERROR_NOT_INITIALIZED

I'm running Ubuntu 22.04 WSL2, and I've tried running this with both tensorflow==2.14.0 and tf-nightly==2.15.0.dev20231010. I am using Python 3.11.5, which is supported by the latest version of Tensorflow.
You can correctly install Tensorflow with GPU support via pip install --extra-index-url https://pypi.nvidia.com tensorflow[and-cuda], or install the nightly version with pip install --extra-index-url https://pypi.nvidia.com tf-nightly[and-cuda]. Note that, without the extra-index-url flag, the installation will fail as Tensorflow 2.14.0 depends on specific versions of tensorrt and tensorrt-lib which are not in the public pypi repository.
I verified that my graphics card is visible to the WSL2 container:
~/open_spiel$ nvidia-smi
Tue Oct 10 22:58:49 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.120                Driver Version: 537.58       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1080        On  | 00000000:01:00.0  On |                  N/A |
| 35%   52C    P0              35W / 180W |    962MiB /  8192MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A        20      G   /Xwayland                                 N/A      |
|    0   N/A  N/A        20      G   /Xwayland                                 N/A      |
|    0   N/A  N/A        23      G   /Xwayland                                 N/A      |
+---------------------------------------------------------------------------------------+

And I verified that Tensorflow itself runs code correctly with my GPU, by running this code, seeing results, and noting the spike in my GPU's utilization when I run this script:
import tensorflow as tf

tf.debugging.set_log_device_placement(True)

# Create some tensors
a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
c = tf.matmul(a, b)

print(c)

But even though tensorflow is working with my graphics card, alpha_zero.py fails:
~/open_spiel$ python open_spiel/python/examples/alpha_zero.py
2023-10-10 22:51:42.689219: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2023-10-10 22:51:42.689281: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2023-10-10 22:51:42.690266: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-10-10 22:51:42.695684: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-10 22:51:43.360880: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-10-10 22:51:44.101936: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:44.127175: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:44.127253: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
Starting game connect_four
Writing logs and checkpoints to: /tmp/az-2023-10-10-22-51-connect_four-87c21nuk
Model type: resnet(128, 10)
actor-0 started
actor-1 started
learner started
[2023-10-10 22:51:44.141] Initializing model
evaluator-0 started
Exception caught in evaluator-0: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
evaluator-0 exiting
Process Process-3:
Exception caught in actor-0: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
actor-0 exiting
Process Process-1:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 171, in _watcher
    return fn(config=config, logger=logger, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 287, in evaluator
    model = _init_model_from_config(config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 148, in _init_model_from_config
    return model_lib.Model.build_model(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 173, in build_model
    cls._define_graph(model_type, input_shape, output_size, nn_width,
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 241, in _define_graph
    torso = cascade(observations, [
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 28, in cascade
    x = fn(x)
        ^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 50, in batch_norm_layer
    applied = bn(x, training)
              ^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/engine/base_layer_v1.py", line 838, in __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 690, in wrapper
    return converted_call(f, args, kwargs, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 377, in converted_call
    return _call_unconverted(f, args, kwargs, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 459, in _call_unconverted
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 597, in call
    outputs = self._fused_batch_norm(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 990, in _fused_batch_norm
    output, mean, variance = control_flow_util.smart_cond(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/utils/control_flow_util.py", line 108, in smart_cond
    return tf.__internal__.smart_cond.smart_cond(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/framework/smart_cond.py", line 57, in smart_cond
    return cond.cond(pred, true_fn=true_fn, false_fn=false_fn,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 171, in _watcher
    return fn(config=config, logger=logger, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 268, in actor
    model = _init_model_from_config(config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/eager/context.py", line 605, in ensure_initialized
    pywrap_tfe.TFE_DeleteContextOptions(opts)
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 148, in _init_model_from_config
    return model_lib.Model.build_model(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 173, in build_model
    cls._define_graph(model_type, input_shape, output_size, nn_width,
tensorflow.python.framework.errors_impl.InternalError: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 241, in _define_graph
    torso = cascade(observations, [
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 28, in cascade
    x = fn(x)
        ^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 50, in batch_norm_layer
    applied = bn(x, training)
              ^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/engine/base_layer_v1.py", line 838, in __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 690, in wrapper
    return converted_call(f, args, kwargs, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 377, in converted_call
    return _call_unconverted(f, args, kwargs, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 459, in _call_unconverted
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 597, in call
    outputs = self._fused_batch_norm(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 990, in _fused_batch_norm
    output, mean, variance = control_flow_util.smart_cond(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/utils/control_flow_util.py", line 108, in smart_cond
    return tf.__internal__.smart_cond.smart_cond(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/framework/smart_cond.py", line 57, in smart_cond
    return cond.cond(pred, true_fn=true_fn, false_fn=false_fn,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/eager/context.py", line 605, in ensure_initialized
    pywrap_tfe.TFE_DeleteContextOptions(opts)
tensorflow.python.framework.errors_impl.InternalError: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
2023-10-10 22:51:44.231365: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:44.231499: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:44.231562: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
Exception caught in actor-1: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
actor-1 exiting
Process Process-2:
Traceback (most recent call last):
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/jhemphill/miniconda3/envs/tf/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 171, in _watcher
    return fn(config=config, logger=logger, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 268, in actor
    model = _init_model_from_config(config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 148, in _init_model_from_config
    return model_lib.Model.build_model(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 173, in build_model
    cls._define_graph(model_type, input_shape, output_size, nn_width,
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 241, in _define_graph
    torso = cascade(observations, [
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 28, in cascade
    x = fn(x)
        ^^^^^
  File "/home/jhemphill/oss/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 50, in batch_norm_layer
    applied = bn(x, training)
              ^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/engine/base_layer_v1.py", line 838, in __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 690, in wrapper
    return converted_call(f, args, kwargs, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 377, in converted_call
    return _call_unconverted(f, args, kwargs, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/autograph/impl/api.py", line 459, in _call_unconverted
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 597, in call
    outputs = self._fused_batch_norm(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/layers/normalization/batch_normalization.py", line 990, in _fused_batch_norm
    output, mean, variance = control_flow_util.smart_cond(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/keras/src/utils/control_flow_util.py", line 108, in smart_cond
    return tf.__internal__.smart_cond.smart_cond(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/framework/smart_cond.py", line 57, in smart_cond
    return cond.cond(pred, true_fn=true_fn, false_fn=false_fn,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/jhemphill/oss/open_spiel/venv/lib/python3.11/site-packages/tensorflow/python/eager/context.py", line 605, in ensure_initialized
    pywrap_tfe.TFE_DeleteContextOptions(opts)
tensorflow.python.framework.errors_impl.InternalError: Failed call to cuDeviceGet: CUDA_ERROR_NOT_INITIALIZED: initialization error
^C2023-10-10 22:51:45.582786: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:45.582883: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:45.582914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2017] Could not identify NUMA node of platform GPU id 0, defaulting to 0.  Your kernel may not have been built with NUMA support.
2023-10-10 22:51:45.582959: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-10 22:51:45.583002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1926] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6562 MB memory:  -> device: 0, name: NVIDIA GeForce GTX 1080, pci bus id: 0000:01:00.0, compute capability: 6.1
[2023-10-10 22:51:45.587] learner exiting
learner exiting

<hangs at 0% GPU usage>
Caught a KeyboardInterrupt, stopping early.

AlphaZero is forking actor, evaluator, and learner processes, and it's these subprocesses which fail, so I believe this is related to https://github.com/tensorflow/tensorflow/issues/57877.

Hi,
This is a pretty complex setup.. I'm not sure how we can help as we don't have a setup like this to reproduce it.
Have you tried the simple program on that thread you linked, i.e. https://github.com/tensorflow/tensorflow/issues/57877#issuecomment-1260045983 ?
Did you see that CUDA support on Windows was being removed in TF? https://github.com/tensorflow/tensorflow/issues/59905. According to that thread, it should still work in WSL. Seems like you need WSL2... but it seems like you are indeed using that. So, yeah.. seems like it should work.
@tewalds: any ideas?

I don't think this is a complex setup at all! I installed a recent version of tensorflow[and-cuda], with a GPU that supports CUDA.
I made sure to use the correct dependency versions, even going so far as to track down the missing old version of tensorrt-lib, which should be in PyPi but isn't!
I then ran alpha_zero.py. Does alpha_zero.py work for you when you use it with a GPU?
I did run the failing code example in the linked issue, and it did fail in the same way. It seems to me that alpha_zero.py forks processes in a way that CUDA does not support!

I don't think this is a complex setup at all!

Well, first: OpenSpiel is not officially supported on Windows. We don't have Windows machines easily at our disposal, so we don't test things on Windows hosts and have only run things ourselves within WSL a few times. I have no clue how CUDA drivers are supported through WSL.
Second, you're using most recent nightly versions of TF that we are not testing on our CI regularly (we're only testing 2.12.0, see here. Due to this, the new TF requires a specific/custom older version of tensorrt and tensorrt-lib. Maybe these don't come with CUDA support, or are not getting built properly? 🤷
Third, TF most recently stopped support CUDA on Windows. That should not affect you due to running within WSL, but I wonder if in the process of disabling CUDA on native Windows, something else in the code chain is causing the CUDA issues within your setup. (I realize this is unlikely.)
Then there's a thread that might be related because it's a forking actor ... ?
That feels like a pretty complex setup to me. We'll do our best to help, but without being able to mimic your setup, it will be difficult.

Does alpha_zero.py work for you when you use it with a GPU?

I believe @tewalds might be the only one who has run our Python AlphaZero using CUDA; IIRC it was almost certainly on a native Linux machine, and I believe it was about 3 years ago. 😅
I don't know of any instances of people running the Python TF AlphaZero using CUDA within WSL. I barely know one person who has used it with CUDA, and it was long ago. The more common use is C++ LibTorch version on native Linux machines, because it has more scaling potential.
I'd like to know if it currently runs on a Linux machine with CUDA. @tewalds, is it easy for you to try on your desktop? Can you tell me if you run into the same issue?

I have been updating the python AlphaZero to Keras 3, and I'm running into the same thing. I don't think that it's a Windows problem. There's some challenge with Keras 3 and forking.  I did try changing the start method to "spawn" in spawn.py, but that didn't fix it.
I might look into whether it's possible to lazy load the core keras libraries. It didn't seem super easy, but I don't have a lot of ideas. It's not super obvious what's going on, because, for example, this sample code runs correctly:
import collections
import datetime
import functools
import itertools
import json
import os
import random
import sys
import tempfile
import time
import traceback

import numpy as np

import keras.callbacks as kcb

from open_spiel.python.algorithms import mcts
from open_spiel.python.algorithms.alpha_zero import evaluator as evaluator_lib
from open_spiel.python.algorithms.alpha_zero import model as model_lib
import pyspiel
from open_spiel.python.utils import data_logger
from open_spiel.python.utils import file_logger
from open_spiel.python.utils import spawn
from open_spiel.python.utils import stats

import tensorflow as tf
import time

def child(queue):
    print("Child GPUs: " + str(tf.config.list_physical_devices('GPU')))

    for i in range(20):
        a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
        b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
        c = tf.matmul(a, b)

        print("Child: " +str(c))

child_proc = spawn.Process(child)
print("Parent GPUs: " + str(tf.config.list_physical_devices('GPU')))

for i in range(20):
    a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
    b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
    c = tf.matmul(a, b)

    print("Parent: " +str(c))

I just reproduced this on a metal Ubuntu 20.04 machine with TF 2.16.1 and Keras 3.3.3.


Patch RandomForest for BIDMach_Spark

Mostly making things Serializable
Fix bug in Worker.scala (Machine constructor takes array of IPs as String, not as INetAddress)
Whitespace

abandoning in favor of #130


HSEARCH-2401 Boosts are (erroneously) not applied to IndexedEmbeddeds

This PR is based on HSEARCH-2397, we'll have to review and merge the PR ( #1188) first. => #1188 has been merged and I rebased this PR.
Related JIRA ticket: https://hibernate.atlassian.net/browse/HSEARCH-2401

merged


False positive errors for functions guards.

Example:
    function isCat(a: any): a is Cat {
         return a.name === 'kitty';
    }

This function gives me errors such as block empty, missing white space and missing semi colon.

which version of TSLint are you using?

My mistake, it works using the @next branch.


Disable warning for insecure CA if located on private network.

My first Caddy PR :)
Fix for #1592. It doesn't handle hostnames that resolves to private IPs.

@mholt it helps to simplify IPv6, otherwise we'd need separate logic for IPv6 than IPv4. The address spaces are listed here: https://en.wikipedia.org/wiki/Private_network, for reference

Checking the 172.16. -> 172.31. are all internal. But yh could be done with a number of ifs

Looks good, @cez81! Thanks for contributing, and nice work!


Implicit schema not found when using play-json

I am trying to produce a message with json schema, and already playjson used in the project. So imported the package as recommended in the doc for implicit schema, but I am getting the error

could not find implicit value for evidence parameter of type org.apache.pulsar.client.api.Schema[com.thoughtworks.iot_api.ActivityData]
Error occurred in an application involving default arguments.
var producer = client.producerActivityData

Code used:
import com.sksamuel.pulsar4s.{ProducerConfig, PulsarClient, Topic}
import com.sksamuel.pulsar4s.playjson._

case class ActivityData(activityType: String, timeStamp: String)

object SchemaTest extends App {
  var client = PulsarClient("pulsar://localhost:6650")
  var topic = Topic("activity_new")
  var producer = client.producer[ActivityData](ProducerConfig(topic))

  producer.send(ActivityData("Motion", "1596448394224"))

  producer.close()
  client.close()
}

This is expected behavior given your current code. You need an implicit Format in scope for ActivityData to generate the schema. It doesn't generate one for you automatically.


micro ros - esp32 wifi connection

hello,
I followed the tutorials and installed the necessary packages. Using serial connection the micro ros Arduino library is working fine, but I cannot connect to the wifi. I have listed the commands i used and the results. Kindly inform what am I doing wrong or if I missed any installation process
command: ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32
Firmware already created. Please delete /home/sarwan/micro_ros_foxy/firmware folder if you want a fresh installation.
command: ros2 run micro_ros_setup build_firmware.sh menuconfig
Build process proceeds and no window is opened for wifi configuration.
command: ros2 run micro_ros_setup flash_firmware.sh
Flashing firmware for host platform generic
Nothing to flash: running in host mode
Use 'RMW_IMPLEMENTATION=rmw_microxrcedds ros2 run micro_ros_demos_rcl int32_subscriber' to start with examples
Thanks

Hi @Sarwan1494,
This issue is open on the micro_ros_arduino repo, but you are using the micro_ros_setup tool. You can also try this recommended alternatives:

Use micro_ros_arduino wifi example: link
Use micro-ROS component for ESP-IDF, which integrates micro-ROS on Espressif ESP32 IDF projects

Anyway, let me check the micro_ros_setup commands.

Check the following messages on your build proccess:

Firmware already created. Please delete /home/sarwan/micro_ros_foxy/firmware folder if you want a fresh installation.
...
Nothing to flash: running in host mode.

This means that you had a firmware folder already created, I guess you used the same environment to test a micro-ROS example on Linux.
You need to delete the firmware folder before calling ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32, otherwise the build system will build for linux again.

Once you have deleted the firmware folder, you can run this commands to build and flash a wifi example:
# Prepare environment for esp32 build
ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32

# Configure APP and transport: Modify add_two_ints_service with your APP name
ros2 run micro_ros_setup configure_firmware.sh ping_pong -t udp

# Launch menu for wifi and general configuration and build
ros2 run micro_ros_setup build_firmware.sh menuconfig

# Flash the binary
ros2 run micro_ros_setup flash_firmware.sh

Notice that you were missing the configure step, which selects the app to compile and the transport kind to use (serial or udp)

Hello,
Thanks a lot for the prompt reply. It works perfectly now.


Updated scan interval for spotify component

I have timing issues with my automations which use the spotify component. The scan interval is way to high for real automations.

Hi @jld3103,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

I see what you mean, but I think every 30 seconds is far to rare. I think 10 seconds could be a compromise.

We're not going to hammer the spotify API, 10 seconds is still too fast.


Update ROOT to 6.24.00

Motivation for this change
ROOT 6.24 introduces some interesting changes, like seeding of GetRandom for TH1 classes, and many performance improvements on RooFit. This version also introduces Apple silicon support (at least from the cmake files).
However, upstream has bumped the llvm to llvm_9. I first tried to just change the input from llvm_5 to llvm_9, but I got the following compilation error:
-- Using LLVM external library - 9.0.1
-- Clang version: 9.0.1
CMake Error at /nix/store/i2als7skhvbyjw9i79p9mfqkjypd56ck-llvm-9.0.1-dev/lib/cmake/llvm/AddLLVM.cmake:637 (add_custom_target):
  add_custom_target cannot create target "install-clang-cpp" because another
  target with the same name already exists.  The existing target is a custom
  target created in source directory
  "/build/root-6.24.00/interpreter/llvm/src/tools/clang/tools/driver".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  interpreter/llvm/src/tools/clang/cmake/modules/AddClang.cmake:117 (add_llvm_install_targets)
  interpreter/llvm/src/tools/clang/tools/clang-shlib/CMakeLists.txt:18 (add_clang_library)

CMake Error at interpreter/CMakeLists.txt:452 (get_directory_property):
  get_directory_property DIRECTORY argument provided but requested directory
  not found.  This could be because the directory argument was invalid or, it
  is valid but has not been processed yet.

So I switched to the bundled llvm instead. Unfortunately this will make compilation slower. I also asked about this on the official forum.
I'd like to hear the opinion of the maintainer @veprbl before proceed.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

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

[ ] Fits CONTRIBUTING.md.

From the reply, it looks like using the built-in llvm-clang combo is the way to go? Otherwise we need to patch and build an external version of clang.

@yipengsun I don't mind switching back to the built-in llvm. If you think this is ready, let's merge.

Ready for review. Do you want me to squeeze all commits into a single one?

Ready for review. Do you want me to squeeze all commits into a single one?

No worries, we can do this on merge. Note the commit messages are expected to conform to https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes
so this would need to be "root: 6.22.08 -> 6.24.00"
@GrahamcOfBorg build root

@GrahamcOfBorg build hepmc3

@GrahamcOfBorg build hepmc3

@veprbl For your latest commit on "fix cmake package configuration file", that is only needed for darwin right? Because on NixOS the compilation was fine without that.

@veprbl For your latest commit on "fix cmake package configuration file", that is only needed for darwin right? Because on NixOS the compilation was fine without that.

The error was in a dependent package https://github.com/NixOS/nixpkgs/runs/2771882203

Updated commit message to follow the contributing guide and squashed all commits into a single one.


The code doesn't check if the number is non-negative

I think the code should check if the number is negative and give a notification if it is' Like this:
if (num < 0) {
return "undefined";
}

Hi @ksu-b. What challenge are you referring to? 😄

Hello! Sorry, it's my 1st issue. I talked about Factorialize a Number.

Will you fix it? I don't understand what "blocked" label means.

Hey @ksu-b, thanks for taking the time to bring this up for discussion! :blush:
The blocked-label simply means that more information is needed before any of us issue moderators can do anything with the issue.
Just to make sure I understand you: Do you want to add your suggestion as a requirement for completing the challenge? This would mean adding a test case where the function factorialize is called with a negative num which should result in undefined?

Yes, exactly. I think it would make sense to check if the input number is not negative. I also want to check how issues work and if my suggestion will be accepted and done, and when.

@ksu-b Sorry for the late reply, I'm unfortunately really busy.
Ok! I agree that this challenge could be clarified. However, I think your proposed solution of adding an additional test stating something like "factorialize(num) should return undefined if num is negative" is the optimal way to accomplish this. How about if we simply updated the challenge instructions to clarify that factorialize will always be called with positive values for the argument num? That way, the additional test and the additional step to complete the challenge wouldn't be necessary while still solving the problem you brought up with this issue.
@BKinahan This could be another first-timers-only issue - do you have time to fix some instructions to guide someone who wants to implement it? (Maybe @ksu-b wants to fix this? :blush:)
Here's an outline:
Clarify the instructions for this challenge by adding something like factorialize will always be called with positive values for the argument num. To make this change, edit [Link to one of the challenge seed files] on line XYZ.

@Greenheart but the last test is 0!, which equals to 1 won't make sense anymore if we say it'll always be called with positive values.
Maybe we could change first sentence to

Return the factorial of the provided integer. The given integer will be greater than or equal to zero.


elsehow gentx

Please make sure your node is up and running now. Join #validators on Discord for help: https://discord.gg/QeJWCrE.


fix overlapping issue

For the screen sizes which falls under md, the cards will be of full size and for larger screens the width will be smaller for solving the overlapping issue. This solves the issue #195

Congrats 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow this steps.

SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.


Portable DBC Macros

It became clear from the discussion in #207 that portable DBC macros are needed. We should come up with a strategy for this and implement.

I got hit by a related issue today: if you choose CMake's build type RELEASE or RELWITHDEBINFO, CMake would add -DNDEBUG which would ignore assert. Some of the asserts should really be exceptions, and we need to look carefully to separate them.

Related to #217.


Path animations, now with a shiny use-case

So it's been a year since #12 and I've just seen Lottie https://medium.com/airbnb-engineering/introducing-lottie-4ff4a0afac0e#.pjumsiodw where I've discovered https://github.com/bodymovin/bodymovin that can export after effects animations into a json that you can understand :) (and play it via html but I don't care about that part...)
I know I talked about this (ie. AE -> composition) with more than one person online and during the mvp summit but I wanted to follow up that this seems closer than ever if there's any progress on path animations :)

Path animations have been requested, and this is a gap in the WindowsUI platform that remains to be addressed. Thanks for bringing Lottie to our attention; we'll certainly continue to enable the scenarios that will help you build beautiful and delightful experiences. Your feedback is extremely valuable and we'll be in touch the moment we have any news to share on this front!
Out of curiosity: do you use AfterEffects for motion design when building your applications? Since you mentioned Lottie, I'm trying to get an understanding of your expected workflow (and your tooling preferences) wrt path animations (for UWP or other platforms).

For me, I wish I could use Blend to build path morphing animations like in AE.
Currently I can still use PointAnimation to do simple path morphing (although the performance isn't great as it's running on the UI thread) but it takes a lot of time and also not easy to write.
Though I do believe by the time we have Composition-based path animation support, the performance should be butter smooth, I doubt it would be much easier to write.
So to me tooling is definitely important. I am not entirely sold with Lottie as it's using JSON (unless I am wrong), I'd rather have auto-generated native code, just like how Blend does currently.

If I had time I would take a look using Win2D, I think the performance would be great and you are always updating and drawing, might be even better using the Win2D, Animated Canvas. Hope find time to make some tests. The ideal would be changing values of a SVG? is there animations in SVG? well XAML and SVG are practically the same. I like Inkscape might be has some plugin about animation.

@JustinXinLiu Lottie only uses .json because Bodymovin exports the AE animations as such. I'd be fine with using Blend or whatever to pull it off. Even implicit path animations could be interesting... for a recently common example.:

6 points + a thickness defines 3 lines for a hamburger menu icon
first state: 6 points in 3 lines
second state: 6 points in an X shape (2 of these "hiding")

@juanpaexpedite agreed :) As you say - if I can animate svg files using css I should be able to do the same natively.

BTW the first animation-sharing site is already up for Lottie: http://www.lottiefiles.com/
It'd be a shame if we'd miss the fun :(

It is clear, until we have:
private final List keyframes = new ArrayList<>();
and a generic way like <Keyframe>
The sad part it is making this library is really fast with this core things we need!
Hope now are touching SVG might be touch a bit the XAML core of shapes including the paths to animate them...

In case you want to use the webview 'workaround' here you are: https://mareinsula.wordpress.com/2017/02/21/wrap-lottie-in-uwp-apps/  repo and details inside

We're tracking path animations as part of the general shape support under the request here. Closing this issue, please feel free to upvote on the public backlog.

For now you can just use LottieUWP (https://github.com/azchohfi/LottieUWP/).

This long wait is finally over: https://aka.ms/lottie


Default value morph

This would add an assignment operator (=) that would add undefined as a valid input type (or make a key optional) and create a morph to the specified literal value.
const defaultedString = type("string='foo'")

const defaultedAtKey = type({
    // have to decide whether to require ? on the key here or not
    key: "number=5"
})

const tupleExpressionDefault = type([{a: "boolean" }, "=", {a: true}])

const chainedDefault = type(["number"]).default([1337])

I would propose using "nullish coalescing operator" ?? as a more understandable alternative

Or "nullish assignment operator" ??=

I would propose using "nullish coalescing operator" ?? as a more understandable alternative

Defining default values using = is existing syntax for defaults for both functional and generic parameters.
I'd have to do a bit more thinking on this, but intuitively it seems like = would only apply if the key was not provided at all. If it was provided, but had a value of undefined or null, I think the value would be undefined or null so that would have to be included in the original type for validation to pass.
This preserves the parallel of the existing behavior with exactOptionalPropertyTypes. I'd have to think about what kind of behavior this would entail for shallow types like type("string='foo'"), but that seems like a niche case.

Wow it works now, it's time to try. Is it docs ready? @ssalbdivad

@Senbonzakura1234 Working on updated docs at https://arktype.io now!
The syntax that is currently supported for defining default values on a key is:
type({ foo: "string", bar: ["number", "=", 5] })


Usermode service isn't installed for JIT-capable installations via MSI

Describe the bug
Loading eBPF programs requiring JIT compilation/validation fails, when using just the MSI to install the component.
OS information
N/A
Steps taken to reproduce bug

Build the Release (not the Release-NativeOnly) configuration of the solution
Copy over the MSI to a test device
Install the service. There is no checkbox or other option to enable the usermode service.
Attempt to run netsh ebpf add program ... -- this step fails.

Expected behavior
Programs should be able to be JIT compiled and loaded.
Actual outcome
Operations fail; the error turns out to be an RPC failure, once it's debugged far enough. There is no RPC server to handle the call, because ebpfsvc.exe install wasn't run--and in fact the binary was not deployed on the device at all.
Additional details
This works fine when using the deployment script, but I haven't been in a position to use that script, and have had to come up with various workarounds for my use case. Mostly they come down to copying over the built directory in sum and then using tools from it, but I was surprised by the seeming gap from installing via MSI.

@ben-zen did you specify the /p:ReleaseJIT='True' when building the Release solution locally?


Update sphinx docs table-of-contents with new bloqs locations

@tanujkhattar can you update docs/bloqs/index.rst to reflect the new locations of all the notebooks following the bloq reorganization

I'll do this


Choosing runner: "parallel" in maddpg_ns.yaml causes error.

Setting  runner: "parallel" in maddag_ns.yaml causes error:
TypeError: select_actions() got an unexpected keyword argument 'bs'
Thanks for this impactful work. I look forward to your reply and thank you in advance.

I encountered the same error. This is due to the fact that in the maddpg_controller the function select action has no argument bs. You can solve this by adding bs="" or bs=None in the function select_actions() in the file contollers/maddpg_controllers.pyline 61.  Replace  def select_actions(self, ep_batch, t_ep, t_env=0, test_mode=False): by  def select_actions(self, ep_batch, t_ep, bs="", t_env=0, test_mode=False):. Another solution is to verify is the created mac is an instance of maddpmac in parallel_runner.py file and your call the right function without the bs argument.


feat: remove credential validation on provider startup

Previously we validated that the user specified at least one kind of Equinix credential during provider startup.  This behavior is unusual among Terraform providers and its utility is debatable, because it does not and cannot protect against these situations:

Invalid credentials were provided
Credentials were omitted for a service that is used (e.g., a Metal auth token was specified, but a client ID and secret were needed for the resources in the user's configuration)

In addition to the above shortcomings, validating credentials in the Config type that is shared between SDKv2 and framework providers forces unnecessary changes to the SDKv2 provider if a new service is onboarded to the framework provider.
This removes the credential validation from the config object so that any and all validation of the provider configuration is specified in the provider schema.

I agree that validation was not necessary here. However, Equinix provider adds a bit of complexity by using different types of authentication for different services. I think it might be nice to intercept 401 errors to display a message pointing users to the provider config documentation


Lifecycle events extends – this._super call missing warning is not logged

Description:
While extend a component with a lifecycle event callback without calling this._super() no warning message is logged in console.
Only "last" lifecycle callback is called.
This warning has been introduced with 0.9.0:

Overriding a Ractive prototype method during Ractive.extend without calling _super() will now issue a warning, as it's probably being done in error (#2358)

Versions affected:
0.9.x
Platforms affected:
All
Reproduction:
https://jsfiddle.net/entzhx1q/
const extendConfiguration = {
  oninit() {
    console.info("extendConfiguration oninit");

    this.add('oninitCalls');
  },
};

const MyComponent = Ractive.extend({
  template: `<p>oninit methods has been called:{{oninitCalls}} </p>`,

  data() {
    return {
      oninitCalls: 0,
    };
  },

  oninit() {
    console.info("MyComponent oninit");

    this.add('oninitCalls');
  },
})

const CustomComponent = MyComponent.extend(extendConfiguration);

const r = window.r = new Ractive({
  el: '#main',

  components: {
    CustomComponent,
  },

  template: `

this._super missing warning

    <CustomComponent/>
  `,
  data: {
    hasSomething: true,
  },
});

This one is a little bit tricky. Technically, only methods on the prototype check for _super calls, and the lifecycle methods don't exist on the Ractive prototype. I can definitely see where it would cause problems if you overrode a lifecycle hook without properly deferring to any super hooks. It also causes some test failures when warning about failure to call _super in onlifecycleevent methods.
So, would it make the most sense to:

Make a minor (I think) breaking change and warn about failure to call _super hooks.
Automatically call _super hooks when processing a method hook. This will add a bit of overhead, because each lifecycle event will have to traverse the constructor hierarchy in addition to the component hierarchy.
Make a more major breaking change by removing onlifecycleevent init and extend options in favor of on: { lifecycleevent() {} }.

IMHO This is the most reasonable option.
I think user should explicit the call to _super() method for better readability (and performance): When I see _super() invocation I know that parent component has a onlifecycleevent.
This option might be too "destructive". Not sure if it's worth it..


feat: Dropdown menu on small devices

the Login and Sign up should collapse into a dropdown menu on small screens this will also prevent the logo to move onto next line.
Please assign me under hacktoberfest and gssoc-ext.
Thank You!

Ok you can do this

Any updates

working on it, i was having issues implementing in tailwind.

Ok good

Ok good

Done :saluting_face:


Socket Hang Up Errors

I'm not sure exactly what is causing the error but I believe it is due to this commit:
https://github.com/pgte/nock/commit/f9063fc593138204c6ba01e336095ba18c7b7458
With version 2.17.0 we have no issues with version 2.18.0 our HTTP requests are getting a socket hang up error.
I think it's related to the conditional checking on the http.ClientRequest that was added to support borwserify.
Our current solution is to lock to version 2.17.0. The places where we are getting the socket hang up error do not use nock directly, but seem to be impacted by another set of tests that pull in the nock library.

I believe this is due to the socket not getting close properly.  Looking at the node code this is where that is raised as an error:
https://github.com/nodejs/node-v0.x-archive/blob/v0.12.7/lib/_http_client.js#L214-L218

This may have been fixed by 13b65dd4fc195112453e00a55ae6dce05ed67945, which landed in 3.1.0.
@garrypolley are you able to test with this version?

I'll take a look tomorrow in the morning. I think that may fix it.  Thanks for pointing it out.

I think that will fix it, however, our test suite is having issues right now related to mock data.  I'll try and let you know for sure as soon as I can.

I cannot reproduce the issue currently. Something changed in the last few days with out tests that is no longer getting the socket hang up.
I do believe that the commit shown would resolve the issue I was seeing, since the socket would not get properly closed without it.

@garrypolley Closing for now. Please reopen if you find the bug still occurring.


chore: bdd-nh-1586104762 to 0.0.1

chore: Promote bdd-nh-1586104762 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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


What is playStoreId and why do I need it to run app on my own android?

Help please. I ran through docs 5 times and found that i need to build, then npm run studio. But it says me i should define playStoreId. What is it? Where should I get it? I am confused.

For anyone that gets here like I did, therelevant content of config.json` in the demo project is:
  "appStoreId": "de.scriptpilot.app-framework",
  "playStoreId": "de.scriptpilot.appframework",

👍

Oh, thanks for that. I forgot haw I hate it when someone says in topic: I found solution, thank you all :D And no solution provided


Difference between Code Connect and Code Snippet Editor plugin

With both Code Connect and Code Snippet Editor, we can see the corresponding code for the components. So what makes Code Connect different than Code Snippet Editor?

Hey @AniketBhadane
Code Connect and plugins like Code Snippet Editor are both tools to customize the code output in Dev Mode. But they’re slightly different, and one might be better for your use case than the other.
With Code Connect, code snippets reside within your own codebase, ensuring their accuracy by utilizing real components. This setup facilitates easy collaboration and ensures that code snippets remain up-to-date as your codebase evolves, as any team member can update the associated documents and see connected code snippets in Dev Mode. Code Connect might be right for you if you’re willing to invest a little more for easier onboarding and adoption overall.
Code Snippet Editor (and other similar codegen plugins) generate component code, but don't actually connect to your codebase. Plugins do not require any setup and are really easy to use as an individual designer or developer. It’s a great option if you want to try out the usefulness of more customized code or are maybe working with a framework not currently supported by Code Connect.
Let us know if you need more information!


Added jQuery CDN sample

Q
A

Bug fix?
no

New feature?
no

New sample?
yes

Related issues?
N/A

What's in this Pull Request?
Sample Web Part illustrating using jQuery and its plugins loaded from CDN for building SharePoint Framework Client-Side Web Parts

Hi @waldekmastykarz, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;


validateAll does not validate attached fields

Versions:

VueJs: 2.1.3
Vee-Validate: 2.0.0b17

Description:
Calling validateAll() (scoped or unscoped) does not validate fields that have been added using attach(). An attached field can still be validated directly with validate(), however a subsequent call to validateAll() will clear all errors for the field even if they still apply.
This previously worked in beta 14, but appears to have been broken since beta 15.
Steps To Reproduce:
Attach a field, update its value so it should fail validation and run validateAll(). The behaviour is observable here: https://jsfiddle.net/ju437f61/

I don't think it ever worked, any fields that was attached programatically won't be validated when using validate all, they were  just being registered for validate and validateAll if you pass the values, because the validator had no way to tell the field values upon the time of validateAll call. so the directive used to handle this by attaching event listeners on the vue instance. but since beta 17 it is no longer the case and it now uses a simpler method to get those values.
You can still achieve what you are trying to do by passing a few extra params like here in the example: https://jsfiddle.net/ju437f61/2/
Basically the context function provides whatever you need in the getter function to get a fresh value, in that case I provided the element being attached, the getter function retrieves the value property of that context.
I'm aware its not yet documented, but I will once I finish up few issues.

Ok, I understand. Just need to supply the context and getter for the validator to know how to find the field's value. Thanks for the example!

@logaretm I can't use $ref since I'm using another plugin (vue-upload-component) that inserts the input dynamically. I tried this:
this.$validator.attach({
    name: this.element.inputName,
    scope: this.element.validationScope,
    rules: this.element.rules,
    context: () => this.$el.querySelector(`#${this.id}`),
    getter: (context) => context.value,
});

.. but Error in mounted hook: "TypeError: Cannot read property 'value' of undefined"
I also tried passing the value directly to getter:
this.$validator.attach({
    name: this.element.inputName,
    scope: this.element.validationScope,
    rules: this.element.rules,
    getter: () => this.elementData,
});

.. but that doesn't work either. What am I missing?

@3zzy Depending on your use-case you might prefer to use the Validator.verify method or follow this guide both are better approaches than attaching the field manually since the internal API is always changing and the attach method was only meant to be used by the directive.
I might even deprecate it to reduce the surface area of the API


Allow adding other background maps

At this moment, you can choose some pre-defined background maps. Sometimes, you have better backgrounds available. Please allow the manager to add these (by pasting the URL of a TMS/WMTS source somewhere).
Related to this issue from the previous version.

The repository moved to https://gitlab.com/mapcontrib/mapcontrib.next.

Doing this would avoid needing an issues for things like this


Add Contentful CMS example

Description

Added an example of using Contentful CMS with react-static
Changes/Tasks

[ ] Changed code

Motivation and Context

Screenshots (if appropriate):

Types of changes

[ ] Refactoring/add tests (refactoring or adding test which isn't a fix or add a feature)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] My change requires a change to the documentation.

[ ] I have updated the documentation accordingly.

[ ] My changes have tests around them

Wonderful!


Fix pool item close

Because of goroutine used context, which was closed in defer, item.Close wasn't closing session in table client, but delete it from pool. It causes session leak. This pr fixed this.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.04%. Comparing base (e8897e9) to head (a4c398f).

:exclamation:  There is a different number of reports uploaded between BASE (e8897e9) and HEAD (a4c398f). Click for more details.
HEAD has 526 uploads less than BASE

Flag
BASE (e8897e9)
HEAD (a4c398f)

macOS
24
0

unit
72
2

go-1.21.x
48
1

ubuntu
103
2

go-1.22.x
48
1

integration
72
0

ydb-23.3
24
0

go-1.23.x
55
0

windows
24
0

ydb-24.1
24
0

ydb-24.2
24
0

ydb-nightly
7
0

experiment
7
0

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1562       +/-   ##
===========================================
- Coverage   70.96%   41.04%   -29.93%
===========================================
  Files         363      360        -3
  Lines       37568    37329      -239
===========================================
- Hits        26662    15320    -11342
- Misses       9822    21501    +11679
+ Partials     1084      508      -576

Flag
Coverage Δ

experiment
?

go-1.21.x
43.54% <100.00%> (-26.87%)
:arrow_down:

go-1.22.x
41.01% <100.00%> (-27.47%)
:arrow_down:

go-1.23.x
?

integration
?

macOS
?

ubuntu
41.04% <100.00%> (-29.93%)
:arrow_down:

unit
41.04% <100.00%> (-0.03%)
:arrow_down:

windows
?

ydb-23.3
?

ydb-24.1
?

ydb-24.2
?

ydb-nightly
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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


documentation incorrect regarding postfix override.

Classification
Please delete options that are not relevant.

[X ] Documentation

Reproducibility
Please delete options that are not relevant.

[X] Always

Description
Check your documentation on postfix configuration, according to your run.sh file, the actual file that needs to be created is: /var/mail/postfix/custom.conf

The path is right...
mnt/docker/mail/postfix/custom.conf resolves to /var/mail/postfix/custom.conf.
Just look at the docker-compose.sample.yml:
services:
  mailserver:
  // ...
  volumes:
      - ${VOLUMES_ROOT_PATH}/mail:/var/mail

And sample.env
# Docker volumes parent folder
VOLUMES_ROOT_PATH=/mnt/docker


Add function to limit download page in KB (if page is vary big)

This commit only for convert resp body to string. If Download page is very big, this method is limit download in KB.
P.S
Sorry for my English )

Sorry/ this function work with  bytes, not kilobytes.

@UnixMaster can you provide a use case where this might be useful in a http request library?
As today you can just do io.LimitReader(resp.Body, n) and accomplish the same functionality without adding any further helper methods.


i cannot start apps or google play, wenn i replace the kernel file

Good Evening.
Ich have solve the problem that i kann adb run in super user, but now i can not start any apps , it is a while loading then the windows closed.

Same here. I have 2 kernel files in the GAppsWSA folder, I tried all different combinations of replacement in the WSA folder and I get the same result when opening WSA: loading and then closes.

Me the same

I have the same problem


WIP: Ingress and egress Network policies for mcg-osd deployer

Ingress NetworkPolicy - Allows pod to pod communication within namespace(redhat-data-federation), Blocks traffic from outside redhat-data-federation. As this is applied to all the pods in the Namespace, default deny ingress networkpolicy is not required
EgressNetworkPolicy - Blocks outgoing traffic and allows only the required external domains
Signed-off-by: Vinayakswami Hariharmath<EMAIL_ADDRESS>

/cc @naveenpaul1

/cc @rexagod /cc @aspandey

@v-harihar could you please resolve lint and test the pipeline

/restest

/retest

Please look into the failing test-suite (adding egress to scheme).

@rexagod

Please look into the failing test-suite (adding egress to scheme).

egress is added to schema. I latest failures are not related to this patch.

/retest

/override ci/prow/lint