Automatic downcast wrapped structs for methods that return classes

Is your feature request related to a problem? Please describe.
Example:
resLoader := gdnative.GetSingletonResourceLoader()
res := resLoader.Load("res://Mob.tscn", "", false)
log.Debug("MOB PackedScene: " + res.ToString())

Load returns a Resource struct, but it can be downcasted to a PackedScene struct.
So the practice I've been following is performing the right after getting back the struct:
var scene := gdnative.NewPackedSceneWithOwner(res.GetOwnerObject())

The demo project has this everywhere as well: https://github.com/godot-go/godot-go-demo-projects/blob/0cdda28cec9ad2ce4d4e9980833ea946271bc63f/2d/dodge_the_creeps/pkg/dtc/hud.go#L48
Describe the solution you'd like
Modify the codegen to perform the downcast automatically before returning.
Describe alternatives you've considered
Keep things as is.

We can register all New*****FromOwner func
and make an Downcast on GetOwnerObject with something like this ?
But the type of object are in proprety ?
var constructorRegistry = make(map[string]reflect.Type)

func RegisterConstructor(name string,typedNil interface{}) {
    typeRegistry[name] = reflect.TypeOf(typedNil).Elem()
}

func GetConstructor(name string) interface{} {
    return reflect.New(typeRegistry[name]).Elem().Interface()
}

Yup, that was what I was thinking. That would be the easiest way to approach this problem. Reflection could probably be avoided by having a map of functions since the function signature is the same for all the constructors
ownerConstructors := map[string]func(*GodotObject) Class

...
ownerConstructors["Packed scene"] = NewPackedSceneFromOwnerAsClass

i dont uderstand   Class
anyway my way is not possible in go because interface{} need to be cast
an other way is to return an Object Struct
type Godotocbject struct {
   PackedScene PackedScene
   Label         Label
   ....
}

but
var scene := res.GetOwnerObject().PackedScene
or
var scene := res.GetOwnerObject().(PackedScene)
is same as var scene := gdnative.NewPackedSceneWithOwner(res.GetOwnerObject())  for me
so  it's an dead end ?

i haven't tried type assertions, but might be okay to do that with the current implementation since all class structs have have the same layout in memory, but it's unsafe. if we add additional fields to any of the structs, we'll probably start seeing errors.
take a look at the the Node.GetNode method as an example:
func (o NodeImpl) GetNode(path NodePath) Node {

	// Build null-terminated method arguments array
	// We cannot just use make() to create the slice because cgo
	// prohibits passing nested go pointers to C.
	ptrCArrSize := 1 + 1

	ptrArguments, ptrCArr := AllocNewSlice(ptrCArrSize)

	ptrArguments[ptrCArrSize-1] = nil

	/* USAGE_GDNATIVE_REF (NodePath / NodePath) */
	_arg0 := path
	ptrArguments[0] = unsafe.Pointer(&_arg0)

	/* USAGE_GODOT_CLASS (Node / Node) */
	var ret *GodotObject

	// Call the parent method. Node / Node
	nodeGetNodeMethodBind.Ptrcall(o.Owner, ptrArguments, unsafe.Pointer(&ret))

	defer Free(unsafe.Pointer(ptrCArr))

	runtime.KeepAlive(_arg0)

	runtime.KeepAlive(ptrArguments)

	if ret == nil {
		return nil
	}

	/* USAGE_GODOT_CLASS (Node / Node) */
	return NewNodeWithOwner(ret)

}

the problem is the last return statement:
return NewNodeWithOwner(ret)

lets look at the function implementation:
// NewNodeWithOwner wraps the GodotObject.
func NewNodeWithOwner(owner *GodotObject) Node {
	wrapped := *(*WrappedImpl)(C.go_godot_nativescript_get_instance_binding_data(Nativescript11Api, RegisterState.LanguageIndex, unsafe.Pointer(owner)))

	m := &NodeImpl{}
	m.WrappedImpl = wrapped

	if m.Owner == nil {
		log.Panic("owner should not be null")
	}

	if m.TypeTag == EmptyTypeTag {
		log.Panic("type tag should not be zero")
	}

	return m
}

so as the code exists, the GetNode method will return the *GodotObject wrapped in a NodeImpl struct, even though it could be wrapped in a PackedSceneImpl instead. I'm not 100% certain, but i think the type assertion would fail if you tried to type assert a NodeImpl into a PackedScene.
to allow the type assertion safely, we'll need to modify the NewNodeWithOwner function to something like the following:
constructor := wrappedConstructors[m.TypeTag]
return constructor(wrapped)

the wrapped variable will have the TypeTag of PackedScene and not Node in this case, which is great! we can take the TypeTag to look up the PackedScene constructor and use that to return the proper PackedSceneImpl.
once this happens, then your type assertion can be safely applied.
correct me if i'm wrong as this is all theoretical and untested.

for win only one line of code , we will add  :

code complexity,
estetic ( for me make an assertion with normal api is bad )
maybe slow execution speed

in my mind
var scene := gdnative.NewPackedSceneWithOwner(res.GetOwnerObject())
is better than var scene := res.GetOwnerObject().(PackedScene)
it's just not worth it for me
Maybe we can stall this one and work on struct tag  one who can make our life simpler

in the end, it'll look more like this:
scene := p.GetNode(gdnative.NodePath("somepath/object")).(PackedScene)

the end goal would be to prevent exposing *GodotObject. i think i can knock this one out easily once i get past the SetFinalizer / memory management ticket i'm on; it's kicking my butt.

closing this out as i've deprecated the godot 3.x work favor of godot 4


import error inside async loaded component is hidden by @loadable

🐛 Bug Report
So, just spent a couple of hours debugging this vague error
loadable.esm.js:269 Uncaught TypeError: Cannot convert undefined or null to object
    at getPrototypeOf (<anonymous>)
    at hoistNonReactStatics (hoist-non-react-statics.cjs.js:71)
    at resolveComponent (loadable.esm.js:326)
    at InnerLoadable.loadSync (loadable.esm.js:183)
    at new InnerLoadable (loadable.esm.js:132)
    at constructClassInstance (react-dom.development.js:13308)
    at updateClassComponent (react-dom.development.js:16985)
    at beginWork$1 (react-dom.development.js:18505)
    at HTMLUnknownElement.callCallback (react-dom.development.js:347)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:397)
    at invokeGuardedCallback (react-dom.development.js:454)
    at beginWork$$1 (react-dom.development.js:23217)
    at performUnitOfWork (react-dom.development.js:22208)
    at workLoopSync (react-dom.development.js:22185)
    at renderRoot (react-dom.development.js:21878)
    at runRootCallback (react-dom.development.js:21554)
    at eval (react-dom.development.js:11353)
    at unstable_runWithPriority (scheduler.development.js:643)
    at runWithPriority$2 (react-dom.development.js:11305)
    at flushSyncCallbackQueueImpl (react-dom.development.js:11349)
    at flushSyncCallbackQueue (react-dom.development.js:11338)
    at scheduleUpdateOnFiber (react-dom.development.js:21431)
    at dispatchAction (react-dom.development.js:15816)
    at Object.next (react-hooks.esm.js:215)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at eval (bundle.esm.js:435)
    at Array.forEach (<anonymous>)
    at iterateObserversSafely (bundle.esm.js:435)
    at Object.next (bundle.esm.js:410)
    at invoke (bundle.esm.js:1209)
    at eval (bundle.esm.js:1294)
    at eval (bundle.esm.js:1559)
    at Set.forEach (<anonymous>)
    at eval (bundle.esm.js:1557)
    at Map.forEach (<anonymous>)
    at QueryManager.broadcastQueries (bundle.esm.js:1555)
    at eval (bundle.esm.js:1646)
    at Object.next (Observable.js:308)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at eval (bundle.esm.js:866)
    at Set.forEach (<anonymous>)
    at Object.next (bundle.esm.js:866)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at Object.RetryableOperation.onNext [as next] (bundle.esm.js:44)
