Revert "backend/drm: fail instead of stripping a modifier"

This reverts commit f9f90b417366581b58d806956c9b2099417ed4b3.
gbm_bo_get_modifier may return a modifier in these cases:

The kernel doesn't support modifiers but Mesa does
WLR_DRM_NO_MODIFIERS=1 is set

However, in both of these cases, the gbm_bo has been allocated
without modifiers.
There is already a check in drm_fb_create for modifiers:
wlr_drm_format_set_has will make sure buffers with an explicit
modifier will be rejected if the DRM backend doesn't support them.
So no need for an additional check in get_fb_for_bo.
Closes: https://github.com/swaywm/wlroots/issues/2896
cc @kennylevinsen

Works for me™


Fix issue with sending messages. Scroll to bottom on send

Automated message from Dropbox CLA bot
@borisyankov, it looks like you've already signed the Dropbox CLA. Thanks!

Quick question about this -- if you're like 50 messages above the bottom and send a message, does this scroll you all the way down, or do we just scroll down when you were near the bottom in the first place?
Also, presumably we want to have most logic we have around scrolling down on send trigger on receive, not send, since otherwise you'll still miss things other people send, right?

Yeah, it does scroll you all the way down.
We already have @kunall17 outbox implementation where the message is locally prerendered!

OK.  I think that's absolutely the right behavior if you're near the bottom, but the wrong behavior when you're more than a screen's height from the bottom of the feed.  Otherwise, sending a quick reply will lose your place (when catching up, I often find myself replying to several messages within a feed as I read through it).
If you're not near the bottom, we may want a little notice that your message sent successfully and is further below.

Sounds good. And the notice, optionally, when clicked might scroll you to the bottom too.


Edge-To-Edge not working after immediate app relaunch

Steps to reproduce

Open App that uses edge to edge and transparent navigation bar and status bar
Close and reopen immediately

Expected results
Opening App and closing app using back button and then opening app immediately

Actual results
The status bar has a shadow, and the gesture bar is black.

Hi @yadavmanishraj
When opening an issue, please try to provide all information indicated in the template so that we can address the issue properly (See bug issue template here). More specifically, please provide the following information:

A completed and minimal reproducible code sample
The output of flutter doctor -v
The affected device info (OS, model)


user and system disk usage

Signed-off-by: Nicolas Adenis-Lamarre<EMAIL_ADDRESS>

Win32ApiSystem version are to be fixed... (homepath can be relative / system path can be another letter ). But I'll manage it in a future PR.


[GSSoC 2023] Animation Button using HTML and CSS

part of GSSoC 2023 program

Hi, there seems to be a merge conflict, please resolve it

resolved

Hi, there seems to be a merge conflict, please resolve it

May you please look into it now

look into it once,


feat: unify signatures of with and bind

Just like Function.prototype.apply, Function.prototype.call and Function.prototype.bind have the same signature, it would make sense for context.with and context.bind to do the same to prevent confusion among the instrumentation developers(I know I have made the mistake a few times).
Having context as the first argument also makes intuitive sense, to me at least, even without considering the signature of context.with - probably because of how Function.prototype.bind works.
One drawback for this is the fact that the function argument to both of those methods is more "stable" - meaning that making the function an optional parameter makes no sense, but context, on the other hand, has an intuitive default: the active context. So:
api.context.bind(undefined, () => {
  // binds to active context.
});

@vmarchaud makes that point in a slack thread:

context.with is used to apply a context within the callback function, it doesn't make sense to use it if you don't want to change the context
whereas context.bind is used to correctly propagate the context even if the method is known to "break" propagation like events emitter, so it makes sense to bind the current context in this case

This PR is a hypothetical one to spawn discussion on the topic, the actual implementation needs, for the time being, do some parameter type checking in context.bind, which can be removed before the release of 1.x.
Unless this change gets significant pushback, I to do the same change in Context Manager's APIs as well and prepare another PR to be merged before 1.0 removing deprecated options.
Implemented the way it is right now, this is BREAKING CHANGE.

As per apt comments above, I removed any notion of the old method and made bind short circuit if context is undefined.

I'm fine with moving forward with this so i'm requesting changes in this direction

both functions have different number of params already, and this is huge breaking change, you can't align all params anyway with this, I don't really see benefit in this, beside making one more breaking change and you wont be able to align params anyway.

Do you think it would be worth adding bound arguments to context.bind?
I see how that would align those two methods even better, but compared to having arguments in a different order it's a minor inconvenience for an edge case.

this is huge breaking change

We are pre-1.x - when's the better time to make breaking changes?
I can implement this in a non-breaking way, by supporting both for at least until 1.x + bind is barely used compared to with, so "huge" is I think a bit of an overstatement.

Do you think it would be worth adding bound arguments to context.bind?

I would not add this here. Binding this/arguments is an existing JS feature for functions.
context.bind() is intended to bind a context on a function or Eventemitter.
I don't think we should mix two different concerns in one function.

This only changes the context api but the context manager itself is still the other way around. In my opinion that's even more confusing. We should change both or neither but only changing one is definitely not the way to go.

I can implement this in a non-breaking way, by supporting both for at least until 1.x

I would not do that. Since we're at 0.x there is no reason to add that additional burden.

Do you think it would be worth adding bound arguments to context.bind?

No. That's not the purpose of bind.

This only changes the context api but the context manager itself is still the other way around. In my opinion that's even more confusing. We should change both or neither but only changing one is definitely not the way to go.

I agree, i think since this API is only used by few instrumentations its fine to change it now though

This only changes the context api but the context manager itself is still the other way around. In my opinion that's even more confusing. We should change both or neither but only changing one is definitely not the way to go.

This is not the final PR. It can sometimes be hard to gauge how willing are we to change some things. I wanted to get feedback on the API change before I do any proper work(happy that I did!). The APIs for the context manager and the API here should be the same and I'll work on that.
To conclude:

Binding arguments should not be added to bind.
We are leaning towards going forward with the proposed API change of

swapping the order of the arguments and
removing the context defaulting to current.active().

Even though this is a breaking change, we don't see a pressing reason to go through the hassle of assuring the backwards compatibility for this.
Context Managers and instrumentations also need a PR to align everything to the same signature.

Thanks to everyone for chiming in!

@Rauno56 I would hold off on this for now. Based on discussions with the maintainers it seems like there isn't agreement on this yet and I don't want you to spend too much time on it unless we're sure it will be accepted.

Do you think it would be worth adding bound arguments to context.bind?
I see how that would align those two methods even better, but compared to having arguments in a different order it's a minor inconvenience for an edge case.

I don't see any benefit in writing
context.bind(context.active(), target)

instead of
context.bind(target)

Moreover I think it will just produce an extra unnecessary code to be always included, instead of intuitively using the api, people will need to copy boiler plate code, or they will be asking how to do this - especially new comers, until they will gain knowledge "how to do the things right" and they will always have to copy paste the the boiler plate code
I would be in favour of allowing the following
1 param
context.bind(target); // use default context = context.active();
context.with(target); // use default context = context.active();

2 params
(preferred)
context.bind(target, someContext);
context.with(target, someContext);

or
context.bind(someContext, target);
context.with(someContext, target);

3 params
(preferred)
// bind not applicable
context.with(target, someContext, args);

or
// bind not applicable
context.with(someContext, target, args);

As extra
For the user convenience if we are able to correctly detect which param is context and which param is target, we could easily allow both orders - personally I would not see a problem with this tbh. But I'm very strong against necessity of including context.active() as something that need to be included always exactly what we have  with this
api.context.with(api.setSpan(api.context.active(), span))

which I personally hate, and I think we should allow even for this api.context.with(span) as a shortcut in 95% of cases.

Based on @obecny comment above it looks like his proposal is:
with(callback, context = this.active())
bind(target, context = this.active())

I think it's important to unify the implementations of with and bind. Personally, I would have preferred to make context always explicit (no default arguments), but I think @obecny's option is reasonable and it seems like his opinion is stronger than mine.

I think it's important to unify the implementations of with and bind. Personally, I would have preferred to make context always explicit (no default arguments)

I will join daniel opinion here, explicit is much better in this case. Context propagation is really hard to understand and use correctly (because node have an single threaded event loop).
I believe i've spent more than enough working on the async hooks context manager (https://github.com/open-telemetry/opentelemetry-js/pull/1099, https://github.com/open-telemetry/opentelemetry-js/pull/1011, https://github.com/open-telemetry/opentelemetry-js/pull/103) to believe that we should avoid having default that makes user not understand whats going on.
In the with case:

having a default with(callback, context = this.active()) makes no sense, with should be used to change the context so i don't see why a default would help.
If having a default makes no sense, i don't see the gain of swaping both arguments

For the user convenience if we are able to correctly detect which param is context and which param is target, we could easily allow both orders - personally I would not see a problem with this tbh

Performance is obviously a problem, with or bind can be called a lot depending on instrumentation usage, checking everytime the order makes us rely on JIT optimisation to be performant which i think is a strong no-go.

Moreover I think it will just produce an extra unnecessary code to be always included, instead of intuitively using the api, people will need to copy boiler plate code, or they will be asking how to do this - especially new comers, until they will gain knowledge "how to do the things right" and they will always have to copy paste the the boiler plate code

We are talking about less than 5% of users that will use manual context propagation, not everyone have complex enterprise requirement, some just want auto intrumentations to do the work. For me it makes sense that people using manual propagation understand what the context is about and how it works. I agree that this is not documented at all right now but that doesnt mean it can't be in the future.

which I personally hate, and I think we should allow even for this api.context.with(span, ()=> {}) as a shortcut in 95% of cases.

Obviously spans is not the only thing we store in the context so i will take this as a suggestion to add withSpan, which i'm totally fine with on the trace API.
In conclusion, i believe context API methods should be low level and explicit, if users find it too complicated that means we need high level helpers on each signal's API (i.e: withSpan).
What i suggest is:

Go ahead with this PR, requiring a explicit context for bind as 1 argument.
Debate if startActiveSpan (which is even simpler than would be withSpan) is simple enough for end users.

I agree with @vmarchaud - explicit is better than implicit(we can always add defaults and utilities).
I also feel strongly for the arguments to be in the order of (context, fn) and not (fn, context), since the function can be long and hide the context + it's more familiar with the ones on Function.prototype.