The above error occurred in the <InnerLoadable> component:
    in InnerLoadable (created by Context.Consumer)
    in Unknown (created by ForwardRef)
    in ForwardRef (at accountRoutes.js:58)
    in component (at PrivateRoute.js:81)
    in Route (at PrivateRoute.js:81)
    in Query (at SimpleQuery.js:16)
    in SimpleQuery (at PrivateRoute.js:40)
    in PrivateRoute (created by Context.Consumer)
    in withRouter(PrivateRoute) (at accountRoutes.js:54)
    in Switch (at accountRoutes.js:27)
    in Routes (at PrivateRoute.js:81)
    in Route (at PrivateRoute.js:81)
    in Query (at SimpleQuery.js:16)
    in SimpleQuery (at PrivateRoute.js:40)
    in PrivateRoute (created by Context.Consumer)
    in withRouter(PrivateRoute) (at AccountRoutes/index.js:26)
    in Switch (at AccountRoutes/index.js:22)
    in CaptureRouteNotFound (created by Context.Consumer)
    in withRouter(CaptureRouteNotFound) (at AccountRoutes/index.js:21)
    in ScrollToTop (created by Context.Consumer)
    in withRouter(ScrollToTop) (at AccountRoutes/index.js:20)
    in div (at AccountRoutes/index.js:19)
    in ErrorBoundary (created by WithStyles(ErrorBoundary))
    in WithStyles(ErrorBoundary) (at Layout.js:47)
    in main (at Layout.js:42)
    in div (at Layout.js:35)
    in Query (at SimpleQuery.js:16)
    in SimpleQuery (at Layout.js:29)
    in Layout (created by WithStyles(Layout))
    in WithStyles(Layout) (created by Context.Consumer)
    in withRouter(WithStyles(Layout)) (at AccountRoutes/index.js:17)
    in AccountRoutes (created by Context.Consumer)
    in Route (at Routes/index.js:19)
    in Switch (at Routes/index.js:13)
    in Routes (at router/index.js:21)
    in ErrorBoundary (created by WithStyles(ErrorBoundary))
    in WithStyles(ErrorBoundary) (at router/index.js:9)
    in Home (created by Context.Consumer)
    in withRouter(Home) (at App.js:24)
    in AppContextProvider (at App.js:23)
    in I18nProvider (at App.js:22)
    in App (at client.js:33)
    in Provider (at client.js:32)
    in Router (created by BrowserRouter)
    in BrowserRouter (at client.js:31)
    in ThemeProvider (at Theme.js:11)
    in Theme (at client.js:30)
    in Provider (at client.js:29)
    in ApolloProvider (at client.js:28)

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
console.<computed> @ index.js:1
logCapturedError @ react-dom.development.js:19814
logError @ react-dom.development.js:19850
callback @ react-dom.development.js:20961
callCallback @ react-dom.development.js:12929
commitUpdateEffects @ react-dom.development.js:12968
commitUpdateQueue @ react-dom.development.js:12959
commitLifeCycles @ react-dom.development.js:20079
commitLayoutEffects @ react-dom.development.js:22813
callCallback @ react-dom.development.js:347
invokeGuardedCallbackDev @ react-dom.development.js:397
invokeGuardedCallback @ react-dom.development.js:454
commitRootImpl @ react-dom.development.js:22585
unstable_runWithPriority @ scheduler.development.js:643
runWithPriority$2 @ react-dom.development.js:11305
commitRoot @ react-dom.development.js:22414
runRootCallback @ react-dom.development.js:21554
(anonymous) @ react-dom.development.js:11353
unstable_runWithPriority @ scheduler.development.js:643
runWithPriority$2 @ react-dom.development.js:11305
flushSyncCallbackQueueImpl @ react-dom.development.js:11349
flushSyncCallbackQueue @ react-dom.development.js:11338
scheduleUpdateOnFiber @ react-dom.development.js:21431
dispatchAction @ react-dom.development.js:15816
next @ react-hooks.esm.js:215
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
(anonymous) @ bundle.esm.js:435
iterateObserversSafely @ bundle.esm.js:435
next @ bundle.esm.js:410
invoke @ bundle.esm.js:1209
(anonymous) @ bundle.esm.js:1294
(anonymous) @ bundle.esm.js:1559
(anonymous) @ bundle.esm.js:1557
QueryManager.broadcastQueries @ bundle.esm.js:1555
(anonymous) @ bundle.esm.js:1646
next @ Observable.js:308
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
(anonymous) @ bundle.esm.js:866
next @ bundle.esm.js:866
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
RetryableOperation.onNext @ bundle.esm.js:44
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
next @ bundle.esm.js:29
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
next @ Observable.js:312
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
(anonymous) @ bundle.esm.js:85
(anonymous) @ bundle.esm.js:85
next @ bundle.esm.js:83
notifySubscription @ Observable.js:130
onNotify @ Observable.js:165
next @ Observable.js:219
(anonymous) @ bundle.esm.js:74
Promise.then (async)
(anonymous) @ bundle.esm.js:73
Subscription @ Observable.js:183
subscribe @ Observable.js:262
OperationBatcher.consumeQueue @ bundle.esm.js:73
(anonymous) @ bundle.esm.js:106
setTimeout (async)
OperationBatcher.scheduleQueueConsumption @ bundle.esm.js:103
(anonymous) @ bundle.esm.js:37
Subscription @ Observable.js:183
subscribe @ Observable.js:262
(anonymous) @ bundle.esm.js:13
Promise.then (async)
(anonymous) @ bundle.esm.js:12
Subscription @ Observable.js:183
subscribe @ Observable.js:262
(anonymous) @ Observable.js:305
Subscription @ Observable.js:183
subscribe @ Observable.js:262
(anonymous) @ bundle.esm.js:11
Subscription @ Observable.js:183
subscribe @ Observable.js:262
RetryableOperation.try @ bundle.esm.js:122
RetryableOperation.start @ bundle.esm.js:110
RetryLink.request @ bundle.esm.js:153
(anonymous) @ bundle.esm.js:160
(anonymous) @ bundle.esm.js:160
(anonymous) @ bundle.esm.js:160
(anonymous) @ bundle.esm.js:155
execute @ bundle.esm.js:187
QueryManager.getObservableFromLink @ bundle.esm.js:1588
(anonymous) @ bundle.esm.js:1630
QueryManager.fetchRequest @ bundle.esm.js:1629
(anonymous) @ bundle.esm.js:1146
step @ tslib.es6.js:99
(anonymous) @ tslib.es6.js:80
(anonymous) @ tslib.es6.js:73
__awaiter @ tslib.es6.js:69
QueryManager.fetchQuery @ bundle.esm.js:1092
QueryManager.observeQuery @ bundle.esm.js:1460
ObservableQuery.setUpQuery @ bundle.esm.js:388
ObservableQuery.onSubscribe @ bundle.esm.js:366
(anonymous) @ bundle.esm.js:96
Subscription @ Observable.js:183
subscribe @ Observable.js:262
QueryData.startQuerySubscription @ react-hooks.esm.js:206
QueryData._this.getExecuteResult @ react-hooks.esm.js:72
QueryData.execute @ react-hooks.esm.js:88
(anonymous) @ react-hooks.esm.js:347
useDeepMemo @ react-hooks.esm.js:321
useBaseQuery @ react-hooks.esm.js:347
useQuery @ react-hooks.esm.js:356
Query @ react-components.esm.js:8
renderWithHooks @ react-dom.development.js:15108
mountIndeterminateComponent @ react-dom.development.js:17342
beginWork$1 @ react-dom.development.js:18486
beginWork$$1 @ react-dom.development.js:23193
performUnitOfWork @ react-dom.development.js:22208
workLoopSync @ react-dom.development.js:22185
renderRoot @ react-dom.development.js:21878
scheduleUpdateOnFiber @ react-dom.development.js:21419
scheduleRootUpdate @ react-dom.development.js:24319
updateContainerAtExpirationTime @ react-dom.development.js:24347
updateContainer @ react-dom.development.js:24436
(anonymous) @ react-dom.development.js:24963
unbatchedUpdates @ react-dom.development.js:21687
legacyRenderSubtreeIntoContainer @ react-dom.development.js:24962
hydrate @ react-dom.development.js:25029
(anonymous) @ client.js:60
checkReadyState @ loadable.esm.js:425
(anonymous) @ loadable.esm.js:435
loadableReady @ loadable.esm.js:410
(anonymous) @ client.js:23
./src/client.js @ client.chunk.js:6449
__webpack_require__ @ bundle.js:786
fn @ bundle.js:151
1 @ client.chunk.js:12567
__webpack_require__ @ bundle.js:786
checkDeferredModules @ bundle.js:46
webpackJsonpCallback @ bundle.js:33
(anonymous) @ client.chunk.js:1
Show 106 more frames
index.js:1 Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.
    at Object.invokeGuardedCallbackDev (react-dom.development.js:408)
    at invokeGuardedCallback (react-dom.development.js:454)
    at beginWork$$1 (react-dom.development.js:23217)
    at performUnitOfWork (react-dom.development.js:22208)
    at workLoopSync (react-dom.development.js:22185)
    at renderRoot (react-dom.development.js:21878)
    at runRootCallback (react-dom.development.js:21554)
    at eval (react-dom.development.js:11353)
    at unstable_runWithPriority (scheduler.development.js:643)

Not very actionable and very hard to understand. Until you start looking inside loadable.esm
To my surprise, I found this error there:
"ReferenceError: EMAIL_FRAGMENT is not defined
    at eval (webpack-internal:///./src/shared/modules/sorteio/graphql.js:140:94)
    at Module../src/shared/modules/sorteio/graphql.js
[...]

It was a Graphql gql string that imported ${EMAIL_FRAGMENT} which didn't exist.
A 2 seconds fix. If you encounter an error like this, do a debugger break at the error catch in loadable and you will see what's going on.
To Reproduce
Not sure if this is easily reproducible. It might be related to the hierarchy of babel plugins I use.
The component in question was loaded by react-router through @loadable/component.
Expected behavior
The actual error should bubble to the top.
Link to repl or repo (highly encouraged)
Run npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here:

## System:
 - OS: macOS 10.14.6
 - CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
 - Memory: 148.71 MB / 16.00 GB
 - Shell: 3.2.57 - /bin/bash
## Binaries:
 - Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
 - Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.3/bin/yarn
 - npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman

Loadable thinks that component is "ready", as long as it present in the webpack module cache, and tries to use it.
However, it is not present. It's not absolutely clear why module export was broken (that's why you got the error), but it haven't broke your whole application.
That might be the problem:

load loadable
loadAsync
run time exception, reject, set error state
suspense more is active, so error would be thrown, and react would recreate loadable. Look like you don't have proper ErrorBoundary set up.
loadable checks isReady in the constructor, and it is(by also broken), tries to loadSync, this error.

In short - there is a bug handling non-network exceptions. However - without React recreating

@theKashey can we do something to fix it in loadable?

I could think only about one solution:

loadAsync
catch an error
check if the module is "ready". That means - this is not network error, but run time error after module load, and we could not nor recover from it(only delete webpack module cache), nor stand as described in the issue. <<-----
so console.error it to let the user know <<-----
(optional) mark location as "broken", and throw the "right" error next time React will render you.
(optional) do not throw error in this case, as long as it would not help, but display the error.

Could you submit a PR to fix it?

Not to "fix", but to "soften"

I ran into this bug while mixing loadable and lazy - main routes were loaded with loadable and in the  code path was also a lazy component which kept showing the error mentioned by the original post. I haven't been able to get lazy to work within our ssr app yet, but will update with more findings at some point.

@FavideDaniel Interesting! So, you created a new package for front end code?

@FavideDaniel Interesting! So, you created a new package for front end code?

Um.. I was working on solving a problem at work and it's code that existed prior to the days of razzle and next.js. Our specific issue was the conflating of babel + webpack which inadvertently touch the isomorphic code in a way where the evaluation of the webpacked code was running into problems. I did not create a package to solve this. I would consider what I was dealing with an effect of carrying tech debt and simply tackled that debt by not running babel over code which can now be written for node 10 (was previously being transpiled from when we were at node 6 at my company).

I was accidentally exporting non-default exports, but was treating them as default exports with the import(...) call.
The solution for me was to change my named exports to default exports.

default export worked for me too! thanks


[Docs] Expand MetaSchedule API Document

Following up #14480, some of the secondary classes are not compiled into MetaSchedule API documents. This PR fixes this issue by expanding the original indexing file and introduce more documents.
CC: @junrushao

@zxybazh Could you please fix the CI and we can get it merged

Yeah sure I'm looking into the failed documents and will send fixes.

Any update? @zxybazh

Thanks @Hzfengsy for checking in! Sorry I got a bit occupied and haven’t got enough time to fix these issues. The introduced fix caused hundreds of issues with Sphinx because the CI was not enabled when writing MS documents. I’ll put some more time and get those issues fixed soon.

This PR has been open for too long, let's close this one and follow up when there's time to finish document fixing.


StaticRouter missing

Version
^4.0.0-alpha.5
^4.0.0-beta.2
Steps to reproduce
npm install
build with webpack
Result
ERROR in ./~/react-router/index.js Module not found: Error: Cannot resolve 'file' or 'directory' ./StaticRouter in /<PROJECT>/node_modules/react-router  @ ./~/react-router/index.js 26:21-46
I looked at node_modules/react-router/index.js line 26 is var _StaticRouter2 = require('./StaticRouter'); however StaticRouter.js is not in the mode_modules/react-router directory after npm install.

It looks like it could be caused by,
"files": [
    "Core.js",
    "MemoryRouter.js",
    "Prompt.js",
    "Redirect.js",
    "Route.js",
    "Router.js",
    "ServerRouter.js",
    "Switch.js",
    "index.js",
    "matchPath.js",
    "withRouter.js",
    "README.md",
    "umd"
  ],

in package.json, I noticed that StaticRouter.js is missing.

@wolfadex You can edit out the alpha version reference as this is beta related.
@mjackson It looks likes "ServerRouter.js" was never updated to "StaticRouter.js" Also, "Core.js" can be removed from that list.

+1

Merged in #4389. Just needs a release and we'll be good.

Thanks, @wolfadex! So many things to remember before cutting a release...

@mjackson np it happens to all of us, just happy to be able to use it.

If you are eager to use the beta; you can move the missing file from node_modules/react-router to node_modules/react-router-dom, and rename ServerRouter.js to StaticRouter.js


BUILD FAILED (OS X 10.14.6 using ruby-build 20191105)

BUILD FAILED (OS X 10.14.6 using ruby-build 20191105)

Inspect or clean up the working tree at /var/folders/vy/2znpsb954sx15jhfjvbymk1jgrbypv/T/ruby-build.20191110105506.57814.IiprKJ
Results logged to /var/folders/vy/2znpsb954sx15jhfjvbymk1jgrbypv/T/ruby-build.20191110105506.57814.log

Last 10 log lines:
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/xxxx/.runtimes/Ruby23x
<EMAIL_ADDRESS>  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  CFLAGS= -O3 -Wno-error=shorten-64-to-32
  LDFLAGS=-L/Users/xxxx/.runtimes/Ruby23x/lib
  CPPFLAGS=-I/Users/xxxx/.runtimes/Ruby23x/include

Got this error, don't know how to resolve this issue. Please advice any workaround?

You seem to have tried installing Ruby 2.3. This is an old version of Ruby that is not compatible with OpenSSL 1.1.
You can try this:
brew install<EMAIL_ADDRESS>RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix<EMAIL_ADDRESS>ruby-build ...

That works for me. Thank you!


Improve Generated Documentation + Generator documentation

It would be good to work on the generated documentation. Currently as a dev running the generator for the first time I need to make a lot of assumptions about how the generated application works without documentation.
In my mind here are the things I'd look at as a developer running the generator for the first time.

How do I run the application (npm start?)
Where do files live that I might need to modify
Where do I need to add code to add in a new pages/sections
Where should I put UI code?
What should the code look like that I add in/create. (do I need a preloader like App currently has for the react router)

Also it would be good to write a note in:
https://github.com/Jam3/generator-jam3/blob/master/README.md
That documentation for platform specific code will exist in the generated README.md.
Also might not be bad to explain what vendor.js is. I have no context for what it is but I'm asked to answer if I need a vendor.js

@mikkoh The advantage to use vendor.js is mainly for catching. The vendors on production has low probability to change, so it is a good idea split the code thinking on this

For me it's also to have a smaller app.js, so that when I need to inspect the transpiled code (happens a few times each project) it doesn't take 45 seconds to open up each time the file changes
Perhaps a better prompt may be "would you like to extract third party dependencies into a separate vendor.js"

Add documentation on how to have more environments  in config.json


Cannot build model from audio files with a length of 3 seconds

I'm trying to create my own model. Google's Command Speech Set serves as the basis. Additionally I have six keywords (alexa / jarvis / computer are three of them), which are longer than 1 second. Therefore I brought all WAVs to a length of 3 seconds (many have silence at the end). Then I call:
python -m utils.train --wanted_words alexa jarvis computer down left right learn dog sheila marvin --dev_every 1 --n_labels 12 --n_epochs 26 --weight_decay 0.00001 --lr 0.1 0.01 0.001 --schedule 3000 6000 --input_length 48000 --model res8 --no_cuda true --pos_key_size 1000 --data_folder ./speech_commands_v0.02/ --output_file ./speech_commands_v0.02/model.pt
(input_length is set to 48000 because of the audio lengths)
However, this leads to the following error:

File "workspace/voice/honk/utils/model.py", line 258, in collate_fn
audio_tensor = torch.from_numpy(self.audio_processor.compute_mfccs(audio_data).reshape(1, 101, 40))
ValueError: cannot reshape array of size 12040 into shape (1,101,40)

I don't know what to do with the message or how to fix it.
When adding param "--audio_preprocess_type PCEN" I am able to create the model. From this I can also create the file with the weights and use it in Honkling. But the recognition doesn't work at all. It constantly recognizes "computer" and nothing else, even if this keyword is not spoken at all or something is spoken at all.
What can I do to make it work?

Ah, that's a bug. Can you try replacing that line with
audio_tensor = torch.from_numpy(self.audio_processor.compute_mfccs(audio_data).reshape(1, -1, 40))?

Yes, thank you very much, the change allowed me to create the model 👍🏻
The final test accuracy was 0.921, which sounds not too bad. (I have used only 10 epochs).
So I have created the JS-file with the weigths based on this model and fed it into Honkling. But with Honkling the recognition is poorly bad and almost all keywords are recognized wrong.
Maybe this is because I padded all WAVs to a length of 3 seconds and all WAVs from Google's Speech Command Set now have 2 seconds of silence at the end? But the additional keywords I added just have a length of 1.5 to 3 seconds and I didn't know what a better way would have been.
Or do I have to adjust the code in Honk or Honkling to get along with WAVs > 1 second?

@ljj7975 can best answer any Honkling questions. My guess is that Honkling also needs to be modified to support three-second audio.
Alternatively, if you'd like to support variable-length audio, you can use either a CTC-based decoder or one of those streaming seq2seq models.

Though I tried my best to make Honkling configurable,
I have never tried supporting audio longer than 1 second.
Can you try updating these?
https://github.com/castorini/honkling/blob/master/common/config.js#L9
https://github.com/castorini/honkling/blob/master/common/config.js#L232
https://github.com/castorini/honkling/blob/master/common/offlineAudioProcessor.js#L12

I haven't managed it yet. But now I know where to start, hopefully to get it to work.
Thank you very much!

That is great to hear.
Please let us know if you get it working so we can add the instruction on our page.
Thanks!


Set charset to utf-8 when sending JSON data.

See https://predictionio.atlassian.net/browse/PDIO-638 .

Thanks!


Test in other browsers/environments?

Notably:

Safari seems much more popular than Firefox. Selenium supports Safari, just needs some GH actions tinkering to get these to run on MacOS. To support the webworker tests as well will require finding the equivalent of profile.setPreference("privacy.file_unique_origin", false) or options.addArguments("--allow-file-access-from-files").

I think this would be worth doing! The main reason I didn't is the fact that Chrome, Safari, and Firefox all behave similarly with respect to the polyfill. The more the merrier though, particularly now that we're decoupled from CE.


ValueError: unconverted data remains: , 2020

In the function data of covid.py, the value in chart['xAxis']['categories'] is now in the format of Feb 15, 2020, for example, so there is no need to add ', 2020' in datetime.strptime().
Suggestion:
y = [datetime.strptime(value, '%b %d, %Y') for value in chart['xAxis']['categories']]

Hi I'm having the same issue.... ValueError: unconverted data remains: , 2020

Hi I'm having the same issue.... ValueError: unconverted data remains: , 2020

Same issue

Same issue

Hi again @sashih, @RafaelMendozaArriaga and @akhilarj! Thank you all for reporting this issue, can anyone send me the sample call that keeps having the error?
Will try to fix it this afternoon as as far as I could test that was solved for the sample call you sent me the other day, anyway, I'll debug it again so as to spot the error there! 🤗

Hi again @sashih, @RafaelMendozaArriaga and @akhilarj! Thank you all for reporting this issue, can anyone send me the sample call that keeps having the error?
Will try to fix it this afternoon as as far as I could test that was solved for the sample call you sent me the other day, anyway, I'll debug it again so as to spot the error there! 🤗

I run it in ipython --pylab after importing covid_daily module. Line 162 in covid.py is what I use to fix the bug.

I run it in ipython --pylab after importing covid_daily module. Line 162 in covid.py is what I use to fix the bug.

Hi @sashih could you please try to update the package with:
pip install covid_daily==1.2

And then trying to retrieve the information as it follows:
import covid_daily

data = covid_daily.data(country='taiwan', chart='graph-cases-daily', as_json=False)

Thank you! 🤗

Hi @sashih could you please try to update the package with:
pip install covid_daily==1.2

And then trying to retrieve the information as it follows:
import covid_daily

data = covid_daily.data(country='taiwan', chart='graph-cases-daily', as_json=False)

Thank you! 🤗

Anyway, does the line 162 of your covid.py file solve the problem? As I was not sure whether the graphs provided by Worldometers.info had the full date or just the date in format: %m %d.
Just let me know so that I can fix it ASAP! 👍🏻

Anyway, does the line 162 of your covid.py file solve the problem? As I was not sure whether the graphs provided by Worldometers.info had the full date or just the date in format: %m %d.
Just let me know so that I can fix it ASAP! 👍🏻

Hi Alvaro,
Thank you for doing this..  please see that even verifying version 1.2 was installed (I uninstalled and re-installed the version, see the “version” printout in the log) the error still exist.
I’m also printing the log from the installation, perhaps there is a library missing?
Thanks
Rafa

On Jan 25, 2021, at 6:00 AM, Álvaro Bartolomé<EMAIL_ADDRESS>wrote:
Hi @sashih https://github.com/sashih could you please try to update the package with:
pip install covid_daily==1.2
And then trying to retrieve the information as it follows:
import covid_daily
data = covid_daily.data(country='taiwan', chart='graph-cases-daily', as_json=False)
Thank you! 🤗
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-766767224, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7UPF7HETU2PMWLLCN3S3VMNRANCNFSM4WRABOWA.

Hi Alvaro,
Thank you for doing this..  please see that even verifying version 1.2 was installed (I uninstalled and re-installed the version, see the “version” printout in the log) the error still exist.
I’m also printing the log from the installation, perhaps there is a library missing?
Thanks
Rafa

On Jan 25, 2021, at 6:00 AM, Álvaro Bartolomé<EMAIL_ADDRESS>wrote:
Hi @sashih https://github.com/sashih could you please try to update the package with:
pip install covid_daily==1.2
And then trying to retrieve the information as it follows:
import covid_daily
data = covid_daily.data(country='taiwan', chart='graph-cases-daily', as_json=False)
Thank you! 🤗
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-766767224, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7UPF7HETU2PMWLLCN3S3VMNRANCNFSM4WRABOWA.

No problem @RafaelMendozaArriaga, thanks for sharing the output! I'll check it later today and if I manage to fix it I'll update the code and generate a newer version so as to solve this as this issue is affecting more users 💪🏻

No problem @RafaelMendozaArriaga, thanks for sharing the output! I'll check it later today and if I manage to fix it I'll update the code and generate a newer version so as to solve this as this issue is affecting more users 💪🏻