target can be a function implementation that can span multiple lines (sometimes more than fit the screen). In the current api, the context parameter can be pushed down and it's harder to understand what it relates to.
This is similar to node's setTimeout signature which sometimes looks like this:
setTimeout( () => {
    // many many lines of code
}, 1000);

I found myself many times scrolling to find the delay value way down, away from the setTimeout invocation, which is less readable.
Having the context as the first parameter is better for readability IMO as, unlike the target, it is expected to be syntactically short.

As I wrote I'm fine with both orders, I have preferred one, but this is not a blocker that's why I marked this as preferred. What I will not be ok with is that you guys want to force user to create a boiler plate code even though it can be simplified and in js it works like this everywhere. Whatever is decided I think the user should still be able to call this with one param only
bind(target);

instead of
bind(context.active(), target);
// or (preferred)
bind(target, context.active());

And as last:
instead of creating withSpan, we could have simply this
context.with(span, ()=> {
  //
});

instead of creating withSpan, we could have simply this
context.with(span, ()=> {
//
});

This is not possible, the context is not only made for spans.

instead of creating withSpan, we could have simply this
context.with(span, ()=> {
//
});

This is not possible, the context is not only made for spans, it need to be agnostic.

Of course this is possible, here is implementation
  public with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(
    contextOrSpan: Context | Span,
    fn: F,
    thisArg?: ThisParameterType<F>,
    ...args: A
  ): ReturnType<F> {
    let context: Context;
    if (typeof (contextOrSpan as Span).spanContext === 'function') {
      context = setSpan(this.active(), contextOrSpan as Span);
    } else {
      context = contextOrSpan as Context;
    }
    return this._getContextManager().with(context, fn, thisArg, ...args);
  }

instead of creating withSpan, we could have simply this
context.with(span, ()=> {
//
});

This is not possible, the context is not only made for spans, it need to be agnostic.

Of course this is possible, here is implementation
  public with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(
    contextOrSpan: Context | Span,
    fn: F,
    thisArg?: ThisParameterType<F>,
    ...args: A
  ): ReturnType<F> {
    let context: Context;
    if (typeof (contextOrSpan as Span).spanContext === 'function') {
      context = setSpan(this.active(), contextOrSpan as Span);
    } else {
      context = contextOrSpan as Context;
    }
    return this._getContextManager().with(context, fn, thisArg, ...args);
  }

This is outside of the scope of this PR.

@open-telemetry/technical-committee can you please weigh in on this issue? The maintainers have not been able to come to a unanimous agreement.

Current situation
When user wants to use it - it look like this

api.context.with(api.setSpan(api.context.active(), span), callback)
api.context.bind(target)

The first option has already risen confusions from the users for example:
https://github.com/open-telemetry/opentelemetry-js/issues/1923#issuecomment-780765354
https://github.com/open-telemetry/opentelemetry-js/issues/2181
After the proposal from this PR it will look like this, no more optional params will be possible

no changes
api.context.bind(context.active(), target)

What I propose is to have this

api.context.with(span, callback)
api.context.bind(target)

The order of arguments as I mentioned already is not as important as being able to simplify things because user will be still able to write either this
api.context.bind(context.active(), target)
or this
api.context.bind(target, context.active())
Depends which order of arguments is preferred
The big NO for me is that we will force user to have boiler plate code, instead of simplifying things and making it easier as user will always have to copy context.active() whenever you use bind which simply sounds wrongly
@tedsuo ^^ @carlosalberto ^^

What I propose is to have this

api.context.with(span, callback)
api.context.bind(target)

(1) is out the scope of this PR, lets keep the discussion centered about api.context.bind here

@Rauno56 following maintainers vote in #86 you can move forward with this PR with a required context argument.

Do you think it would be worth adding bound arguments to context.bind?

I would not add this here. Binding this/arguments is an existing JS feature for functions.
context.bind() is intended to bind a context on a function or Eventemitter.
I don't think we should mix two different concerns in one function.

We do have this concern embedded in with already...

Do you think it would be worth adding bound arguments to context.bind?

I would not add this here. Binding this/arguments is an existing JS feature for functions.
context.bind() is intended to bind a context on a function or Eventemitter.
I don't think we should mix two different concerns in one function.

We do have this concern embedded in with already...

Its not really the same. with calls the function, so it makes sense that you can apply arguments. bind doesn't call the function, so the arguments will be provided at call time.
boundFn = context.bind(ctx, fn, arg1, arg2);
boundFn(arg3, arg4); // which arguments get used here? what happened to arg1 and arg2?

// returns the result of calling fn with arg1 and arg2 as arguments
result = countext.with(ctx, fn, arg1, arg2);

hmm. looking at Function.prototype.bind it looks like arg1 and arg2 would be prepended at call time so it would be equivalent to fn(arg1, arg2, arg3, arg4). I still think that is quite nuanced and possibly confusing to new users.

That was my thinking, yes.

Do you have a usecase in mind for binding arguments or are you just trying to mirror the Function.prototype.bind behavior?

The latter.
I feel I could wildly imagine up a corner-case situation where it would come in somewhat handy, but compared with even Function.prototype.bind(which I do often use), which is already a relatively lesser-known and -used feature it's even more so. So.. I'm going to save everyone from that. :)
There is no absolute need for "argumented" context.with, because

one could use Function.prototype.bind or;
alternatively define a wrapper arrow function or;
90% of the time when it's possible just reference the arguments from the outer scope(which is potentially bad for GC optimizations);
but I think it's extremely convenient.

I find the current solution a practical one, I'd be happy going with!
I'd love to see this being merged and released ASAP so we can quickly test and release SDK changes as well. However, users referencing ^0.18.0 or the like, would immediately get that installed, breaking every instrumentation using context.bind.
Ideas how to mitigate those issues?

However, users referencing ^0.18.0 or the like, would immediately get that installed, breaking every instrumentation using context.bind.
Ideas how to mitigate those issues?

If major version is 0 the ^ range will not select new minor versions. so ^0.18.0 is the same as 0.18.x.
There are a lot other breaking changes between 0.18.0 and 0.20.0 and there will be other ones after 0.20.0 besides this.

This will be included in 0.21.x release which will be released with npm @next tag so that users who run npm i @opentelemetry/api won't receive it (that gives them the @latest tag). Core and contrib will then be updated (also using @latest tag). When all compatible versions are released with @next, I will apply the @latest tag.


HSEARCH-3566 Reindexing is not triggered when an association mentioned in an IndexingDependency.derivedFrom is updated

https://hibernate.atlassian.net//browse/HSEARCH-3566

Pull Request Test Coverage Report for Build 2

7 of 7 (100.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.003%) to 88.561%

Files with Coverage Reduction
New Missed Lines
%

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/orchestration/impl/ElasticsearchBatchingSharedWorkOrchestrator.java
1
70.93%

Totals

Change from base Build 216:
-0.003%

Covered Lines:
16916

Relevant Lines:
19101

💛  - Coveralls

Merged, thanks!


fix(versions): update Activiti/activiti-cloud-query versions into master

UpdateBot pushed helm dependency: common to: 1.1.17

UpdateBot commands:
updatebot push-version --kind helm common 1.1.17


Cypress version 8.6.0

Currently the cwa-website is set to use Cypress 7.6.0
https://github.com/corona-warn-app/cwa-website/blob/e0d6138231e625146c71b1fd17837e7bec0e4946/package.json#L66
There is a new version of Cypress, 8.6.0, available. See Cypress documentation regarding:

Changelog
Migration Guide

I successfully executed:
npm run test:chrome
npm run test:firefox

with Cypress 8.6.0, but only after changing
https://github.com/corona-warn-app/cwa-website/blob/e0d6138231e625146c71b1fd17837e7bec0e4946/package.json#L11-L12
to:
    "cypress:run:chrome": "cypress run --browser chrome --headed",
    "cypress:run:firefox": "cypress run --browser firefox --headed",

i.e. adding "--headed" since "--headless" has become the default with Cypress 8.x.x and without "--headed" Cypress outputs the error message:
Failed to connect to Chrome, retrying in 1 second (attempt mm/nn) or
Failed to connect to Firefox, retrying in 1 second (attempt mm/nn)
I don't see an advantage of migrating to Cypress 8.6.0 at this time, but I wanted to share the investigation results anyway.

Cypress 8.6.0 is no longer the latest version.
Currently 9.1.0 is the latest version of Cypress. See Changelog.
Now that PR https://github.com/corona-warn-app/cwa-website/pull/2067 has been merged, cwa-website could be updated to use Cypress 8 or 9 at any time. There is however no pressing need to move from the currently used Cypress 7.6.0 version.


[CT-10785] Microbatch models  should respect full_refresh model config

Resolves #10785
Problem
In dbt-core, it is generally expected that values passed via CLI flags take
precedence over model level configs. However, full_refresh on a model is an
exception to this rule, where in the model config takes precedence. This
config exists specifically to prevent accidental full refreshes of large
incremental models, as doing so can be costly. It is actually best
practice to set full_refresh=False on incremental models.
Prior to this commit, for microbatch models, the above was not happening. The
CLI flag --full-refresh was taking precedence over the model config
full_refresh. That meant that if --full-refresh was supplied, then the
microbatch model would full refresh even if full_refresh=False was
set on the model. This commit solves that problem.
Solution
Update _is_incremental to prefer the model.config.full_refresh value over the RuntimeConfig.args.FULL_REFRESH value provided by CLI flags.
Checklist

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

The code looks good but I have some questions about the new behavior.
Is this a behavior change for the existing incremental model also? My understanding is with the new overwrite order, the user can not do a full refresh without changing the code. Is this correct? If yes is this what we want? @graciegoheen
Feel free to dismiss my review if my understanding is wrong.

This is not new behavior for incremental models. This is already how incremental models operate on the full_refresh model config. This is only a change to make microbatch models following the same pattern. Here is the documentation on the full_refresh model config.


Added my name on translator list

Added my name along with the handle on the translator list.

Thanks!


Prepare for next release

coverage: 60.681%. remained the same
when pulling c7da28c62ac46e23539bbe829b19c83c494fb80d on feature/prepare-next-release
into d9686966cd6c75df27802dde79ee7821e6ae4e6a on master.


Groovy sample?

I tried:
@Grapes([
@Grab(group='org.slf4j', module='slf4j-simple', version='1.7.25'),
@Grab('io.javalin:javalin:0.3.7')
])
import io.javalin.Javalin