Check the new release, this should be fixed now! 🤗 @sashih @RafaelMendozaArriaga @akhilarj
pip install covid_daily==1.3.0

Check the new release, this should be fixed now! 🤗 @sashih @RafaelMendozaArriaga @akhilarj
pip install covid_daily==1.3.0

1.3.0 works! 2021 year is correct now (US data)

1.3.0 works! 2021 year is correct now (US data)

Thanks a lot,
I will test it shortly..
Rafa

On Jan 25, 2021, at 3:58 PM, enigmamr<EMAIL_ADDRESS>wrote:
1.3.0 works! 2021 year is correct now (US data)
https://user-images.githubusercontent.com/1919473/105771317-3c90b300-5f15-11eb-9e7a-2c5d47ef2142.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-767139250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7QOTOXNAQPQR7XTYFDS3XSQRANCNFSM4WRABOWA.

Thanks a lot,
I will test it shortly..
Rafa

On Jan 25, 2021, at 3:58 PM, enigmamr<EMAIL_ADDRESS>wrote:
1.3.0 works! 2021 year is correct now (US data)
https://user-images.githubusercontent.com/1919473/105771317-3c90b300-5f15-11eb-9e7a-2c5d47ef2142.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-767139250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7QOTOXNAQPQR7XTYFDS3XSQRANCNFSM4WRABOWA.

Cool! Remember to star the repo, follow me here on GitHub and on Twitter at https://twitter.com/alvarobartt so as to get notified from all the updates and projects I'm working on! ⭐

Cool! Remember to star the repo, follow me here on GitHub and on Twitter at https://twitter.com/alvarobartt so as to get notified from all the updates and projects I'm working on! ⭐

Hi Alvaro, it works now,  thanks!

Hi Alvaro, it works now,  thanks!

Alvaro,
Quick question,   why did the version 1.1  and 1.0  broke as well after  the version 1.2 was created?…
Did you modify both codes?.. I tried to go back to version 1.1 and it was throwing the same error.
I’m asking because if I add this to an automated process, I’d like to know whether there is any risk the that a newer, version (whenever arrives) if it contains a bug or something, would affect previous versions as well?
Thanks
Rafa

On Jan 25, 2021, at 4:00 PM, Álvaro Bartolomé<EMAIL_ADDRESS>wrote:
Cool! Remember to star the repo, follow me here on GitHub and on Twitter at https://twitter.com/alvarobartt https://twitter.com/alvarobartt so as to get notified from all the updates and projects I'm working on! ⭐
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-767140933, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7QUVRQNBIADBFIIMT3S3XSZNANCNFSM4WRABOWA.

Alvaro,
Quick question,   why did the version 1.1  and 1.0  broke as well after  the version 1.2 was created?…
Did you modify both codes?.. I tried to go back to version 1.1 and it was throwing the same error.
I’m asking because if I add this to an automated process, I’d like to know whether there is any risk the that a newer, version (whenever arrives) if it contains a bug or something, would affect previous versions as well?
Thanks
Rafa

On Jan 25, 2021, at 4:00 PM, Álvaro Bartolomé<EMAIL_ADDRESS>wrote:
Cool! Remember to star the repo, follow me here on GitHub and on Twitter at https://twitter.com/alvarobartt https://twitter.com/alvarobartt so as to get notified from all the updates and projects I'm working on! ⭐
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarobartt/covid-daily/issues/5#issuecomment-767140933, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVRX7QUVRQNBIADBFIIMT3S3XSZNANCNFSM4WRABOWA.

works now. Thanks much for the quick fix.

works now. Thanks much for the quick fix.

Hi @RafaelMendozaArriaga that issue keeps on happening on those versions as Worldometers.info modified how the dates are displayed, which means that the conversion to %M %d, %Y is no longer needed. So on, those versions are deprecated due to a website update on Worldometers.info, that, as you may know, I can't do anything about it 😩
This means that the master version will always be working as it's not uploaded to PyPI until the build success, so the way to trust this is to make sure that once the website is modified someone reports the issue so that I can fix it ASAP 👍🏻
Just install the new version and that should work properly!
pip install covid_daily==1.3.0

Or just upgrade the current version you have!
pip install covid_daily --upgrade

Hi @RafaelMendozaArriaga that issue keeps on happening on those versions as Worldometers.info modified how the dates are displayed, which means that the conversion to %M %d, %Y is no longer needed. So on, those versions are deprecated due to a website update on Worldometers.info, that, as you may know, I can't do anything about it 😩
This means that the master version will always be working as it's not uploaded to PyPI until the build success, so the way to trust this is to make sure that once the website is modified someone reports the issue so that I can fix it ASAP 👍🏻
Just install the new version and that should work properly!
pip install covid_daily==1.3.0

Or just upgrade the current version you have!
pip install covid_daily --upgrade


TypeError: moment.default is not a function

react-dates version
<EMAIL_ADDRESS>react version
<EMAIL_ADDRESS>Describe the bug
I use react to build theme wordpress. When I use react-dates component. The error display as attachment image.