Javalin app = Javalin.start(7000)
app.get("/") {ctx -> ctx.result("Hello World")}

but it exits immediately... shouldn't it run until ctrl+c?

It should. Can you tell me what happens when you run this?
import org.eclipse.jetty.server.Server;

public class JettyTest {
    public static void main(String[] args) throws Exception {
        new Server(8080).start();
    }
}

(use the jetty-version bundled with Javalin)

@crazy4groovy I have managed to run the Hello World snippet successfully on both my Mac and my Windows machine. Closing the issue now, please reopen if you can create a example project that I can run where it doesn't work.


ResourceLoader.add(...) does not operate like a queue

Hello,
According to the docs, the purpose of the loader.add(...) function is to enqueue something for loading.
What is the point of "enqueueing" something when doing so multiple times throws an error like
Error: Cannot add resources while the loader is running.. Why should the loader being in an active processing state stop enqueuement?
The word enqueue suggests Buffering the work items until the processor is ready, after which the processor pops (i.e array.unshift) the next work item off the list, and on it goes.
My use case is that I am using Pixi.js, which uses this library, to load textures somewhat adhoc as needed.
Could you shed more light on this "Error: Cannot add resources while the loader is running." error? I'd like to learn why it was implemented this way so I know whether to make a PR to improve on this behavior.
Thanks for the tool.

I believe the way it works right now, where you can only add to a loader that is not already active, is because there are tons of edge cases involved when adding to a loader already in progress, so this simplifies things a lot. For a very simple example, you have a loader send out an event for progress being 99%, but then a items are added, and the progress is now down to less than 90%. There are much more complex edge cases than this! So much simpler to just allow each loader to be queued up, started, and then allowed to end.
You can re-use a loader that has finished, by first calling reset on it before adding more stuff to the queue.
In your case though, you want to add things on an ad-hoc basis. In this scenario, I'd recommend to create your own small 'getLoader' functionality that manages an internal pool of loaders. If you have a free loader, just grab it and use. If all loaders are busy, create a new one, add items to it, and start it. Once a loader has finished it's queue, call reset on it, and move it back into the pool for next time you try.
So I agree that a bit of the wording on the docs could make things a little clearer, but in terms of behaviour being changed, that's up to the project maintainer! :)

@themoonrat thanks for the response.
It does raise several other questions however - i.e

I'm confused as to why it keeps track of loader.resources (equivalent type Hashtable<string, Resource>) if the design sensibilities of the loader is to only load one thing? That's something to be expected from a resource manager, not a one-shot loader.

I can definitely see the case for progress representation from both sides. A user might also need to know that the time scope has changed with the addition of new things to load if in the case of adhoc texture loading.

From my estimation, It kinda seems like the current implementation is trying to mash a different type of solution into the design language of another, hence some of the issues encountered. Like trying to fit a full Tree implementation into a Treenode.
Would it make sense to have 2 distinct different types of solutions?
A ResourceManager that does proper enquement and caching of resources and the other being a simple, lean, promisified, truly one-shot ResourceLoader whereby all it does is take a path and returns a loaded resource? That wa

Hmmm, you say 'if the design sensibilities of the loader is to only load one thing and be reset or discarded' but you can add loads and loads of things to a loader.  And when it's finished, you can reset to start from the beginning again.
Might just be the wording, or semantics, but you make it sound like it's 1 loader per 1 file! Whereas its one loader for a batch of files. You want to load a 2nd batch of files and the 1st hasn't finished yet? Create a 2nd loader!
As well as the 'pool' of loaders, I'd recommend setting each loaders callback to check to see if there any other loaders with stuff in their queue, and if so, start that load going. Depends how many simultaneous queues you think might be going, I guess :) Whether you only want 1 loader going at once, or happy to have some in parallel.
There definitely is a case for a new wrapper as you describe that handles these multiple loaders. Of course, then you may come across 'how do I handle loading percentage across multiple loaders' and some of the same edge cases that this library isn't trying to avoid in the first place.... but if it concentrated on a simple promise based API to keep chucking files in, and getting back when they've loaded, it'd definitely help. You're not the first person to ask about re-using of loaders :)

Like @themoonrat mentioned, the purpose of not having a single loader object handle getting more loads while already in progress is to avoid the issues with progress that come from doing that. There is one exception to this rule which is child resources. Generally this comes from the post-processing of a resource that spawns a load for another resource. For example, downloading a JSON texture sheet file which references an image to go fetch. In these cases we can divide the progress values assigned to the parent resources amongst the children to maintain correct progress values. Adding child resources during loading is allowed, as long as the parent hasn't yet completed (finished all middleware).

The word enqueue suggests Buffering the work items until the processor is ready, after which the processor pops (i.e array.unshift) the next work item off the list, and on it goes.

This is basically how the loader works. You call add() 1..N times to buffer which loads you want to do, then call .load() to start processing that buffer.
The design philosophy here is that one loader is one load operation. That operation can be for 1 files, or it can be for 100 files. The idea is that when you hit a loading screen, you add all the files you want to load to the loader, kick it off, display the progress on your loading screen, and then when it completes move past the loading screen.

I'm confused as to why it keeps track of loader.resources (equivalent type Hashtable<string, Resource>) if the design sensibilities of the loader is to only load one thing and be reset or discarded? That's something to be expected from a resource manager, not a one-shot loader.

Loader.resources exists so you can access the resources that were loaded once loading completes. Without this map, you'd have to monitor progress events and accumulate the resources yourself. This is a valid way to access the loaded resources, but not the only way. Calling .reset() will clear this map (and other internal data) to prepare the loader for reuse. Again it is one loader per load operation, not one loader per file (necessarily).

A ResourceManager that does proper enquement and caching of resources and the other being a simple, lean, promisified, truly one-shot ResourceLoader whereby all it does is take a path and returns a loaded resource?

This project is a simple, lean, truly one-shot resource loader whereby all it does is take a path and returns a loaded resource. It just can do more than one at a time, because often you have a list of things to load not just one. Like it says in the readme:

your project should have a Resource Manager that stores resources and manages data lifetime. When it decides something needs to be loaded from a remote source, only then does it create a loader and load them.

The primary use-cases I've used this for in the past are:

A loading screen with a progress bar. I know all the things to load, and I load them with one loader and display the progress.
Streaming in resources as the player is playing. On this one I don't really need to display progress since usually the player isn't even aware I'm loading. The loader just acts as a workhorse for pre-loading things I'm likely to need in the future.

In both these cases the loader is a low-level piece behind my resource system that managed data lifetime and streaming in the game. This project is not meant to be a replacement for that system.


⚠ Bofrost.lu has degraded performance

In a15d3a9, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 930 ms

Resolved: Bofrost.lu performance has improved in 45e8d92.


SDK is crashing on Xcode 16.0

I update to the Xcode to 16.0 and after that sdk start crashing.

I'm also having this issue

I managed to temporarily work around this issue in my code by using the Button(role:action:label:) initializer instead. I simply passed  nil for the role parameter and the issue went away.

@Faizan-Seera @adammagana thanks for the patience everyone, I'll have a fix out for this by tomorrow.

Any news on this issue ? @vmanot
Thanks for maintaining

@mercierj could you check 0.2.3 and see if the issue is fixed for you?

Thank you @vmanot 💗

@Faizan-Seera I'm closing this issue, feel free to reopen if it persists.

@vmanot yes issue is solved. Thanks buddy.


how to access hybridRoutes while using RBAC?

i want to access hybridRoutes when using RBAC on isAuth:true. but whenever i try to access hybridRoutes it always send me back to accessRoute which defined in RBAC role. maybe i am doing something wrong?

Shield.tsx

const Shield = ({ children }: Children) => {
  const router = useRouter();
  const [session] = useSession();
  const [isLoading, setIsLoading] = useState(true);
  const [isAuth, setIsAuth] = useState(false);

  //set authState based on session
  useEffect(() => {
    if (session) {
      setIsAuth(true);
      setIsLoading(false);
      return;
    }
    setIsAuth(false);
    setIsLoading(false);
  }, [session]);

  const shieldProps: NextShieldProps<typeof privateRoutes, typeof publicRoutes> = {
    router,
    isAuth,
    isLoading,
    publicRoutes,
    hybridRoutes,
    privateRoutes,
    loginRoute: '/login',
    LoadingComponent: <PageSpinner />,
    RBAC: {
      ADMIN: {
        grantedRoutes: adminRoutes,
        accessRoute: '/admin',
      },
      USER: {
        grantedRoutes: studentRoutes,
        accessRoute: '/student',
      },
    },
    userRole: session?.user.role,
  };

  return <NextShield {...shieldProps}>{children}</NextShield>;
};

routes.tsx

const publicRoutes: string[] = ['/login', '/register', '/reset-password'];

const hybridRoutes: string[] = ['/', '/courses', '/about', '/scoreboard', '/contact'];

const adminRoutes: string[] = [
  '/admin',
  '/admin/uniquecode',
  '/admin/accessibility',
  '/admin/tests',
];

const studentRoutes: string[] = [
  '/student',
  '/student/analytics',
  '/student/exam/[id]',
  '/student/exam/result/[id]',
];

const privateRoutes: string[] = [...adminRoutes, ...studentRoutes];

What were you doing wrong in the end?


Develop

Codecov Report

Merging #20 into master will increase coverage by 1.42%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
+ Coverage   63.33%   64.75%   +1.42%
==========================================
  Files          19       18       -1
  Lines         761      769       +8
==========================================
+ Hits          482      498      +16
+ Misses        279      271       -8

Impacted Files
Coverage Δ

...ources/AWSXRayRecorder/UDPEmitter/UDPEmitter.swift
0.00% <0.00%> (ø)

Sources/AWSXRayRecorder/Segment+Exception.swift
88.63% <100.00%> (+14.27%)
:arrow_up:

Sources/AWSXRayRecorder/Segment.swift
89.45% <100.00%> (+1.84%)
:arrow_up:

Sources/AWSXRayRecorder/Config.swift
95.45% <0.00%> (-4.55%)
:arrow_down:

Continue to review full report at Codecov.

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


Installable version not working

Setup batch file was run and completed, the cmd prompt stated to open run batch file and opening the run batch just hangs on an empty blank cmd screen and nothing runs. CUDA already installed to latest version.
Win10 64bit
Python3.9