My webpack config is:
const defaults = require("@wordpress/scripts/config/webpack.config");
const path = require("path");
module.exports = {
  ...defaults,
  externals: {
    react: "React",
    "react-dom": "ReactDOM",
  },
  node: {
    fs: "empty",
    module: "empty",
  },
  resolve: {
    modules: ["node_modules"],
  },
  module: {
    ...defaults.module,
    rules: [
      ...defaults.module.rules,
      {
        use: "babel-loader",
        exclude: /node_modules/,
        test: /\.js$/,
      },
      {
        test: /\.css$/i,
        use: ["style-loader", "css-loader"],
      },
  },
};

Can you give me advice for webpack config or something for it?

Did you figure out your issue?
Typically this is a babel configuration error.

Thank you very much @ljharb. This issue related babel configuration. I resolved this issue.


chore: Provide adapter and pipeline preview as stream

Purpose

Replace the polling-based provision of stream and pipeline preview with a streaming approach to improve performance and avoid that data gets lost when connections are opened and closed multiple times.
Remarks

PR introduces (a) breaking change(s): no
PR introduces (a) deprecation(s): no

Just out of curiosity, how is the stream stopped when the preview is closed in the UI?

The streaming output should be closed if the request is canceled. In addition, I added a fallback so that the connection is automatically closed by the server after three minutes.


Added clarifications in INSTALL readme for newcomers

Added clarifications in order to avoid that newcomers encounter this error when trying to build:
configure: error: libdb_cxx headers missing, Dash Core requires this library for wallet functionality
(see issue https://github.com/dashpay/dash/issues/1442 )

NOTE: Travis is failing due to missing mac os sdk - that's ok, should be fixed by #1483


2021 week 24: rebase off upstream

Rebase conflict caused by changes to .github/workflows/ci.yml . Action: Remove the file and continue rebase. No other conflicts appear.

Running the regression causes these errors to appear:
error[E0599]: no method named `vtable_methods` found for struct `TyCtxt<'tcx>` in the current scope
   --> compiler/rustc_codegen_llvm/src/gotoc/monomorphize/collector.rs:813:31
    |
813 |             let methods = tcx.vtable_methods(poly_trait_ref);
    |                               ^^^^^^^^^^^^^^ method not found in `TyCtxt<'tcx>`

error[E0599]: no method named `vtable_methods` found for struct `TyCtxt<'tcx>` in the current scope
   --> compiler/rustc_codegen_llvm/src/gotoc/rvalue.rs:745:14
    |
745 |             .vtable_methods(trait_ref_t)
    |              ^^^^^^^^^^^^^^ method not found in `TyCtxt<'tcx>`

error[E0599]: no method named `vtable_methods` found for struct `TyCtxt<'tcx>` in the current scope
   --> compiler/rustc_codegen_llvm/src/gotoc/typ.rs:194:22
    |
194 |                     .vtable_methods(poly)
    |                      ^^^^^^^^^^^^^^ method not found in `TyCtxt<'tcx>`

error: aborting due to 3 previous errors

Investigating now.

The errors seem to be caused by a refactor of vtable code coming from this commit
Action: Replace calls to vtable_methods by vtable_entries. Add filters to match on method entries.

Branch (main-152-2021-06-17)[https://github.com/model-checking/rmc/tree/main-152-2021-06-17] is the new candidate. The changes implemented above are in this commit.


Versioning scheme convention

Right now I'm trying to match versions with the latest Typst version (currently 0.10.0 -- current npm package is<EMAIL_ADDRESS>https://github.com/typst/typst/releases
https://www.npmjs.com/package/typst?activeTab=versions
note that there's a X.Y.Z-N where N goes up. idk if that's the "right" way to do it or not? are there other projects that do it better/differently? is there a convention to this? basically I want a four-part semver specific not a three part specifier lol.
Sidenote: should the first 0.11.0 release be<EMAIL_ADDRESS>or<EMAIL_ADDRESS>or<EMAIL_ADDRESS>?

i think ill do it sorta like debian does https://serverfault.com/questions/604541/debian-packages-version-convention where it's 1.2.3-1 and then 1.2.3-2? that's what im already doing lol.

Actually what if I did more of a "bindings" approach instead of a "redist" approach?
https://github.com/semver/semver/issues/352
What about something like this:

typst-cli: 0.10.0-1 -- holds JUST the binary cli blob, uses 1.2.3-1 versioning like debian. this is a redist
typst: 1.0.0+0.10.0 -- holds all the magic fancy bindings and types and such. uses 1.2.3+4.5.6 versioning where 4.5.6 is the "underlying lib" of the bindings wrapper 1.2.3?


Fixed category thread problem

When you try to add category and type very fast (or delete very fast), it was hanging. As far as I understand, the reason was, AsyncTask doInBackgrounds can’t finish when you are too fast and somehow you have several running doInBackground methods, even if you cancel the tasks. Sometimes, they run in an order without problem, but when a magical thing happens which I am not sure about, the first task never ends and the others hang consequently.
After uploading 22 test images, changing only 2 line is a little sad though:)
#667 I couldn't reproduce the error after this two line fix. Could you please test it too? Could you try to type fast? @misaochan @nicolas-raoul

I can't be sure, but I don't think the issue is caused by typing fast. The reason is that I never "type" on my phone - I use Swype (Samsung feature), which brings up the entire word instantly, not letter-by-letter. Yet I have experienced this issue sometimes.

My suspicion is that this happens when we search for a category that doesn't exist. Then it stays stuck forever even after clearing the search or initiating a new search. But this needs more testing to confirm it.

I t is not typing too fast actually, it is updating search filter too fast. Or maybe it is not the speed but too many characters input

Sorry for the wait @neslihanturan . This does indeed solve the problem for me. Now we just need to figure out a way to solve the problem AND not create a bazillion executors... 😆

Yes, I still try to find a acceptable solution but I couldn't yet. I explained the things under the issue #667

Well, I tried to subclass library codes. However, the classes that I need was using default access modifiers on their constructors. So we can't access to super constructor from subclass. Thus, I imported the codes locally and implemented required changes.
Please test if my patch solves the issue. Plus, I would be very happy if someone knows an inheritance trick to override methods in this case, so that I can learn.
Note: When you send too much inputs, it might take a little time to display results. Please be patient.

@neslihanturan There is a suggestion at #662 by @psh that using the 'debounce' operator in RxJava might solve the problem. If no one is opposed to that change, perhaps it might be a better way of going about things, especially in view of the difficulties with the imported libraries?

Importing libs is only importing 6 classes actually. However if someone is willing to fix them with Guava,  we can wait for it of course.

Importing libs is only importing 6 classes actually. However if someone is willing to fix them with Guava,  we can wait for it of course.

@nicolas-raoul Do you think the modification of external libraries is feasible/recommended? If yes, are there any legal implications? YuviPanda has copyrighted those libraries but he did state that they are released under the Apache 2.0 license, does that allow modification and redistribution?

We are Apache 2.0, so yes we can include the code itself of a Apache 2.0 library in our code and modify it, no problem.


DEV: DX wishlist

[ ] make a task which runs pre-commit without installing it (if requested?)
[ ] switch to pixi run tests (https://github.com/scientific-python/specs/pull/324)
[x] Set up https://allcontributors.org
[ ] Set up codecov

I wasn't sure about these things (especially allcontributors) because it seemed to require access to the full data-apis organization, and I wasn't clear what that entailed. You should get feedback from @rgommers on this.

yeah, these are not high priority at all, I just thought it would be useful to keep track of them in an issue somewhere.

I already enabled all-contributors when this repo was set up. Pixi sounds great, Codecov sounds fine too (as long as it's the config that doesn't comment but just adds the CI job entry with a link).
Pre-commit: sure, if you like it, go for it - you're doing most of the work here after all. As long as it's not mandatory and not hardcoded into the Pixi config preferably, because that will make it unusable for me. I'm happy for CI to fail and fix it up, or for pre-commit to add an extra auto-fix commit to my PR.

Pre-commit: sure, if you like it, go for it - you're doing most of the work here after all. As long as it's not mandatory and not hardcoded into the Pixi config preferably, because that will make it unusable for me.

Okay great, that's the request I was looking for. Currently, pixi run lint installs pre-commit locally, but I understand that that is too workflow-prescriptive (I just punted on fixing it until somebody asked).

Codecov sounds fine too (as long as it's the config that doesn't comment but just adds the CI job entry with a link).

Sounds good - please could one of you go to https://app.codecov.io/gh/{your-username}/array-api-extra/new and add the CODECOV_TOKEN secret?

Done:


[Build] Bump OpenAssetIO to 1.0.0-beta.2.2

Discovered during OpenAssetIO/OpenAssetIO#1311.
Since #84, BAL's tests make use of the newer getWithRelationship signatures and so fail if OpenAssetIO 1.0.0-beta.2.1 or earlier is installed.
This isn't an incompatibility in BAL itself, just its tests. We could either:

Rewrite the tests to use the older API.
Bump the minimum supported version of OpenAssetIO
Ignore the failure, since it's only tests.

Ignoring the test failure is potentially dangerous, in case the expected failure is masking a real issue.
Rewriting the tests would be the best option, but requires development effort. Given that we're still in beta, the low-effort choice of bumping the minimum OpenAssetIO version seems the best pragmatic option.

No immediate concern about this, although it'll have to be bumped again soon, right?

Hopefully not, I don't think there's anything planned in the near term that will break the manager API.


UI changes in landing and login page

UI changes in landing and login page.Further ,one class is added in styles.css file .

UI changes are fine.


Use a shared eslint config

Goal
Shared eslint config for all rackt repos. That eslint config now lives here: https://github.com/rackt/eslint-config-rackt
Todo
I suspect there are subtle differences between repos, so migrating other repos to the shared config will probably require additional PRs. I'll try to take that on so I don't introduce something that goes unused (assuming there's any interest in this).

Sounds good to me. Should I create a new repo @mjackson ?

This looks great. I was unaware that eslint configs could be shared like this, @pwmckenna. I've invited you to be a member of rackt so you can transfer the rackt/eslint-config-rackt repo yourself.
If you don't want to be a member of rackt, I'd be happy to create the repo for you. Otherwise, welcome! :D

awesome thanks!

Would be great to add instructions on how to integrate eslint with common
text editors to help potential contributors.
On Sun, Oct 25, 2015 at 8:02 AM Patrick Williams<EMAIL_ADDRESS>wrote:

awesome thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/rackt/history/pull/112#issuecomment-150932278.

@ryanflorence I always recommend @gaearon blog post https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c5b48

k, I just copied that repo over and updated this pr to use it, so I believe this PR is ready.
@ryanflorence I'll add a section to the eslint-config-rackt readme for integration with editors and link to that blog post.
How do folks feel about a pre-commit hook that lints? That might help folks onboard as they won't have to set anything up themselves.

btw, @ryanflorence welcome to Seattle! :evergreen_tree:

Thanks @pwmckenna great work!
I think that pre-commit will be overkill, I assume we deal with the developers and when they send the PR they can see that tests are failing, but it's just my personal opinion.
@ryanflorence Welcome back! You've been missed here!

I'd prefer not to have a pre-commit hook for this either. It always seems a little weird when GH repos have hooks.
Why not put this package on NPM, though?

@taion I just don't have the permissions. Happy if it happens though.

I'm not sure what you mean. Can't you just npm publish the repo?

@taion updated to use shorthand, and am now requiring version 0.0.1 of eslint-config-rackt, though its dependent on someone publishing. Sounds like pre commit hooks are out, so I'll make sure to add documentation to repos as I update them to use this config.
@taion I suppose I can! sorry, having trouble shedding my enterprisy permissions/ownership instincts

I'll make sure to add documentation to repos as I update them to use this config.

Only if you want to! npm run test already runs linting, and I sincerely hope that anybody submitting PRs is at least running the test suite locally first.

@taion Good call. Published to npm. Won't worry about docs unless necessary.
So, I'll take this up further as issues in https://github.com/rackt/eslint-config-rackt, but there appears to be some inconsistency in the rackt style. We can just work around that by adding per repo rules to override the config, but I'm curious if there's a desire to standardize.

there appears to be some inconsistency in the rackt style

Ya, we all come from different backgrounds so currently the different projects reflect the personal coding style of their primary authors. Recently @ryanflorence and I have stopped using semi-colons, for example, but a lot of people still use them. I'd hate to try to force this behavior on people, but if they're ok with it then I'd be ok to standardize.
AFAICT the main other team that would be affected by this is @rackt/redux

I'm happy with no semicolons. :+1:  Don't miss them :)

You could always use Standard, since it's also embraced no semicolons.

I prefer semicolons but I don't care too much. However if we do that in source, it means also updating all the docs. I don't have the capacity to go through all the Redux docs at the moment.

I don't think we need Redux and React Router/History to be consistent style-wise. Maybe we could have a rackt/react-router and rackt/redux sub-rules?

Let's merge this for now - I think this will help us ensure that code style is consistent across the @rackt/routing repos, so it's a step in the right direction.

Consistency is more important than personal style. I'm happy to comply.

@gaearon I can help with that

@gaearon @knowbody I can help too

Please raise an issue in Redux repo if you intend to work on this so we know progress is being made.


[RS-641] - CTD now supports all CC platforms.

Great stuff, thanks!
I'm still getting used to the process, so forgive me. Could you also make the corresponding change in /calico-cloud/threat/container-threat-detection.mdx?

Ah yes, that makes sense, I'll add it now.


sublist: extract common setup

In the sublist exercise, every test method duplicates the construction of the instance of RelationshipComputer.
Please extract the construction into a setUp() method and use the instance data member instead.

@jtigger these instances are not all set up identically, since they use generics. What would you like to do here given that new information? :)

Nope, this was a bad miss on my part.  Closing.


Qualification tool: Add support for join, pandas, aggregate execs

This fixes https://github.com/NVIDIA/spark-rapids/issues/5362.
This PR adds support for these execs:
HashAggregateExec
ObjectHashAggregateExec
SortAggregateExec
BroadcastHashJoinExec
BroadcastNestedLoopJoinExec
ShuffledHashJoinExec
SortMergeJoinExec
WindowExec
AggregateInPandasExec
ArrowEvalPythonExec
FlatMapGroupsInPandasExec
MapInPandasExec
WindowInPandasExec
Using static eventlog for testing pandas related execs as creating eventlog on the fly isn't easy. Have generated one eventlog which includes all the pandas related execs. Rest of the execs create eventlog while running the tests.

build

for the pandas event log, its fairly big, does it need to be that large? I assume you couldn't dynamically create that?

Running 1 query related to pandas generated eventlog(compressed) which was about 21K. I have included 5 different queries to generate different execs which we support(so it's about 132K). I couldn't figure out a way to easily generate the eventlog(to include pandas and other pyspark related API's in the test itself.

build


Implemented youtube's (start|end)Seconds API

This allows videos to specify custom start and end points within the video
Link to related issue (if applicable)
This should resolve #361
Sumary of proposed changes

New data attributes data-start and data-end specify the start and end points in the video
Since YouTube's playerVars' start and end fields don't work, use cueVideoById instead

Task list

[ ] Tested on supported browsers
[ ] Gulp build completed

I think I'll merge this one into develop

I think I'll merge this one into develop

@sampotts Can this be merged in soon?

It was written when v3 wasn't around so it'll need a rewrite first.


support for custom helper tests?

Hey @ericf
I'm trying to get this setup working:
var exphbs = require('express-handlebars');
var hbs = exphbs.create({
    helpers: {
      'if-test': function (context) {
        return true;
      }
    }
  });

var source = '{{#if-test "y"}}works!{{/if-test}}';
var template = hbs.handlebars.compile(source);
var output = template();

But...I get error:
Error: Missing helper: 'if-test'

Any idea what I'm missing? Just trying to accomplish some custom helper testing.

of course, if I change:
var source = '{{#if-test "y"}}works!{{/if-test}}';
to:
var source = '{{#if "y"}}works!{{/if}}';
everything works as expected. So I'm not sure why the helper being created thru the create() isn't registering the custom helper.

@ericf Ah, I just had to add the line:
hbs.handlebars.helpers = helpers;

before I ran compile.


TDD: Activity Logging

Write unit tests to validate the activity logging form inputs and interactions. Ensure that all possible user inputs are tested.


BRIDGE L1 - L2 - L3 and 'claim button error'

Describe the bug
when I started the bridge from L1 TO L2 AND L3, everything went normally, there were no problems that I experienced, but I was confused by the process of having a claim button in transaction history, and when I clicked on that button, there was a tx crow,
for example:
https://explorer.test.taiko.xyz/tx/0x3638d9c72b84c550a301405feb5edf22a43eb3ccbfd023bce3c3181d5a58ca33
and for swap , add liquidity, there is no problem from l1,l2,l3 everything runs normally
Steps to reproduce
My Address : 0x80F603c33AeB5d504beF9a0809383Ca1bc589b67
Additional context
https://postimg.cc/SnR19HtR
https://postimg.cc/fSbqvFT8
https://postimg.cc/SjpMz8tz

Its not necessary to click on claim button just wait until status will be claimed automatically ( as i see on ur screenshots)


cage: hangs on startup

Describe the bug
After a reboot, cage does not appear to start the child process (and the screen keeps showing the systemd startup sequence)
journalctl -u cage-tty1 shows just:
Apr 30 17:58:32 kiosk systemd[1]: Started cage-tty1.service.
Apr 30 17:58:32 kiosk (cage)[760]: pam_unix(cage:session): session opened for user kiosk(uid=1003) by kiosk(uid=0)

cage is running with only an sd-pam child:
kiosk        760  0.0  0.2  14524  7072 tty1     Ss+  Apr30   0:00 /nix/store/xampdc7k0lc1701pbmlk8v8mwmg1cfnl-cage-0.1.4/bin/cage -s -- /nix/store/gyfw7zcipy8chfdr7ckzir1gy8igsp3x-loop-video.sh
kiosk        825  0.0  0.0  21544  2944 tty1     S+   Apr30   0:00  \_ (sd-pam)

... but the files in /tmp are not created.
When I kill <pid-of-cage>, nothing happens.
When I kill -9 <pid-of-cage>, the screen goes blank.
When I then systemctl start cage-tty1, everything is started correctly.
Steps To Reproduce
Configuration at https://codeberg.org/eicas/desktop-config/commit/ec03fcc15363466106af63079158d9dbb6b4142f (the video is placed manually)
This must be something weird with my setup since ./nixos/tests/cage.nix is there, but I don't see it :shrug:
Notify maintainers
/cc @matthewbauer @primeos
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.2.10, NixOS, 23.05 (Stoat), 23.05.git.fe2ecaf706a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos-20.03pre194293.2436c27541b"`
 - nixpkgs: `/home/aengelen/nixpkgs`

It sometimes (very rarely) does seem to work.
Updating to the latest upstream cage doesn't help.
Not all cage output gets sent to the journal correctly: when I add '-v' I only rarely see the version in journalctl. I ended up moving cage to tty2 and sending the output to journal+console. That finally reveals something helpful:
libseat: Could not take the device: No such device
session: Failed to open device: '/dev/dri/card0': Resource temporarily unavailable
backend: Found 0 GPUs, cannot create backend
backend: Failed to open any DRM device
cage: Unable to create the wlroots backend

OK, I worked around it by making the GPU visible to systemd:
  services.udev.extraRules = ''
    ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd"
  '';

and adding dev-dri-card0.device to the after and wants lists of cage-tty1 (edited nixpkgs directly - haven't figured out how to do that from my config yet)

Doing it from my own config instead of editing nixpkgs:
systemd.services."cage-tty1".wants = [ "dev-dri-card0.device" ];
systemd.services."cage-tty1".after = [ "dev-dri-card0.device" ];

While this fixes my immediate problem, I'd like to keep this issue open:

it'd be nice if this worked out-of-the-box, but I guess that's hard
verify why I couldn't find the proper logs initially
document how to do the above better

I also experienced some weirdness with the cage service. In my case, I kept getting unexpected "permission denied" errors. At first I thought it due to the udev rules, but it turns out the issue was because cage starts the "caged" program in the root directory (/).
This becomes an issue if the "caged" program (or any of it's descendants) attempt to create a file in the cwd, where they will be denied since the root system directory (/) is owned by root. In my case, I was using gphoto2 which tries (and fails) to create a temp file in the cwd, not expecting it to be /.
To fix it, I did the following:
- services.cage.program = "${pkgs.xterm}/bin/xterm";
+ services.cage.program = pkgs.writeShellScript "cage-program" ''
+   cd /home/${user}
+   exec ${pkgs.xterm}/bin/xterm
+ '';

I doubt this is the root cause of your original issue, but thought I'd share my experience in case you also were caught off guard by the behavior.

it turns out the issue was because cage starts the "caged" program in the root directory (/).

Thanks @thenbe, in my case I had chromium that was wanting to write out state to the cwd.
For context:
{ pkgs, lib, ... }:
let
  mouseUrl = "https://www.google.com/";
  regularUrl = "https://duckduckgo.com/";
  kioskProgram = pkgs.writeShellScript "kiosk.sh" ''
    cd /home/kiosk
    if [ -e /sys/class/input/mouse0 ]
    then
      ${lib.getExe pkgs.chromium} --ozone-platform=wayland --start-maximized --kiosk ${mouseUrl}
    else
      ${lib.getExe pkgs.chromium} --ozone-platform=wayland --start-maximized --kiosk ${regularUrl}
    fi
  '';
in
{
  users.users.kiosk = {
    isNormalUser = true;
    password = "changeme";
    extraGroups = [ "wheel" ];
  };
  services.cage = {
    enable = true;
    user = "kiosk";
    program = kioskProgram;
  };
}

My previous solution didnt end up working for me long term :frowning_face: It seems like something in the environment/login process is intermittent and no longer allows cage to display the browser. I currently just get a black screen.

intermittent

Could it be caused by WLR_LIBINPUT_NO_DEVICES?
services.cage.environment = {
  WLR_LIBINPUT_NO_DEVICES = "1"; # boot up even if no mouse/keyboard connected
};

@thenbe will try this today, I took the RPi off my desk in frustration the other week but I think Im ready to try it again :slightly_smiling_face:

intermittent

Could it be caused by WLR_LIBINPUT_NO_DEVICES?
services.cage.environment = {
  WLR_LIBINPUT_NO_DEVICES = "1"; # boot up even if no mouse/keyboard connected
};

@thenbe apologies for the delay.
Including this in my configuration of cage and it works! Thank you so much for the suggestion.
Any ideas why this makes cage work?

As far as I can tell, setting this flag to 1 allows cage to start despite no mouse or keyboard being connected.
From a user perspective, I have to say it is a bit wild that the default behavior is to fail. But I admit that I am not familiar with the history of this flag so maybe there is a perfectly reasonable explanation for why it works like that? I couldn't find any FWIW.

I appreciate all your insight. It also seems like this has be mentioned briefly before: https://github.com/cage-kiosk/cage/issues/268 and https://github.com/cage-kiosk/cage/issues/84
Could be worth calling out WLR_LIBINPUT_NO_DEVICES = "1" in #281681 ?

While I would generally prefer to not duplicate this sort of information by copying it manually from cage's docs into nixpkgs, I have to agree with you on this one. This issue, the one resolved by WLR_LIBINPUT_NO_DEVICES = "1", happens during the startup sequence and fails to produce useful logs when it occurs which makes it difficult to deduce that cage even is the issue. As a result, some users will inevitably waste time debugging other parts of their nixOS config.
I realize now, after git blaming that line, this was foreseen and accounted for by a previous contributor. I think it'd make sense to copy the message from that commit into the description field to increase its visibility.


TypeScript typings are swallowed for most of the components

🐛 Bug Report
Hi folks 👋,
First of all, thanks for the massive work done on this project!
Back to the bug report: there's an issue with TypeScript's types for most of the components. It seems like React.forwardRef is the culprit here.
🤔 Expected Behavior
All the components should expose their types correctly - i.e. no any.
😯 Current Behavior
For example, the following View component - when imported - is inferred as any:

https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/view/src/View.tsx#L45
Whereas a Button works totally fine:

https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/button/src/Button.tsx#L96
💁 Possible Solution
Enforce proper types exposition  (via aliasing).
🔦 Context
I encountered that while using React Spectrum in production project.
💻 Code Sample
Not relevant.
🌍 Your Environment

Software
Version(s)

react-spectrum
3.9.0

typescript
4.2.3

Browser
not relevant

Operating System
not relevant

🧢 Your Company/Team
Not relevant.
🕷 Tracking Issue (optional)
None.

I believe you are correct with forwardRef being the culprit, think we need to add something like as (props: ViewProps & {ref: DOMRef}) => ReactElement; to View.

@yamafaktory Apologies, but "present" me doesn't remember what reproduction steps "past" me did to figure out the above fix. I made a codesandbox here: https://codesandbox.io/s/sparkling-butterfly-1gvyr?file=/src/App.tsx and it looks like View has the proper typing here. Does your project have any additional configurations that are different from this sandbox?

@LFDanLu Thanks a ton for the feedback and effort!
Indeed your sandbox works fine. I tried to reproduce it - i.e. make it work in my private project - by upgrading to the latest TS version and React types without success. Then I noticed that the real issue is that React Spectrum uses https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports set to true (https://github.com/adobe/react-spectrum/blob/main/tsconfig.json#L11) and then you're doing all the React imports like e.g. https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/view/src/View.tsx#L16.
So basically, with allowSyntheticDefaultImports set to false, the React import doesn't resolve correctly for the types:

It should be done like that:

This is also the recommended way to do it since React as no more default export, see https://github.com/facebook/react/pull/18102.
TL;DR: either folks like me have to set allowSyntheticDefaultImports to true, or React Spectrum should update all the imports accordingly.
N.B.: I'm not using Babel to transpile the code but ESBuild, that's why I was not using this option, see again https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports:

For convenience, transpilers like Babel will automatically create a default if one isn’t created

Thanks for all the investigation! Will make a note to bring this up in our next planning.

Thanks a ton @LFDanLu 🙇!


function-invokers are now in standalone repos

each invoker is now a separate repository:
https://github.com/projectriff?q=function-invoker

Merged as commit cae13b409b953b70c1b5777dd848cbf7c4e75398


Get-CSOAuthConfiguratin is not for Exchange command.  It's for Skype

The document states.
"You can check the status on your Exchange or Skype for Business servers, on premises, by running the Get-CSOAuthConfiguration command in PowerShell."
However its only for Skype for Business servers and NOT for Exchange.

@alambert0008 - This issue appears to be a duplicate to issue #605. Closing this duplicate issue. Thank you.


Does Skywalk .Net agent supports APM activities of Windows services?

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
Does Skywalk .Net agent supports APM activities of Windows services?

Bug

Which version of SkyWalking, OS and JRE?

Which company or project?

What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.

Requirement or improvement

Please describe about your requirements or improvement suggestions.

.net agent is not official Apache project. Please submit issue to their repo.

FYI @liuhaoyang


Provide compound ID for all files

I think we should probably move towards a model where all ligands (or guests) in each benchmark set have an appropriate, unique, paper-specific numerical compound ID, rather than the current model where this is dependent on what set we're looking at. For example:

CB7 Tables 1&2: Has unique CID we assigned
GDCC Tables 3: Has unique CID we assigned, but will get broken if we want to provide structures docked into hosts as there are two hosts but only one set of compound IDs
GDCC Table 4: Has unique CID we assigned
CD Table 5 and 6: Has unique CID we assigned
lysozyme Tables 7 and 8: No CIDs, uses compound names only
BRD4(1) Table 9: Uses heterogeneous identifiers -- "Compound 4", "alprazolam", "Bzt-7", "JQ1(+)" etc.; this is probably the worst offender since some of these are pretty unsuitable as filenames due to special characters and/or spaces (e.g. some tools can't load files with spaces in their filenames and/or handle some of these special characters).

@GHeinzelmann @nhenriksen - thoughts? My preference I think is to make sure every set has a unique numerical compound ID in the tables and that this is used for all of the relevant files.

That sounds good, and it  can be done quickly I think. I'll change the ligands names to a provided ID (from 1 -10), and change the associated tables in the paper and in the README file.

Working in the BRD4(1) benchmarks table, and I won't fit in the page if I keep the ligand names but also add an extra ligand ID column (as done in the CD tables). Should I drop the ligands names altogether? They might not be essential since we are also providing the reference.

I'm all for dropping the ligand names, or if you really want to keep track of them, put them in footnotes or in a separate markdown file you link to.

No we can drop them, I only gave the ligands names so the table would look the same as the Lysozyme one. I'll just give a number for each, which will also make the table look better (it was a little decentralized before since it was too wide). Then I'll change the README table and the ligand files names.

Resolved for bromodomains in #48 ; still needs to be done for lysozyme.


New CLI based on run.mjs and run-file.mjs

Functionality:

run a file
run a script passed in arguments
print the result and bindings
report errors with stacktraces
parse and print the expression (#708)
support .squiggleU? I'm not sure if we should support it for a few releases or drop it

On the UI: three ways to approach this.

squiggle FLAGS_AND_ARGUMENTS, e.g. squiggle -e "2+2" and squiggle ./my.squiggle
squiggle COMMAND FLAGS_AND_ARGUMENTS, e.g. squiggle eval "2+2" and squiggle run ./my.squiggle
multiple scripts, e.g. squiggle-eval "2+2" and squiggle-run ./my.squiggle

(option 2 and option 3 are compatible, git provided both for a while)
Option (1) is a bit nicer in easy cases, but I lean towards (2) overall, since we're going to have many running modes and many overlapping flags for each.

I'd prefer (1), mainly because it's common across many programming languages (and those who prefer the CLI are likely to have tried one or two of those). I don't find flags to be any less composable than the COMMAND system. For example with flags you might run from an argument, print the result, and suppress error output with squiggle --no-err -p -e "2+2".
The things you're writing as commands are the source for the input, and at most three of these are typically supported:

A file, no flag or -f
An argument, -e
stdin, -i or -

There's no standard for the letters chosen but it's easy enough to look at what other programming languages do. Most common across Python, Perl, Ruby, Node.js seems to be [ file | -e string | - ].

gcc has -fsyntax-only to parse the input but not compile; changing this to --syntax-only since the -f is kind of a C thing seems reasonable.

The first style is a classic Unix convention.
The second one is more modern and it seems to me that it slowly becomes the default in *nix. Git, kubectl and systemctl all use it; also, Go; and Rescript too.
I agree that the first style is more common for programming languages, but I'm not sure if that's because it makes more sense there or just because most mainstream programming languages are quite old.

I don't find flags to be any less composable than the COMMAND system.

Yeah, COMMAND system can actually be less composable. But this choice is not just about composability, it's also about usability, and about disallowing forbidden flag combinations.
I'm not sure if my initial squiggle eval vs squiggle run makes much sense, I agree that -e and - are nice for this.
But there are also modes such as format (and maybe a debugging mode such as print-ast or something like that), which have different flags.
Having the separate squiggle run --help and squiggle format --help is nice to see which options each of those support. And most of --no-err, --print, etc. don't make sense in case of format.
This also leaves us some space for expanding on top-level commands in the future without having to add new scripts or having to decide which options the new command should be compatible with. Top-level commands don't have options by default, so they would print errors when the option is not supported, while the approach with flags will probably ignore incompatible flags by default (and then the user will have to guess: ok, there's squiggle -e "2+2" --debug, is there squiggle --language-server --debug? oh, it doesn't seem to do anything, alright...).
I agree that squiggle ./file.squiggle is nicer than squiggle run ./file.squiggle. But it doesn't seem like a big loss. If we really wanted to, we could make the run implicit when the list of arguments doesn't include any known commands.


I'd like to add a snake-food game  under the Basic Flutter Developer Category.

🚀 Feature
(A clear and concise description of what the feature is.)
Have you read the Contributing Guidelines ?
YES
Motivation
To contribute ,and to learn something new that will help me in future
Pitch
From childhood many of us played snake game in key-pad phones,and had a sweet memory.This will definitely motivate beginners to get a hands on experience in Dart and Flutter ,and gain experience to make more beneficial apps.

Thankyou

@Utk98 Status of your Issue ?
I dont see any PR linked to same.

I met with accident,parallel my exams are going onn..App was half made,after 2april I will resume rest of the work.

It's been so long you are not responding to this issue so we are going to close the issue . Thank you :)


ENH: sparse: vectorized coo_matrix.diagonal

Before:
>>> from scipy.sparse import rand
>>> A = rand(1000, 1000, format='coo', density=.3, random_state=42)
>>> timeit A.diagonal()
10 loops, best of 3: 101 ms per loop

After:
1000 loops, best of 3: 1.71 ms per loop

That's almost a factor 60.

Your current solution is fine, though it makes me even more motivated to establish an official policy on non-canonical formats and the operations that respect them.

@@            master   #5806   diff @@
======================================
  Files          235     235
  Stmts        43347   43351     +4
  Branches      8165    8164     -1
  Methods          0       0
======================================
+ Hit          33722   33726     +4
  Partial       2594    2594
  Missed        7031    7031

Review entire Coverage Diff as of 79f326c

Powered by Codecov. Updated on successful CI builds.

FYI: I just added a benchmark for the diagonal() method in #5810.

thanks, lgtm


Client-Side AuthorizationPolicy

(This is used to request new product features, please visit https://github.com/istio/istio/discussions for questions on using Istio)
Describe the feature request
Current authorizationpolicy works on server-side, which can protect my server.  But in sidecar mode, istio-proxy also plays a role as a client proxy.
My request is: restrict the destinations(such as ip, destination host, destination service) which current client can access, no matter it's in-cluster or not-in-cluster. The first idea in my mind is use authorizationpolicy, but it only works on server-side.
Can we add a parameter in authorizaitonpolicy like inbound/outbound to support this use case.
Describe alternatives you've considered
Affected product area (please put an X in all that apply)
[ ] Ambient
[ ] Docs
[ ] Dual Stack
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[x] Security
[ ] Test and Release
[x] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context

Weird usage, can you describe your actual usage scenario?
It looks like a routing requirement, not an authentication requirement.

I want to restrict my application pod to only access the external services that I allow.
Example:

My application can access "ip <IP_ADDRESS>/16 AND  port 22" OR "ip any AND port 80".
My application can only access the servers(in-cluster or not-in-cluster) which are in my whitelist. No other servers are allowed.
Of course I can do this on server-side, but that needs a lot of configs.

I don't think this will ever happen in sidecar mode. See https://blog.howardjohn.info/posts/bypass-egress/. maybe it could for ambient.

Can you limit that a little with Sidecar api

I don't think this will ever happen in sidecar mode. See https://blog.howardjohn.info/posts/bypass-egress/. maybe it could for ambient.

I see, thanks for your reply. My requirements almost are based on L4 info, will we consider implementing this capability in Ambient(ztunnel)?

Can you limit that a little with Sidecar api

yes, I have tried. But if destinations were  external, I need to registry all of them and enable registry-only. It's really a big change in my env.

I see, thanks for your reply. My requirements almost are based on L4 info, will we consider implementing this capability in Ambient(ztunnel)?

Its been considered but hasn't happened yet and doesn't have any concrete plans or ownership yet. I would expect it will eventually happen, but its not currently a priority and its Very Hard

OK


Fix sequence order in serialization function

I am currently doing my bachelor's degree about MAVLink and LoRa. I decided to use rust and therefore rust-mavlink.
I need to serialize and deserialize MavFrames to send them over the LoRa link. While doing that, I noticed a weird behavior of the deser function. The order of serializing the header fields (system_id, component_id and sequence) does not align with the order of deserialization.
Here is a screenshot showing the problem

Order of serialization

Old order of deserialization

Also, if you look closely, the values are all over the place and do not match (it's not a corrupt message problem). I am going to open a separate issue for that (https://github.com/mavlink/rust-mavlink/issues/205), as I am still investigating it and is not related to the header.

Hi @IhsenBouallegue, thanks for identifying the problem! But the issue is in the serialization and not on deserialization. The order behind it is explained here: https://mavlink.io/en/guide/serialization.html

Oh I blindly assumed that the serialization is the right one. I will switch that one then. Thanks for the catch!

Fix #205


multiple app()s / component approach / return dom

So, it is just amazing lib. A was working on some idea like that, code name mitak ;d Based on events with just router, pub/sub system. For now it is 450bytes gzip. But yea, anyway.
So the problem of return nothing just bumped while I tried to make a Todo List in components way.
So lets get started. We have 3 app()s - TodoItem, TodoList and main.

main - main entry, place for header & footer for example
TodoItem - component for each todo, e.g.

TodoList - component holding all TodoItems, actions and view which is just like
TodoItem()

main
const { app, html } = require('hyperapp')

const main = app({
  // root: document.body,
  model: {
    title: 'Todo List Example',
    link: 'https://github.com/hyperapp/hyperapp'
  },
  view: (state) => html`

${state.title}

    ${TodoList()}
    Powered by HyperApp
  `
})

TodoList
const TodoList = () => app({
  model: {
    todos: [],
    count: 0,
    input: '',
    placeholder: 'Add new todo'
  },
  update: {
    toggle: (state, data) => ({
      todos: state.todos.map((item) => {
        return data.id === item.id
          ? Object.assign({}, item, { done: !data.done })
          : item
      })
    }),
    remove: (state, data) => ({
      todos: state.todos.map((todo) => todo.id !== data.id)
    }),
    add: (state) => ({
      todos: state.todos.concat({
        id: state.count++,
        done: false,
        text: state.input
      })
    }),
    input: (state, data) => ({ input: data.value })
  },
  view: (state, action) => html`

${state.todos.map((item) => TodoItem(item, action))}

      <input
        class="add"
        type="text"
        onkeyup=${e => e.keyCode === 13 ? action.add() : ''}
        oninput=${e => action.input({ value: e.target.value })}
        placeholder=${state.placeholder}
      />
      <button onclick=${action.add}>add</button>

`
})

TodoItem
const TodoItem = (state, actions) => app({
  model: state,
  update: actions,
  view: (item, action) => html`<li onclick=${e => action.toggle(item)}>${item.text}</li>`
})

All is okey, but it adds Todo to DOM body two times

Passing opts.root seems to not deal with that problem.
The only thing that I changed to the core source code, is to return node from app function.

So, it should not "auto mount". Maybe would be cool to return a function that when called to append to body, or that function can accept selector where app to be mounted

If you set the root of Todo to document.createElement("div") it won't double-render the Todo component. I am still looking into the TodoItem rendering...

Yea, it seems it work, but not work for nested components (or i dont know how to call it). Nested component (here TodoItem) should know who is the parent. It is easy to document.createElement('div') and pass that div to opts.root of Todo, and later pass that same div to TodoItem and set it as its opts.root but it seems it not work.

I just breifly read the source code, so I might be wrong, but I don't think that app is intended for creating components. It's more like program in Elm's Html.App
Also, why not define TodoItem like this
const TodoItem = (item, action) => html`<li onclick=${e => action.toggle(item)}>${item.text}</li>`

I know that. And basically it could be possible to be used for components if change some bytes here and there.
I actually don't like components way and things like that and choo are good and enough for me. Just started to think how it can be done, because a comments in reddit.

Oh, sorry, I was not aware about discussion on reddit.

I don't think that app is intended for creating components. It's more like program in Elm's Html.App

Correct.

And basically it could be possible to be used for components if change some bytes here and there.

Like I said on the Reddits, thank you for bringing this up. I think we may be onto something here.

@evgenykochetkov @tunnckoCore

I don't think that app is intended for creating components. It's more like program in Elm's Html.App

Correct.

And basically it could be possible to be used for components if change some bytes here and there.

Like I said on the Reddits, thank you for bringing this up. I think we may be onto something here.

@tunnckoCore @tzellman @evgenykochetkov Here's a TodoMVC implementation using HyperApp.

https://hyperapp-todomvc.gomix.me/

This is as far I think we can go with the current implementation of HyperApp.

https://github.com/hyperapp/hyperapp/pull/77

It's not just a matter of implementation, it's also a goal of the project to remain close to the Elm Architecture and use a single model for the entire application kind of approach.
Docs have been updated to indicate this as well.

Summary
The original idea here was to make the return value of the app function a valid node type and make apps composable that way. This is not supported, but that doesn't mean you can't create multiple different apps and communicate with each other using whatever means possible, usually either wired actions in V1 or the upcoming subscriptions API in V2.


Failed to decode tile in android 4.x.x

I use HTTPTileDataSource and RasterTileLayer for showing base layer from google TMS ,but in android 4.2.2 mapTiles couldnot be render and log this error in logcat.
I/carto-mobile-sdk: HTTPTileDataSource::loadTile: Loading http://mt0.google.com/vt/lyrs=r&x=33&y=32&z=6
E/carto-mobile-sdk: Bitmap::loadFromCompressedBytes: Unsupported image format
E/carto-mobile-sdk: RasterTileLayer::FetchTask: Failed to decode tile

Hi. Do you get this problem with only Android 4.2.2 or with other versions also? Quick tests on Android Emulator using Android 5.0 seemed to work ok.
Also, I think you are violating terms of Google by using their tiles without their SDK.

To use google tiles in legal way you should use this API: https://developers.google.com/maps/documentation/tile/ . It is not free service, and not even part of usual paid plans, so you need to contact Google to enable it. In practise it works better if Google considers you as serious enterprise-level customer.
Technically you need to create map session in your app (SDK does not do this for you) and get session key, and then can configure raster tile layer with the created URL.

Thank you for informing me about Google's rules, but I'm currently using Google's service for testing purpose only. Can the arise problem related with this subject? I checked this problem on all versions of Android, but it seems that this problem only happens on Android 4.x.x.

@shm-original I guess that HTTP transfer encoding handling is somewhat broken in Android 4.x.x (in the sense that Android itself does not properly inflate HTTP response message). SDK 4.4.1RC1 should have a workaround for that. Can you confirm it works now?

@mtehver gradle show this error when try to get sdk 4.4.1RC1. i think its not on Jcenter yet.

How do you try to get it from the jcenter? This gradle conf should work:
implementation('com.carto:carto-mobile-sdk:4.1.4-rc.1@aar')

I test the app on android 4.1.1 and 4.4.4, and its work perfectly. but loading tiles on android 4.2.2 still has the problem.

@shm-original Can you make a small test app demonstrating the issue? The issue should be reproducible on Android Emulator with API level 17 (Android 4.2) for us to proceed. If this is a device specific issue (there are some really buggy devices in the wild), then I am afraid we can not help you, as we do not have any devices with 4.2.2 around.

@mtehver I test the app on genymotion emulator "custom phone - 4.2.2", and i am not testing the app on physical device, as i do not have any devices with 4.2.2 around too.

@shm-original Does the tile decoding issue happen only with raster tiles or does it happen also with CARTO basemap? If this is specific to Google raster tiles and Android 4.2.2 then I would probably mark this as 'wont fix' as Android 4.2.2 is really old by now and I the use case is somewhat obscure. Also, workarounds for such platform bugs may cause unwanted side effects. Googling 'Android 4.2' and 'HTTPURLConnection issues' results in several bug reports that seem to be fixed in later versions.

Closing this due to inactivity. Also Android 4.x emulator issues are very low priority.


[Bug]: RuntimeError: Engine loop has died with larger context lengths (>32k)

Your current environment

running via k8s (EKS) v0.6.3 on g6e.12xlarge instances (aws GPU AMI) with a llama-based model (72B params, FP8 weights+activation quantized)

Model Input Dumps
No response
🐛 Describe the bug
even with
    VLLM_WORKER_MULTIPROC_METHOD: "spawn"
    VLLM_LOGGING_LEVEL: "DEBUG"
    VLLM_TRACE_FUNCTION: "1"
    NCCL_DEBUG: "TRACE"

i could not collect more logs than
ERROR 11-04 12:53:08 client.py:250] RuntimeError('Engine loop has died')
ERROR 11-04 12:53:08 client.py:250] Traceback (most recent call last):
ERROR 11-04 12:53:08 client.py:250]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/client.py", line 150, in run_heartbeat_loop
ERROR 11-04 12:53:08 client.py:250]     await self._check_success(
ERROR 11-04 12:53:08 client.py:250]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/client.py", line 314, in _check_success
ERROR 11-04 12:53:08 client.py:250]     raise response
ERROR 11-04 12:53:08 client.py:250] RuntimeError: Engine loop has died
INFO:     <IP_ADDRESS>:47210 - "GET /metrics HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:47210 - "GET /metrics HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:47210 - "GET /metrics HTTP/1.1" 200 OK
CRITICAL 11-04 12:53:11 launcher.py:72] AsyncLLMEngine has failed, terminating server process
INFO:     <IP_ADDRESS>:38400 - "GET /health HTTP/1.1" 500 Internal Server Error
INFO:     Shutting down
INFO:     Waiting for connections to close. (CTRL+C to force quit)

it was working immediately before with an 18k context length prompt, failed with a 38k context length. Would appreciate some pointers on how to debug more here.
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

vllm args
    - --kv-cache-dtype=fp8
    - --max-num-seqs=128
    - --max-num-batched-tokens=128000
    - --max-model-len=128000
    - --max-seq-len-to-capture=128000
    - --tensor-parallel-size=4
    - --enable-chunked-prefill
    - --enable-prefix-caching
    - --gpu-memory-utilization=0.9

maybe this is due to some steps are extremely slow, MQLLMEngineClient didn't get response for a while, so throw this error. Please try to increase VLLM_RPC_TIMEOUT (default value is 10000).

maybe this is due to some steps are extremely slow, MQLLMEngineClient didn't get response for a while, so throw this error. Please try to increase VLLM_RPC_TIMEOUT (default value is 10000).

This solved it for me


[feature] Keras source codes to Tensorflow source codes?

Hello People,
I apologize if this topic had been mentioned before.
However, are there anyone know any method or python module which can help convert keras source codes into tensorflow source codes? or keras generate tensorflow source codes?
I try to use python "inspect" and "drill" modules, but they were not working as what I am expecting to be....
On the other hand, will there be a feature in future that allowing keras to perform such task?
Thanks

I would like to see this feature too


Api /tags should include type for embedding model or llm

As the title says, it would be nice to have that information so we can filter out embedd models if we want to allow for model switching on a frontend

i would say somehing like:
    {       "name": "codellama:13b",       "modified_at": "2023-11-04T14:56:49.277302595-07:00",       "size":<PHONE_NUMBER>,       "digest": "9f438cb9cd581fc025612d27f7c1a6669ff83a8bb0ed86c94fcf4c5440555697",       "details": {         "format": "gguf",         "family": "llama",         "families": null,         **_"Type": 'LLM' ('Embedding')_**         "parameter_size": "13B",         "quantization_level": "Q4_0"       }     },

i would say somehing like:
`    {
      "name": "codellama:13b",
      "modified_at": "2023-11-04T14:56:49.277302595-07:00",
      "size":<PHONE_NUMBER>,
      "digest": "9f438cb9cd581fc025612d27f7c1a6669ff83a8bb0ed86c94fcf4c5440555697",
      "details": {
        "format": "gguf",
        "family": "llama",
        "families": null,
        "Type": 'LLM' ('Embedding')
        "parameter_size": "13B",
        "quantization_level": "Q4_0"
      }
    },`

I would suggest to also include a "capabilities" property as a list of tags that would describe what a model is capable of:
"capabilities": ["code-completion", "image-processing", "embedding", "story-telling", etc]

Since ollama now includes image-capable models such as llava UI should know if users are allowed to send images to a model, or not
https://github.com/ollama/ollama/issues/4835

Also I see that this is already done i the latest released version of ollama. So, this request can be closed :D

Also I see that this is already done i the latest released version of ollama. So, this request can be closed :D
@it-s Hi. Could you tell me which version of Ollama has already implemented this feature? I didn't see this feature implemented in the latest version of Ollama.


Testing, please ignore. (crhuba)

This is a bug bounty test. Please ignore.. Please DO NOT APPROVE THIS! (crhuba)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.crhuba evjvt seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Re-Prompt for ssh key selection if did not find existing key in safe

For git-ssh deployment key, you will be asked
"Use existing key in Vault","Add an existing key in Vault", "Generate a new key"

when you select to use existing key, but later did not find the key in the safe path, it should re-prompt you with the questions to let you reselect
"Use existing key in Vault","Add an existing key in Vault", "Generate a new key"

This was for the CI wizard, which is now gone.  RIP the CI Wizard, he just couldn't cast that saving spell...