Edit: this error message displays
DEBUG:matplotlib:matplotlib data path: E:\aivocals\install\miniconda\lib\site-packages\matplotlib\mpl-data
DEBUG:matplotlib:CONFIGDIR=C:\Users\Yaseen Ahammed.matplotlib
DEBUG:matplotlib:interactive is False
DEBUG:matplotlib:platform is win32
DEBUG:matplotlib:CACHEDIR=C:\Users\Yaseen Ahammed.matplotlib
DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Yaseen Ahammed.matplotlib\fontlist-v330.json
Note: Automatic mode not available.To enable: pip install pygame keyboard
INFO: Could not find files for the given pattern(s).
Note: Rubberband is not available. Timestretch not available.
Could not find TalkNet on address <IP_ADDRESS>:8050
Traceback (most recent call last):
File "inference_gui2.py", line 1185, in
w = InferenceGui2()
File "inference_gui2.py", line 701, in init
self.audio_recorder = AudioRecorder(self)
File "inference_gui2.py", line 370, in init
self.record_shortcut = QShortcut(QKeySequence(RECORD_SHORTCUT), self)
NameError: name 'RECORD_SHORTCUT' is not defined
Press any key to continue . . .

Sorry; please update/pull and try again. Might be fixed by 24237af but cannot test on Windows right now.

Sorry; please update/pull and try again. Might be fixed by 24237af but cannot test on Windows right now.

Fixed it thanks


Chat - Empty chat will show a pronoun placeholder

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue was found when executing #4921
Action Performed:

Open app and login
Start a conversation with someone never messaged before, with a contact who has setup their desired pronoun

Expected Result:
"Be the first person to comment!" new screen shown without any issues
Actual Result:
New message shows a pronoun placeholder string in the end
Workaround:
unknown
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.1.16-1
Reproducible in staging?: Yes
Reproducible in production?: No (New feature)
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Issue was found when executing #4921

Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on GitHub

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

Identify the pull request that introduced this issue and revert it.
Find someone who can quickly fix the issue.
Fix the issue yourself.

Triggered auto assignment to @Gonals (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

as we discussed in the issue for that if there are any pronouns we should show and also it is in Figma design
https://www.figma.com/file/rReWxiEhGDHIjajsE9XoJw/Start-a-Chat?node-id=0%3A1

On it

Do you mind if I propose a fix? @Gonals

We recently made a change to localize the pronouns.
But the PR introducing this feature, did not pulled the latest changes.
Now, backend store prefixed strings for pronouns instead of real value.
We have to use

   if (pronouns && pronouns.startsWith(CONST.PRONOUNS.PREFIX)) {
        const localeKey = pronouns.replace(CONST.PRONOUNS.PREFIX, '');
        pronouns = props.translate(`pronouns.${localeKey}`);
    }

instead of https://github.com/Expensify/App/blob/c95c2ddbafc5c7e9904ca943cff783d913d53556/src/components/ReportWelcomeText.js#L59.
Thus it would use the real value on the UI https://github.com/Expensify/App/blob/c95c2ddbafc5c7e9904ca943cff783d913d53556/src/components/ReportWelcomeText.js#L82.
This will fix it.


Provide support for fast integer types

libc currently provides a number of convenient integer type aliases. However, the least and fast integer types (e.g. int_fast16_t, uint_least8_t, etc.) aren't currently included. Is there a reason for their exclusion, or is this just awaiting an implementation?

Nah just awaiting an implementation!

After some research in apple's libc, musl and glibc, I found that [u]int_least(n)_t == [u]int(n)_t. For [u]int_fast(n)_t, however, it's more complicated:

bits
8
16
32
64

apple
8
16
32
64

glibc 32
char
int
int
long long

glibc 64
char
long
long
long

musl
8
32
32
64

How to know which typedef to put in this crate ?

@alexcrichton or someone else could you mentor me to implement fast types alises ?

In #1838 it was noticed that the "least" aliases resolve exactly to our types, so they were omitted for the same reason that the fixed-width aliases were deprecated.


Collaborative coding environment

Students should be able to work together on a group project, and see what each other is doing, edit simultaneously, etc.
It's an open question whether this should follow a source control model, or a Google Docs style collaborative editing.  The latter would probably be better, given the ease of use and lower required complexity of projects, but it's also harder to build.

It might be surprisingly easy to do this with https://togetherjs.com/  It's worth taking a shot on a dev server, anyway, to see how usable it is.

@cdsmith I've been tinkering with TogetherJS.  It relies on a lightweight Node server they call a Hub.  Do you think there is any usefulness in cloning this server?
Would you rather just use the Hub that Mozilla provides?  https://togetherjs.com/docs/#hosting-the-hub-server
I have the beginnings of a clone here: https://github.com/peterbecich/togetherjs/blob/haskellHub/haskellHub/src/Hub.hs
It uses wai-websockets, scotty and warp.

@parvmor was planning to work on this over the summer as part of the Summer of Haskell program.  He'd be more knowledgeable about the intended approach.  You could also coordinate with him if you're looking at poking into this, since he's already committed to it.
My understanding of the situation is that TogetherJS is probably not the right approach, in the end.  Integrating it closely enough with CodeWorld would be a bit of a challenge.

Thanks!

Hello there!
I stumbled here from the gsoc ideas list on Haskell website.
Is TogetherJS still the preferred way to this? I would love to get started.

@devanshbatra04 Great question!  The best answer is that I don't know, and the first step here would probably be to assess the options and the existing work, and make a decision on the way forward.
If TogetherJS can be made to work, then it's possibly an option.  In any case, it looks very simple, and low-maintenance, which is a great thing!  I suppose it would also be pretty easy to try, if https://davidwalsh.name/togetherjs is accurate; it looks like adding TogetherJS is a pretty simple process!
It also seems to handle managing identities and connecting peers, and that's one of the most worrisome parts.  But I worry the experience would be underwhelming, since CodeMirror does a lot of editing logic that probably shouldn't be replicated between clients, and the multiple-cursor experience may not work so well in CodeMirror as it does in plain textareas on web forms.  TogetherJS does provide some ways to manage more complex state.  I also worry that it doesn't seem to have been maintained much since 2015, so if we needed any kind of change, we're probably faced with either forking it, or doing without.
@parvmor also did some work on this in 2017 as part of Summer of Haskell.  His work is still around as a pull request.  Unfortunately, his pull request came in at the very end of the summer, needed some work, and he hasn't followed up on it.  But his code is still there, and one step in assessing this project would be to read through it and understand if that's a good basis for further work.

@cdsmith Thanks a ton for such detailed overview. I Definitely appreciate it a lot.
It does make sense to avoid togetherjs given it is not being maintained and also the Code World specific requirements.
I will dig around with any alternatives I can find and also check out the pull request you are talking about.
If none of that works out, I can try proposing a roadmap or solution of our own.


New feature required- Support different data sources

Hi,
Currently daal4py accepts only CSV, np.array and pandas dataframes. If data more than to fit into memory and located in databases different solutions are come up such as  polars df which uses connectorx to access data stored in databases and ibis that uses databases as backend such as ClickHouse. So, it would be great if daal4py can accept different data sources, to handle bigger data sizes.
here is the error I got when try to read a clickhouse table using ibis into daal4py
Got type 'ClickhouseTable' when expecting string, array, or list of 1d-arrays.
here is the error I got when try to read a polars df into daal4py
Got type 'DataFrame' when expecting string, array, or list of 1d-arrays.
Regards
Mohamed

We are considering adding support of different dataframes - https://data-apis.org/dataframe-protocol/latest/purpose_and_scope.html


Unable to compile - Kernel 5.9

Hi!
Sorry for a noob question but I can't seem to compile and install these drivers.
I get the following:

"make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.9.0-0.bpo.2-rt-amd64/build M=/home//Downloads/RTL8192EU  modules
make[1]: Entering directory '/usr/src/linux-headers-5.9.0-0.bpo.2-rt-amd64'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[2]: *** [/usr/src/linux-headers-5.9.0-0.bpo.2-common-rt/Makefile:718: include/config/auto.conf] Error 1
make[1]: *** [/usr/src/linux-headers-5.9.0-0.bpo.2-common-rt/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.9.0-0.bpo.2-rt-amd64'
make: *** [Makefile:1829: modules] Error 2"

I tried to:
make oldconfig
make prepare
make scripts
I have:
gcc 8.3.0-6
git 2.20.1
dkms 2.6
And I'm trying to install the drivers on Debian based distro with 5.9 kernel.

I think I have opened a duplicate of this issue. Experiencing the same thing on my machine.

I think I have opened a duplicate of this issue. Experiencing the same thing on my machine.

Please try to build my fork: https://github.com/drygdryg/RTL8192EU


[Question]:  ClientDataHash Property taking a max of only 32 bytes

Is there an existing issue for this?

[X] I have searched the existing issues

What is your question?
I am trying to test the bulk creation of fido keys in Entra ID. when i call the entra API to create the credential option. the challenged that is sent is very large and i am unable to pass that to the add that to the clientDataHash value and get an error that states System.InvalidOperationException: 'Wrong length.'
i am using the below to convert the string to bytearray
var challenge = DataTransform.Base64UrlToByteArray(configBuilders.publicKey.challenge);
public class DataTransform
{
public static ReadOnlyMemory Base64UrlToByteArray(string b64urlString)
{
// Replace URL-safe characters
string temp = b64urlString.Replace("_", "/").Replace("-", "+");
    // Add padding if necessary
    int padding = temp.Length % 4;
    if (padding != 0)
    {
        temp = temp.TrimEnd('=');
        temp += padding % 2 > 0 ? "=" : "==";
        return Convert.FromBase64String(temp.Normalize(NormalizationForm.FormC));
    }

    // Decode Base64 URL
    return Convert.FromBase64String(temp);
}

}
pass the returned value
var makeCredentialParams = new MakeCredentialParameters(
new RelyingParty(configBuilders.publicKey.rp.id), userEntity, "public-key", Yubico.YubiKey.Fido2.Cose.CoseAlgorithmIdentifier.ES256)
{
ClientDataHash = challenge
};
Context
No response

Yeah, the ClientDataHash is definitely one of the more confusing parts. @DennisDyallo @dainnilsson Definitely an excellent candidate for a helper class / function. I know @AaFortner and @jamiehankins have a well factored implementation that could probably be lifted into the SDK.
Please read the following section of the Webauthn spec: <IP_ADDRESS> Client Data JSON: Serialization.
Construct the payload according to that spec and then run it through a SHA256 hash, and there you have your ClientDataHash.
It basically looks like this:
static class ClientData
{
    public byte[] CreateHash(string challenge, string origin, bool crossOrigin = false)
    {
        var result = new StringBuilder();

        // Append the type. Should always be "webauthn.create" for MakeCredential operations
        result.Append("{\"type\":\"webauthn.create\"");
        // Append the challenge
        result.Append($",\"challenge\":\"{challenge}\"");
        // Append the origin (RP)
        result.Append($",\"origin\":\"{origin}\"");
        // Append crossOrigin. 'true' if explicitly 'true', 'false' otherwise.
        result.Append($",\"crossOrigin\":\"{crossOrigin.ToString()}\");
        result.Append("}");

        // Hash the data
        return SHA256.HashData(Encoding.UTF8.GetBytes(sb.ToString()));
    }
}

The above code is only meant to serve as an example. I typed it out in GitHub - I did not compile or test it. If you read the spec, the implementation is slightly more involved. If you want to be robust, you should implement the spec more precisely. I simply threw something together for illustrative purposes.
I hope the code and the pointer to the spec is helpful!

This definitely helped. Thank you very much. it would be great if there are helper functions added that could assist in the creation of the keys. Re-Reading the documentation now makes more sense


can I traverse the function jump stack ?

Feature description
commonly I use  g + d/D/h jump between functions, from calling point to definition, and vice versa.
I go back and forth by Ctrl + I/O with jump stacks, but when I do some searches between function jumps, it becomes a real mess !
so, I want to know if there any standalone jump stack for functions (and shortcuts, too), it will be useful if one just want to read code, after reading currrent function, he can go back the calling place by a simple command, no matter how many searches there are in this file.
can nvim support this feature? or tell me how if it has been supported.
thanks a lot~
Additional information
jump stacks in vim (:ls)

You want a new keymap to back and force for the jumps which are just caused by gD

g + D/d/h，all jumps about function

Perhaps this one:
https://github.com/cbochs/portal.nvim

@goodpaperman The official term in nvim of jump stack is "jump list"

@goodpaperman I would like to provide a vim-builtin solution. If you need a location that you can jump to that is independent of what you do later, you can use a global mark (m[A-Z] to mark and `(or ')[A-Z] to goto a mark). This is extremely useful if your requirement is to "go back to the calling place". You may have your own marking rules so that you can mark in that order and return to the place you want. After a period of adaptation, you will find out that this feature can actually take you to anywhere you want.
:h mark
AFAIK Bram doesn't have a plan to implement features like "jump list modification". (Sorry I can't find that issue for the time being)

@goodpaperman P.S. The official term in nvim of jump stack is "jump list".

that's right

@goodpaperman I would like to provide a vim-builtin solution. If you need a location that you can jump to that is independent of what you do later, you can use a global mark (m[A-Z] to mark and `(or ')[A-Z] to goto a mark). This is extremely useful if your requirement is to "go back to the calling place". You may have your own marking rules so that you can mark in that order and return to the place you want. After a period of adaptation, you will find out that this feature can actually take you to anywhere you want.
:h mark
AFAIK Bram doesn't have a plan to implement features like "jump list modification". (Sorry I can't find that issue for the time being)

do you meaning make the function jump list by global mark? some comstomization is needed, I think.
Using marks directly is inconvenient in my situation.

Perhaps this one: https://github.com/cbochs/portal.nvim

It seems to be  a  jump list manager, not what I need

@goodpaperman I would like to provide a vim-builtin solution. If you need a location that you can jump to that is independent of what you do later, you can use a global mark (m[A-Z] to mark and `(or ')[A-Z] to goto a mark). This is extremely useful if your requirement is to "go back to the calling place". You may have your own marking rules so that you can mark in that order and return to the place you want. After a period of adaptation, you will find out that this feature can actually take you to anywhere you want.
:h mark
AFAIK Bram doesn't have a plan to implement features like "jump list modification". (Sorry I can't find that issue for the time being)

do you meaning make the function jump list by global mark? some comstomization is needed, I think. Using marks directly is inconvenient in my situation.

Yep, but you can go far beyond this. First you should create a mark list (the marks in this list are not commonly used [directly]), and then implement this feature by maintaining a stack + calling Lspsaga goto_definition. You can set a custom keymap to directly call this function.

Quantitative limitation for this solution? vim has 26 global marks at most, when I browse large project, that maybe not enough..

Quantitative limitation for this solution? vim has 26 global marks at most, when I browse large project, that maybe not enough..

Then from another perspective. If you just don't want search jumps to be recorded in the jump list, you could define your own mapping like this (just an example):
["n|<A-n>"] = map_cr("keepjumps normal n"):with_noremap():with_silent(), -- search forward

:h :keepjumps

p.s., You can also use <leader>h to switch between the header file and corresponding source code if it's a C-family project.
https://github.com/ayamir/nvimdots/blob/d0d63ad7f7ae3fccc123862b3e49faac144fa63d/lua/core/event.lua#L107-L111
If you don't prefer to open this in a split, you can change it to:
"nnoremap <silent> <leader>h :ClangdSwitchSourceHeader<CR>",

It seems to be  a  jump list manager, not what I want

how about this?
https://github.com/asbjornhaland/telescope-send-to-harpoon.nvim
with harppon.nvim

Quantitative limitation for this solution? vim has 26 global marks at most, when I browse large project, that maybe not enough..

Then from another perspective. If you just don't want search jumps to be recorded in the jump list, you could define your own mapping like this (just an example):
["n|<A-n>"] = map_cr("keepjumps normal n"):with_noremap():with_silent(), -- search forward

:h :keepjumps
p.s., You can also use <leader>h to switch between the header file and corresponding source code if it's a C-family project.
https://github.com/ayamir/nvimdots/blob/d0d63ad7f7ae3fccc123862b3e49faac144fa63d/lua/core/event.lua#L107-L111
If you don't prefer to open this in a split, you can change it to:
"nnoremap <silent> <leader>h :ClangdSwitchSourceHeader<CR>",

I know your idea: filter out other jumps to keep the jump list only record function jumps.
that's novel, I will consider.
knowlege about switch between cpp & h is useful, I have change my configures. thanks a lot~

It seems to be  a  jump list manager, not what I want

how about this?
https://github.com/asbjornhaland/telescope-send-to-harpoon.nvim
with harpoon.nvim
https://youtu.be/Qnos8aApa9g

Learn much from the demo video, harpoon focus on jumps between files, auto saves positions when switch buffer or quit, but jumps inside a large file is not supported, maybe need a little customize, I will refer to it, thanks a lot~

@goodpaperman I think maybe you'll be interested in this plugin: https://github.com/DNLHC/glance.nvim


'TreeEnsemble' object has no attribute 'values' when model predictions are all from one class

Hello,
I was having problem with shap.TreeExplainer
The problem is binary classification, sample size is too small, and model predictions are all from one class
Code to reproduce:
Shap version: 0.35.0
numpy version:  1.18.1
LightGBM version: 2.3.1
import shap
import numpy as np
from lightgbm import LGBMClassifier

size = 10
X = np.random.rand(size,4)
Y = np.random.binomial(1, 1, size=size)

model = LGBMClassifier()
model.fit(X, Y)

shap.TreeExplainer(model, X, model_output="probability")

Output:
-->  shap.TreeExplainer(model, X, model_output="probability")

~/.local/lib/python3.8/site-packages/shap/explainers/tree.py in __init__(self, model, data, model_output, feature_perturbation, **deprecated_options)
    149         elif data is not None:
    150             try:
--> 151                 self.expected_value = self.model.predict(self.data).mean(0)
    152             except ValueError:
    153                 raise SHAPError("Currently TreeExplainer can only handle models with categorical splits when " \

~/.local/lib/python3.8/site-packages/shap/explainers/tree.py in predict(self, X, y, output, tree_limit)
    992
    993         if tree_limit < 0 or tree_limit > self.values.shape[0]:
--> 994             tree_limit = self.values.shape[0]
    995
    996         if output == "logloss":

AttributeError: 'TreeEnsemble' object has no attribute 'values'

The same for me, how can I get probabilities instead of log-odds for lgbm?
shap_values = shap.TreeExplainer(model, feature_dependence='independent', model_output="probability")

ValueError: Only model_output="raw" is supported for feature_perturbation="tree_path_dependent"

@arsine1996 for your issue, model_output='probability' is only currently supported for feature_perturbation='interventional', and for that you will also have to pass some sample data as well. The docs were outdated as the feature_dependence param has been renamed, I've put in a PR #1445 to update them


installation fails

Hello, I'm trying to install your dropbox api and get the following error. Any ideas?:
fuji:photos root# $PHP5 composer.phar require alorel/dropbox-v2-php
Using version ^0.3.3 for alorel/dropbox-v2-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installing aloframework/common (1.3.3)
Downloading: 100%

Installing psr/http-message (1.0.1)
Downloading: 100%

Installation failed, reverting ./composer.json to its original content.
[ErrorException]
copy(/santa/home/Allegro/customers/Frantz/photos/vendor/composer/0b15cccd/php-fig-http-message-f6561bf/._CHANGELOG.
md): failed to open stream: No such file or directory
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...
fuji:photos root#

Hm, I've never experienced this error. What's your php version?  Could you try installing it with PHP7?

Here you go...
fuji:photos root# echo $PHP7
/opt/local/bin/php70
fuji:photos root# $PHP7 --version
PHP 7.0.10 (cli) (built: Aug 20 2016 10:33:58) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
fuji:photos root#
fuji:photos root# $PHP7 composer.phar require alorel/dropbox-v2-php
Using version ^0.3.3 for alorel/dropbox-v2-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installing psr/http-message (1.0.1)
Loading from cache

Installation failed, reverting ./composer.json to its original content.
[ErrorException]
copy(/santa/home/Allegro/customers/Frantz/photos/vendor/composer/094913a8/php-fig-http-message-f6561bf/._CHANGELOG.
md): failed to open stream: No such file or directory
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...
fuji:photos root#

Maybe if you could provide a simple tar or tar.gz file that we could download and expand, then we could get your api package without needing composer?

Hm, I think you might need to clear your composer cache
{lamb} composer require alorel/dropbox-v2-php
Using version ^0.3.3 for alorel/dropbox-v2-php
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing aloframework/common (1.3.3)
    Loading from cache

  - Installing psr/http-message (1.0.1)
    Downloading: 100%

  - Installing guzzlehttp/psr7 (1.3.1)
    Loading from cache

  - Installing guzzlehttp/promises (1.2.0)
    Loading from cache

  - Installing guzzlehttp/guzzle (6.2.1)
    Loading from cache

  - Installing alorel/dropbox-v2-php (0.3.3)
    Loading from cache

Writing lock file
Generating autoload files

Composer needs to be used due to this package's dependencies. In the meantime, you can use this ZIP, which is a result of the above installation
dropbox.zip

On 8/29/16 9:57 AM, Art wrote:

Hm, I think you might need to clear your composer cache

Why would I need to do that? I installed composer for the sole and
express purpose of installing your api. Before that I had never used
composer. If composer's cache needs to be cleared, then it's due to
something that happened as a result of trying to install your api.
Ok, let's assume clearing the composer cache is a worthwhile exercise...
how do I do that?
Thanks,
Barry

{lamb} composer require alorel/dropbox-v2-php
Using version ^0.3.3 for alorel/dropbox-v2-php
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installing aloframework/common (1.3.3)
Loading from cache

Installing psr/http-message (1.0.1)
Downloading: 100%

Installing guzzlehttp/psr7 (1.3.1)
Loading from cache

Installing guzzlehttp/promises (1.2.0)
Loading from cache

Installing guzzlehttp/guzzle (6.2.1)
Loading from cache

Installing alorel/dropbox-v2-php (0.3.3)
Loading from cache

Writing lock file
Generating autoload files

Composer _needs_ to be used due to this package's dependencies. In the meantime, you can use this ZIP, which is a result of the above installation
[dropbox.zip](https://github.com/Alorel/dropbox-v2-php/files/442948/dropbox.zip)

It's just an assumption because the psr/http-message was being installed from cache and causing the exception. You can clear the cache using the composer clear-cache command.

On 8/29/16 10:16 AM, Art wrote:

It's just an assumption because the psr/http-message was being installed from
cache and causing the exception. You can clear the cache using the composer clear-cache command.

Thanks.
Unfortunately it made no difference (see below). I'll take a look at
your zip file.
fuji:photos root# $PHP7 composer.phar clear-cache
Clearing cache (cache-dir): /private/var/root/.composer/cache
Clearing cache (cache-files-dir): /private/var/root/.composer/cache/files
Clearing cache (cache-repo-dir): /private/var/root/.composer/cache/repo
Cache directory does not exist (cache-vcs-dir):
All caches cleared.
fuji:photos root#
fuji:photos root# $PHP7 composer.phar require alorel/dropbox-v2-php
Using version ^0.3.3 for alorel/dropbox-v2-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installing psr/http-message (1.0.1)
Downloading: 100%

Installation failed, reverting ./composer.json to its original content.
[ErrorException]
copy(/santa/home/Allegro/customers/Frantz/photos/vendor/composer/2102c013/php-fig-http-message-f6561bf/._CHANGELOG.
md): failed to open stream: No such file or directory
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-update] [--no-scripts] [--update-no-dev]
[--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable]
[--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader]
[-a|--classmap-authoritative] [--] []...
fuji:photos root#

Hm, in that case you're best off raising an issue with the folks behind composer - I think they'd be much more competent at troubleshooting this.


Changes removed from stage during lint?

(Sorry I did not investigate this further. I just experience data loss, presumably due to this project and just disabled it pending further investigation).
There was a pre-commit hook setup in one repository I used, running lint-staged.
I staged some file in Git and then called git commit. The lint started, but since I knew that it would fail, I canceled it (^C).
Afterwards I had no more staged changes in Git and neither in my working tree.
Could this possibly have been caused by this project?

We don't do anything with files, only run commands you requested, so I don't think it could cause it. Although, I think your commands could do that. What's your config?

The config was:
  "lint-staged": {
    "*.{js,jsx,mjs,ts,tsx,css,less,scss,json,graphql}": [
      "prettier --write --single-quote --trailing-comma none --no-semi",
      "git add"
    ],
    "*.md": [
      "remark . -qfo",
      "git add"
    ]
  },

Though not sure why git add was added in there, if the file was staged already. Possibly to get all staged changes committed, but that kind of defeats the whole point of staging partial files. Will have to track ask the colleague.

git add is needed in case you want automatically commit the changes produced by prettier. In this case both commands run with staged files passed as argument list.

Makes sense. Thanks for the clarification.
Maybe I'll find time this week to reproduce the previous issue and dig in further to find out what exactly caused this.
As it doesn't seem to be related to lint-staged as per your explanation I will close this here.


[PowerRename] Replace syntax help window: Button tool tip is wrong

Microsoft PowerToys version
0.82.1
Installation method
PowerToys auto-update
Running as admin
None
Area(s) with issue?
PowerRename
Steps to reproduce
Hover the i icon near the "Replace with" text box and see that the tool tip text is outdated. We added other help categories since creating the tool tip.
✔ Expected Behavior
A text like "Replace syntax help".
❌ Actual Behavior
The text "Help for Date and Time of the file creation"
Other Software
No response

can you please elaborate on this issue ? im not getting your points properly...

The tool tip of the info button next to the replacement text box is wrong. It says "Help for file creation date and time". but opening the help overlay show help for more syntax categories.
The help overlay shows syntax help for

file time and date
counter syntax
random character syntax

Hope this helps.

The tool tip of the info button next to the replacement text box is wrong. It says "Help for file creation date and time". but opening the help overlay show help for more syntax categories.
The help overlay shows syntax help for

file time and date
counter syntax
random character syntax

Hope this helps.

okay so you want to change the text of the info button to something like "Replace Name syntax help", Am i right ? should i work on this?

@Agnibaan
I think that would make sense as it describes the content better.
Your help is welcome.

@Agnibaan I think that would make sense as it describes the content better.
Your help is welcome.

okay then i would work on this...

@Agnibaan
I think these are the strings to change:
https://github.com/microsoft/PowerToys/blob/main/src%2Fmodules%2Fpowerrename%2FPowerRenameUILib%2FStrings%2Fen-us%2FResources.resw#L345-L350

there is some issue im facing ... after building the installer solution i cant get the PowerToysSetup.msi file. i don't know what's wrong.

@htcfreek
there is some issue im facing ... after building the installer solution i cant get the PowerToysSetup.msi file. i don't know what's wrong.

@Agnibaan
Did you build the BugReportTool? According to this docs you need the PowerToys and the BugReportTool to build the MSI.
Or you can try if you can start PowerRename.exe stand alone with files list. As we only interested in the ui and don't need to test renaming we theoretically don't need files. (Not sure if this works.)
And last but not least I imagine that you can change the code somewhere to start PowerRename with a face file list for benchmarks/debugging. But I never did that and don't know how to do this.
Hope this helps you.

i m getting error while building the bugReportTool , i think that's why i cant  get the installer also.
we cant get that edit window of power rename without running it properly , we need to build it first .

@Agnibaan
Any updates?

@htcfreek
im facing some problem during the build process ... somehow i cant build the powerRename ... i m following the dev docs but it still not working...

@htcfreek there is some issue im facing ... after building the installer solution i cant get the PowerToysSetup.msi file. i don't know what's wrong.

@agnibaan
For your information: You can debug the PowerRename UI as single project by setting it as startup project and running a debug build.


Feature: Please restrict the article text size to avoid layout shift

Most of the cards sizes are irregular could you please Please fix it by restrict the article text size

If you need this feature assign this issue to me😂😂

Hi @Basavarajakjbasuu, I assigned to you, You just fix #5 this issue


[BUG] Key Vault adding escape characters on secret values.

Library name and version
Azure.Security.KeyVault.Secrets 4.5.0
Describe the bug
Key Vault secret value of Pass\Word comes out as Pass\\Word

Expected behavior
Key Vault secret value of Pass\Word should not have escape character when read from configuration.
Reproduction Steps
Please see attached screenshots.
Environment
.Net 7
Azure.Security.KeyVault.Secrets 4.5.0

A backslash in most languages is an escape (control) character, so it has to be escaped to allow a \ in your input. The portal or service is doing exactly that.

\W is not a valid escape sequence, so I'm not aware of any way you could set that as a value and have it be valid. Secrets are strings and have to be encoded as proper strings or be rejected. If you really what invalid string sequences you'll have to base64 encode a byte array and store the base64-encoded value as a string, then base64 decode it when getting the secret.
The same is true in reverse for \: the debugger is showing \\ (as does the Azure CLI and more) to make it a proper string. If you copied and pasted the value without the escaped \ (as \\) into C# source, the compiler would err since \W is invalid.


Allow upgradable contracts to inherit directly from EternalStorage

Make EternalStorageProxy inherit from EternalStorage first
Remove OwnedUpgradeabilityStorage

Switching EternalStorageProxy to inherit from EternalStorage before OwnedUpgradeabilityProxy makes the EternalStorage state come first. This allows upgradable smart contracts (like Token_V0 in the example) to inherit directly from EternalStorage instead of OwnedUpgradeabilityStorage and completely eliminates the need for OwnedUpgradeabilityStorage. OwnedUpgradeabilityStorage was necessary to make sure the EternalStorage state was in the right memory slots but if no state comes before the EternalStorage state, it is not necessary.

:clap: :clap: @cwhinfrey . I think you will need to change the diagram of the implementation in the docs too and remove the OwnedUpgradeabilityStorage too, right?

👍 @AugustoL I'll

@AugustoL I update the docs. Let me know if it makes sense. (Also, didn't mean to close the PR a little bit ago)

In this case we are breaking the idea of having a Token_V0 that follows exactly the same storage structure needed by the proxy completely, am I right? I mean, it won't be aware of the upgradeabilityProxyOwner, right?

@facuspagnuolo Right, the storage structure would be the same for the EternalStorage state variables but Token_V0 functionality would not be aware of _upgradeabilityOwner, _version, and _implementation unless it also inherited from UpgradeabilityOwnerStorage and UpgradeabilityStorage. My thinking was that typically contracts like Token_V0 are only interacting EternalStorage state variables and that the state and functionality from UpgradeabilityOwnerStorage and UpgradeabilityStorage was unnecessary for contracts like Token_V0.

Oh, I see.. Looking at the readme diagram it wasn't clear that you were changing the storage structure of the EternalStorageProxy too, nice catch! Given that left-to-right order in the diagram was intended, we should flip the readme diagram to reflect how EternalStorageProxy's inheritance structure works now.

@facuspagnuolo Good point. Just updated the readme diagram to reflect the inheritance structure.

@cwhinfrey please indent the readme diagram two more spaces to the right, otherwise it won't be interpreted as a block code and the result will be the following:

Thanks!

@facuspagnuolo updated 😃


test_change_default_device_with_ctx seems to flakily pass

Ref https://github.com/Lightning-AI/lightning-thunder/issues/853
test_change_default_device_with_ctx seems to flakily pass and fails otherwise - removing strict=True. Will investigate more into this.

I think it is not the test, but the Inés before...

#849 should mostly fix this.


Suggestion: Switch the "Brightness" and "Cache" tabs

I think it makes sense because the Cache is more like an advanced feature, but the brightness is something people would use more

Agreed, will move that for next version

@glouel Is this were you live?🤣🤣🤣🤣
Or is it Eiffel Tower coordinates again?🤣🤣🤣

CAP. Current
Remove the extra spaces between the Colons

Haha yeah I put those in the screenshot to avoid showing my location ;)
Noted on those, will look at that tomorrow thanks !

@glouel I sent JohnCoates a email like five days ago and he didn't reply yet.  Would you be able to reach out to him?

I did earlier today, I'll let you know if he responds. Took him a while the first time too so hang in there ;)

Thank you now get some rest:)


Stake Maturity Test Vectors

Here are the test vectors for the Stake Maturity feature.
The parameter percentage_to_stake needs to be an integer greater than 0 and smaller or equal to 100.
stake-maturity.json.txt

The script to build the vectors is here.


[2116] Add not null constraints to provider_enrichment user fields

Context
CourseExporter in c# fell over on null user, make this impossible, move
failure to earlier.
Changes proposed in this pull request
Data in prod already manually cleaned, but need the cleanup code in case
new records appear in prod, and also for qa/staging that  haven't been
cleaned.
Guidance to review
:ship:
Checklist

[x] Make sure all information from the Trello card is in here
[ ] Attach to Trello card
[x] Rebased master
[x] Cleaned commit history
[x] Tested by running locally

 Add not null constraints to Provider Enrichment created and updated fields


add cli interface

see https://github.com/aybabtme/untilitworks

move to cmd package (see go-tools, etc)


Initial aspect ratio is being ignored

CameraAwesomeBuilder.custom(
  aspectRatio: CameraAspectRatios.ratio_16_9,
  previewFit: CameraPreviewFit.contain,
  saveConfig: SaveConfig.photo(pathBuilder: () => photoPath),
  builder: (CameraState state, _, __) {
    // Custom UI
  },
),

The preview image is shown as 16:9, but after taking an image, the size is 960x720 (in emulator), so even if preview was 16:9, the resulting image is 4:3.

This started happening after updating from ref 85ef2eeeed9a5846b0becdef76436911acea3c07 to ref b483fbc1d0bb476e3ec4826a9af7c994fd6ffe07 (also happens in 1.0.0+1)


last observation

it seems like there's no 'last observation', meaning there are equally many observations and actions.
but for a (s,a,s') like structure, there needs to be +1 state/observation, and generally, the last observation should be the state of the world AFTER an/the last action.

The store now holds one more observation that actions etc. fixing this issue.

after pulling the update, I still have the same problem.

is it related because I end the game with ESC when my demonstration is finished?

Yes that was exactly what happened and i fixed it now :)


vscode.DebugSession.customRequest modifies paths making them incorrect

Does this issue occur when all extensions are disabled?: No

VS Code Version: 1.81.1
OS Version: OSX 13.5.1 / Ubuntu Linux 22.04

Steps to Reproduce:

Create an extension
Launch from OSX remote ssh session with Ubuntu host
Invoke vscode.DebugSession.customRequest involving path, for example SetBreakpoint, from the extension
Observe that the paths there are broken, i.e. vscode-local: is prepended to each of them, and as a result, nothing works

Is it possible that you sent a URI instead of a string?
Please share some code to repro the issue, if this still happens

@roblourens It was pretty long time ago, so I don't have a repro :( I managed to do what I wanted somehow.


NumericField: Resolve nullable issue introduced by #4971

After fixing problems of decimal and longs, nullable's broke with "min" & "max"
For more information see discussion in PR comments #4973
Description
Resolve issues created with the fixes of #4971
How Has This Been Tested?
Unit tests have been added to cover the missing cases.
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[x] I've added relevant tests.

Hi @iXyles. Great work! Thank you for quick solution. I'd just propose simplifying both Change and ConstrainBoundaries methods like this:
private async Task Change(double factor = 1)
{
    try
    {
        var nextValue = GetNextValue(factor);
        if (typeof(T).IsValueType)
        {
            if (factor > 0 && _comparer.Compare(nextValue, Value) < 0)
                nextValue = Max;
            else if (factor < 0 && (_comparer.Compare(nextValue, Value) > 0 || nextValue is null))
                nextValue = Min;
        }

        await SetValueAsync(ConstrainBoundaries(nextValue).value);
        _elementReference.SetText(Text).AndForget();
    }
    catch (OverflowException)
    {
        // if next value overflows the primitive type, lets set it to Min or Max depending if factor is positive or negative
        await SetValueAsync(factor > 0 ? Max : Min, true);
    }
}

protected (T value, bool changed) ConstrainBoundaries(T value)
{
    if (value is null)
        return (default, false);

    // check if Max/Min has value, if not use MaxValue/MinValue for that data type
    if (typeof(T).IsValueType)
    {
        if (_comparer.Compare(value, Max) > 0)
            return (Max, true);
        if (_comparer.Compare(value, Min) < 0)
            return (Min, true);
    }

    return (value, false);
}

Hi again,
I was thinking of that too, but I only started of adding support to cover the failed case.
Adjustments according to your comment is now applied, also updated "null" set test cases. Instead of having separated tests it is now covering all the "value types" as nullable similar to the other tests we made to make sure all of them gets covered.

Hey @just-the-benno
I would not mind adding to the docs to show the changes we have done and demonstrate what is supported.
But I also think we should do this in a different PR, for the reason that we broke functionality with the last change in the dev branch. It would probably be better to make this adjustment and have a second PR for the doc changes.
So feel free to make an issue about it and ping me in it and I'll try to take a look at it through out the week :)

@henon This PR is ready for your review

Hi @iXyles, and thanks for putting even more effort into it. I've created the issue here #5087

Thank you very much

This one doesn't get a milestone as it is just a fix of a previous PR in the same milestone. The PRs marked with the milestone are used for the release change log. This one doesn't need to go into the change log.


[BUG] secondarySpawnMode IF_OBELISK does not function correctly.

Describe the bug
IF_OBELISK does not prevent selecting a secondary spawn point when your last respawn point is NOT an obelisk.
To Reproduce
Steps to reproduce the behavior:

Set secondarySpawnMode to IF_OBELISK
Set spawn a couple of times, prioritize something that is NOT an obelisk.
/kill. You will be able to select any secondary spawn point even if your last selected spawn point was NOT an obelisk.

Expected behavior
IF_OBELISK prevents selecting a secondary spawn point unless your last spawn point is an OBELISK
Notes
Did not test with worldSpawnMode. IF_CHARGED works properly, it's just IF_OBELISK that appears to be broken.
Versions

Respawn Obelisk Version: 2.5-c
Forge Version (if forge): Both NeoForge 47.1.106 and Forge 47.3.0
Architectury 9.2.14

Additional notes
There is an additional problem with the overall max respawn points, filing that as a separate issue.

Do you have the config option enabled that forces specific blocks to always be higher in priority than others?

No, these are the settings I'm using
"secondarySpawnPoints": {
        // Whether secondary spawn points should be enabled. Secondary respawn points can be used to have multiple respawn points, triggered at various times.
        "enableSecondarySpawnPoints": true,
        // Determines the overall maximum amount of secondary respawn points you can have. -1 is infinite.
        "overallMaxPoints": 2,
        /*
        Determines a per-block cap on the amount of respawn points you can have. -1 is infinite.
        Tags(which get treated as a single entry) are supported by beginning the entry with a #.
        Example: {"#minecraft:beds": 5, "respawnobelisks:respawn_obelisk": 5} // this would allow you to have 5 bed respawn points and 5 obelisk respawn points
        */
        "maxPointsPerBlock": {
            "#minecraft:beds": 1,
            "respawnobelisks:respawn_obelisk": 1
        },
        // Determines the maximum amount of secondary respawn points you can have at any block not specified in 'maxPointsPerBlock'. -1 is infinite.
        "defaultMaxPoints": 1,
        // Whether players can forcefully change the order of their secondary respawn points by shift right clicking a respawn point.
        "allowPriorityShifting": false,
        // Whether blocks should be given a specific order for respawning. This will not work well with 'allowPriorityShifting.'
        "enableBlockPriorities": false,
        /*
        Determines a per-block priority in which to order secondary respawn points. Default value is 0. Higher numbers have higher priority.
        Tags(which get treated as a single entry) are supported by beginning the entry with a #.
        */
        "blockPriorities": {},
        // Whether attempting to set your spawn point when you are unable to overrides an existing spawn point.
        "forceSpawnSetting": true,
        /*
        When players are allowed to choose to spawn at a secondary respawn point.
        NEVER: Players can never choose.
        ALWAYS: Players can always choose.
        IF_CHARGED: Players can only choose if their respawn point is an obelisk that has charge.
        UNLESS_CHARGED: Players can only choose if their respawn point is an obelisk that does not have charge.
        UNLESS_CHARGED_OBELISK: Players can only choose if their obelisk does not have charge, or if their respawn point isn't an obelisk.
        IF_OBELISK: Players can only choose if their respawn point is an obelisk.
        UNLESS_OBELISK: Players can only choose if their respawn point is not an obelisk.
        */
        "secondarySpawnMode": "IF_CHARGED",
        /*
        When players are allowed to choose to respawn at world spawn.
        NEVER: Players can never choose.
        ALWAYS: Players can always choose.
        IF_CHARGED: Players can only choose if their respawn point is an obelisk that has charge.
        UNLESS_CHARGED: Players can only choose if their respawn point is an obelisk that does not have charge.
        UNLESS_CHARGED_OBELISK: Players can only choose if their obelisk does not have charge, or if their respawn point isn't an obelisk.
        IF_OBELISK: Players can only choose if their respawn point is an obelisk.
        UNLESS_OBELISK: Players can only choose if their respawn point is not an obelisk.
        */
        "worldSpawnMode": "ALWAYS"
    },
    ```

Oh no it does get set up properly.
My guess is just that the cases for IF_OBELISK and UNLESS_OBELISK are missing entirely in SecondarySpawnPointConfig.java:
public boolean evaluate(SpawnPoint point, ServerPlayerEntity player) {
            return switch (this) {
                case IF_CHARGED -> point != null && player.getServer().getWorld(point.dimension()).getBlockEntity(point.pos()) instanceof RespawnObeliskBlockEntity robe && robe.getCharge(player)-robe.getCost(player) >= 0;
                case UNLESS_CHARGED_OBELISK -> point == null || !(player.getServer().getWorld(point.dimension()).getBlockEntity(point.pos()) instanceof RespawnObeliskBlockEntity robe) || robe.getCharge(player)-robe.getCost(player) < 0;
                case UNLESS_CHARGED -> point != null && player.getServer().getWorld(point.dimension()).getBlockEntity(point.pos()) instanceof RespawnObeliskBlockEntity robe && robe.getCharge(player)-robe.getCost(player) < 0;
                case NEVER -> false;
                default -> true;
            };
        }


Cannot promisify NeDB

I try to promisify() kinda popular in-memory database for JS - NeDB. I tried to follow instructions in wiki, but cannot get this done. I always get Cannot call method 'then' on undefined. Both browser & node.
I created plunk, any help would be appreciated.

I know it's an old and closed ticket but for me doing:
var DBStore = Promise.promisifyAll(require('nedb').prototype);
var db = new DBStore();

result in typeError "object is not a function";

Does anyone known if promisifyAll will also work with the cursors? i.e., find().exec().then() ??


-init_design_config puts the new design in the wrong place

Description
it should be in ./designs/
instead it gets made in ./openlane/
Proposal
No response

Also it doesn't make the src directory any more

@mattvenn
Have you used -add_to_designs switch?
# JSON Configuration File
./flow.tcl -design <design_name> -init_design_config -add_to_designs

# Tcl Configuration File
./flow.tcl -design <design_name> -init_design_config -add_to_designs -config_file config.tcl

https://openlane.readthedocs.io/en/latest/usage/designs.html#adding-your-designs

the behavior has been altered and the docs were updated.


Specifying secrets backend

I have created a new secret on vault called demo so all my secrets are stored there.
However, I do notice that vaultenv is using the path /v1/secret/demo/my/key/value to find my key values and not /v1/demo/my/key/value. Is there away to configure the backend?
$ vault write secret/production/third-party api-key=fecb0f6e97c5b37b3a814107682cf68416f072a8
              ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             backend          path            key                   value

Is it useful (or even possible) to use more than one backend at the same time? If not, I would take the backend from a command-line option or environment variable (possibly with a default value) rather than complicating the config file.

Is it useful (or even possible) to use more than one backend at the same time?

Yes and yes :)
I think Vault now uses new terminology, the page in the docs is called "Secret Engines". You can for example have a KV engine (previously called a generic backend), and a Database engine.
The first functions like encrypted key/value storage (like we have running in prod at Channable). The second engine has the same API, but generates credentials on the fly by connecting to Postgres/MySQL and running CREATE USER statements. There's another one for SSH.

@duijf Thank you for getting back to me on this "feature request" I do like the approach of defining the "Secret Engine" (or Backend) in the examples above. That would allow for both static and dynamic key values. At the moment with my own implementation I have dynamic key values for mySQL which query a database/ path on Vault stored to a JSON file then using jq I can isolate and populate the environment variables. Using your proposed method I would be able to define the path within the .secrets file. I like that idea.

That's something we'd like to support explicitly without users having to glue these things together
I'm currently implementing this. Will keep the config file roughly like I proposed but:

I'll change BACKEND to MOUNT, as that's the new terminology
I don't think I will enforce the newlines
I'll introduce VERSION 2 to get better compatibility guarantees in the future

Implementation note: since the parser is becoming more involved, I'll probably make use of some parser library. It's been a while since I played with parser combinators, so I'm going to have to see what's what.

👍

@duijf, I am using the latest ( v.0.7.1) version and tried using the MOUNT specify the secret backed, but noticed that the vault path is still prefixed by /v1/secret. Is the above feature request completed?
MOUNT demo/
staging/third-party#api-key
Thank you.

Hi @shrinidhi-atmakur! Thanks for your interest. As you can see from this ticket being open, we're not completely ready yet. I'm trying to get the PR https://github.com/channable/vaultenv/pull/47 in today or next Monday and will make a new vaultenv release once it has been merged :)

I've merged #47 and am making a new release.
Thanks for the patience everyone :)


fix: update amnt

@divy-work Thanks for the PR, but this doesn't quite fix the issue Tate brought up.


keepassxc: 2.2.4 -> 2.3.0

Motivation for this change
See the changelog.
Changes to options:

withKeePassBrowser: New in version 2.3.0 and replaces the functionality provided by the KeePassHTTP plugin. Users should install the KeePassXC-Browser extension. Defaults to true to remain consistent with the old default for withKeePassHTTP.

withKeePassHTTP: This feature is deprecated and disabled by default in the source repository. Default changed from true to false.

withKeePassNetworking: Controls all network access code within KeePassXC. Defaults to false to match the source repository.

withKeePassSSHAgent: Enables the SSH Agent plugin for use with [KeeAgent](https://lechnology.com/software

Add darwin to libargon2 platforms for MacOS support.

Things done

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

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

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

Thanks for this PR!
JFYI: I've had to manually specify keepassxc-proxy location in the settings to get KeePassXC-Browser detect the app. I'm really not sure, but it could be that something out there needs some manual tweaking to Nix/NixOS filesystem layout.

Let's address the browser location in a different pull request.

I you don't specify a path it defaults to keepassxc-proxy:
$ cat /home/joerg/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
{
    "allowed_extensions": [
<EMAIL_ADDRESS>    ],
    "description": "KeePassXC integration with native messaging support",
    "name": "org.keepassxc.keepassxc_browser",
    "path": "/nix/store/vrjh4h32mw8ffnjx5kgy6w3k08gwg1gr-keepassxc-2.3.0/bin/keepassxc-proxy",
    "type": "stdio"
}

However this path might be garbage collected eventually.
Therefore a patch to replace it by the out put of  which keepassxc-proxy might be sensible.

The string that needs to replaced here:
https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/HostInstaller.cpp#L178

Never mind my comment above - I was wrong, it also works without specifying the path. Not sure why KeePassXC sometimes does not get detected unless I open the settings dialog, but don't think it's a packaging issue.
BTW, that C++ code looks correct to me - it takes keepassxc's binary path (QFileInfo(QCoreApplication::applicationFilePath()).absolutePath()) and deduces keepass-proxy path from it assuming both are in the same directory. If "update manifest files" is enabled, package upgrades should work without issues.

I wonder why updating the manifest is not set by default.


Support pylama for python

pylama is a popular (>500 stars) plugin-based code audit tool for Python which includes plugins for several other popular tools.
The pylama ALE linter is based on existing python linters and attempts to adopt the same conventions and code as much as possible.
Thanks for considering,
Kevin

Just to clarify, a "Traceback" message is a possible flaw in the linter itself and not something like a syntax error?

Just to clarify, a "Traceback" message is a possible flaw in the linter itself and not something like a syntax error?

A traceback is printed whenever a linter plugin encounters an unhandled exception.  (See pylama/core.py:85-87)  The unhandled exception could be due to an unexpected internal error or a syntax error severe enough that the linter plugin can't analyze the file.
For example, the pydocstyle plugin throws ParseError when from __future__ import with_statement occurs after a non-__future__ import, which is what I used to generate the traceback test case.
Does that answer your question?

If this is a common case, I think there should be a better way to solve it than hide the message behind :ALEDetail, such as putting only the repr-like format of the error as the message, then mentioning :ALEDetail.

I updated the pull request with an additional commit that consolidates the traceback parsing between the Python linters and uses the exception line (with the type and message) as the ALE text.  Let me know what you think.

Cheers! :beers:

Thanks @w0rp!  :clinking_glasses:


翻译到这里停止，这种是什么错误, 怎么修复

Detect the use of a vulnerable kubectl instance: kubectl versions 1.12.9,
1.13.6, and 1.14.2 have a fix for this issue. The use of any versions earlier
than this will trigger the following rule:
检测使用易受攻击的kubectl实例：kubectl
1.12.9、1.13.6和1.14.2版本已修复此问题。使用早于此版本的任何版本将触发以下规则
：

macro: safe_kubectl_version

宏：safe_kubectl_version
closing tag '[/userAgent]' at position 24 doesn't match any open tag
you can resume it next time
17630it [8:25:35,  1.72s/it]
Process finished with exit code 0
---------------------------------------------测试书籍-----------------------
Learn Kubernetes Security
Copyright © 2020 Packt Publishing
第十三章 Chapter 13: Learning from Kubernetes CVEs
...
Detect the use of a vulnerable kubectl instance: kubectl versions 1.12.9, 1.13.6, and 1.14.2 have a fix for this issue. The use of any versions earlier than this will trigger the following rule:

macro: safe_kubectl_version
condition: (jevt.value[/userAgent] startswith "kubectl/v1.15" or
        jevt.value[/userAgent] startswith "kubectl/v1.14.3" or

        jevt.value[/userAgent

昨天做个翻译测试，今天马上被停止服务了.
-- | --

Hi there,After a thorough investigation, we have determined that you or a member of your organization are using the OpenAI API in ways that violate our policies.Due to this breach we are halting access to the API immediately for the organization Personal. Common reasons for breach include violations of our content policy, repeated attempts at disallowed use-cases, or accessing the API from an unsupported location. You may also wish to review our Terms of Use. If you believe this is in error and would like to appeal, please contact us through our help center. We will review appeals within one business day and will contact you if we reinstate access to the API.
Best
The OpenAI team

被停止服务是因为 proxy....