🐛 Fix import of get_terminal_size for click 8.1.0 support and upgrade Black for CI

🐛 Fix import of get_terminal_size for click 8.1.0 support and upgrade Black for CI
Continuation of https://github.com/tiangolo/typer/pull/375 handling CI.

Black is affected by a different removal from click 8.1 (one that started with an underscore!), but similar.

Thanks for the initial work/PR @madkinsz! And thanks for the feedback @henryiii!
This will be available in Typer 0.4.1, released in the next hour. :rocket: :tada:


MariaDB "RETURNING" clause  used with  query_as returns MySqlRow instead of struct

Bug Description
MariaDB "RETURNING" with query_as return MySqlRow instead of struct. The same code works perfectly in sqlite and postgres.
Minimal Reproduction
    let maison = sqlx::query_as!(Maison, r#"INSERT INTO maison (id
        ,adresse
        ,taille
        ,piscine) VALUES (?, ?, ?, ?) RETURNING id as "id!:_",adresse as "adresse!:_",taille as "taille!:_",piscine"#, 5, "lieu5",23, true)
        .fetch_one(&p.pool).await.unwrap();
    assert_eq!(maison, Maison{id:5, adresse:"lieu5".to_string(), taille: 23, piscine:Some(true)});

error:
error[E0369]: binary operation `==` cannot be applied to type `sqlx::mysql::MySqlRow`
  --> tests/commons/tests/insert.rs:41:5
   |
41 |     assert_eq!(maison, Maison{id:5, adresse:"lieu5".to_string(), taille: 23, piscine:Some(true)});
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     sqlx::mysql::MySqlRow
   |     commons::entities::my::Maison
   |
   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

Info

SQLx version: 0.6.3
SQLx features enabled:   "runtime-async-std-native-tls",  "uuid",   "chrono",   "bigdecimal",
Database server and version: MariaDB 10..1
Operating system:  arch linux (garuda)
rustc --version:  1.68.2

The macro query! also don't understand the RETURNING clause, showing nothing on the record even when fetch_one is used
I'm using the same version and DB

I think this is related to https://github.com/launchbadge/sqlx/issues/1530, which has an upstream issue open

Closing as duplicate


resolve refs in oneOf

Adds support for the $ref keyword in oneOf lists. According to e.g. http://json-schema.org/example2.html this is allowed.

Yes, I think that's actually an important use case for $ref. Thanks for the fix!


Remove 'Persona' reference from the login page.

Coverage remained the same at 85.698% when pulling 36f2a864dd800eb4ccd642226b1216b9e3ba760c on akatsoulas:persona-reference into 0c6337a44c5a2842c4cbd7a8000c08a5c6be5a0f on mozilla:master.

@peterbe pr updated.

Coverage remained the same at 85.698% when pulling 89ee9207745965f7bac83a52def46dba4efd0374 on akatsoulas:persona-reference into 0c6337a44c5a2842c4cbd7a8000c08a5c6be5a0f on mozilla:master.


Add More Options For pngquant

I did some trial and error on using pngquant through this Ruby gem (image_optim) and through command line and how its results compare to TinyPNG/Kraken/ImageAlpha+ImageOptim.
It seems to me that these tools use a custom value on the --floyd option of pngquant. The manual page says about --floyd: Set dithering level using fractional number between 0 (none) and 1 (full, the default).
So through this Pull Request I add the possibility to define a custom value for the --floyd option.
I also added the possibility to use --nofs and --strip options.

Thank you for contribution!
Just started checking and pngquant --help says nothing about --floyd switch 🤷 I need to check how this affects losslessness of optimisation, as maybe it is better to mark pngquant as lossy by default.
Please don't change version in gemspec, this always goes as a separate commit.

Check man pngquant


Allow migrations to log raw SQL if required

A small change but access to the raw SQL can be quite useful.

No worries, will get around to these fixes in the next day or so.

Back to you @michalmuskala

Any further thoughts on this PR?

I have added some comments, sorry for the delay and thank you!

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:


introduce R.Set

The view I'm about to express will come as no surprise to those familiar with a certain other open-source project to which I contribute. We are doing our users a disservice by restricting ourselves to JavaScript's built-in data types.
I believe it's a mistake for Ramda to be divided into two libraries: ramda and ramda-fantasy. Ramda cannot define—or cannot "correctly" define—certain functions because it doesn't have access to the appropriate data type. The type of R.head, for example, is [a] -> a rather than [a] -> Maybe a, making it unsafe (since R.head([]) evaluates to undefined). Even if one depends on both ramda and ramda-fantasy one must still define one's own head function if type safety is a concern. This has been discussed elsewhere, but it's worth mentioning.
Another group of functions is negatively impacted by our reliance on built-in data types: set functions. There are two problems with using arrays to represent sets:

Ordering. Sets are unordered, but using an array forces us to consider ordering. How should R.intersection([1, 2, 3], [3, 2, 1]) evaluate, for example? Should we preserve the order of the first argument? If so, we break commutativity. Should we randomize the order (as Go does when enumerating unordered collections)? This would break referential transparency. The only reasonable option is to return a sorted array. We must then decide on a sort function. Incidental complexity results from the use of an unsuitable data type.

Duplicates. If we use arrays to represent sets, what does [1, 2, 2, 3] represent? {1, 2, 3}, presumably. It's not clear to me whether R.intersection([1, 2, 2, 3], [2, 2, 2]) should evaluate to [2] or [2, 2]. On the face of it, [2, 2] is the correct answer. Only by reading the documentation would one learn to see the expression through a lens, giving R.intersection({1, 2, 3}, {2}) which is of course {2} (or [2] once transformed by the lens). We're forced to communicate out of band because we can't encode the uniqueness constraint in the data type.

If I've made a compelling case against the use of array as sets, the next thing to consider is whether JavaScript's Set is appropriate. Unfortunately, the answer is no. Ramda and Set disagree on what it means for two values to be equal. Ramda considers {x: 1, y: 1} and {x: 1, y: 1} equal; Set does not (unless identical). Set considers 0 and -0 equal; Ramda does not.
We should define our own Set type. Several existing functions could be updated to take and/or return values of this type, and we'd provide functions for converting Array values to Set values and vice versa.
Set          :: [Any] -> Set Any
fromSet      :: Set Any -> [Any]

intersection :: Set Any -> Set Any -> Set Any
union        :: Set Any -> Set Any -> Set Any

keys         :: Object -> Set String
toPairs      :: Object -> Set (Pair String Any)

I imagine this will be controversial. I look forward to the discussion. :)

using an array forces us to consider ordering.

On the contrary; since this is a "set" operation, order is immaterial. I grant you that we can then pass that Set as a List to some other function where iteration order matters (e.g. reduce). That does seem problematic.
Your intersection example is interesting. Under this proposal would you not also need a Bag or Multiset type to support your example? A set {2, 2, 2} is impossible. Then you would have to have functions Set -> Set -> Set, Bag -> Bag -> Bag, and maybe Set -> Bag -> Bag, Bag -> Bag -> Set, etc.
This would also necessitate helpers for Set -> List anyways, since that is likely to be a very common use case. If that is so, then we need to decide upon an iteration order anyways and all we've done is add a layer of complexity, but for what?
I'm not certain where I stand on this proposal. I need more time to dwell on it, and see how others respond.

I imagine this will be controversial. I look forward to the discussion. :)

Perhaps it's not as controversial as you expect.
I'm not sure that we would remove the implementation for lists, as, whether or not union and difference make a great deal of sense, something like without / difference is useful.
But the points @buzzdecafe makes are important.  I have an incomplete PR laying around I really need to get back to for this, though.  If we add a library-wide consistency about iteration order, then this would just fall out.
However, about this:

I believe it's a mistake for Ramda to be divided into two libraries: ramda and ramda-fantasy.

I'm afraid I still don't agree.  I understand entirely that unsafe operations can be a problem.  But forcing users to map/chain over the result of every call just to avoid any unsafe operation is pushing too many people too far.  I feel that Ramda should be offering tools.  It should be opinionated, but it should not be opinionated to the point that it's unusable for people not accustomed to FP.  In other words, it should offer a gradual path in.  The first hit's free, kid.

Under this proposal would you not also need a Bag or Multiset type to support your example? A set {2, 2, 2} is impossible.

I assume you're referring to R.intersection([1, 2, 2, 3], [2, 2, 2]). This would become R.intersection(R.Set([1, 2, 2, 3]), R.Set([2, 2, 2])) which gives {2}. I'm not suggesting we provide a function for determining the intersection of two multisets. An existing function that would benefit from a Multiset type, though, is R.values.

This would also necessitate helpers for Set -> List anyways, since that is likely to be a very common use case. If that is so, then we need to decide upon an iteration order anyways and all we've done is add a layer of complexity, but for what?

There are several gains:

More descriptive type signatures.

Ordering would not be erroneously encoded in values such as those returned by R.keys.

The uniqueness constraint would be encoded in the arguments to R.intersection (for example). This function needn't rely on out of band communication (i.e. documentation) to convey the fact that duplicates in the "sets" are ignored: there could be no duplicates.

We would centralize the code (and documentation) for getting from Set Any to [Any]. We'd still need to decide how this function should behave, but we'd only need to document this behaviour in one place. This would simplify the descriptions of several functions as we'd no longer need to include notes about ordering and uniqueness.

I believe it's a mistake for Ramda to be divided into two libraries: ramda and ramda-fantasy.

I'm afraid I still don't agree. I understand entirely that unsafe operations can be a problem. But forcing users to map/chain over the result of every call just to avoid any unsafe operation is pushing too many people too far.

We could provide, as PureScript does, unsafeHead :: [a] -> a in addition to head :: Maybe a.

We could provide, as PureScript does, unsafeHead :: [a] -> a in addition to head :: Maybe a.

should we go down this road, it may make more sense for us to favor the unsafe js-style function as the default and add safeHead : [a] -> Maybe a instead of redefining head.

We could provide, as PureScript does, unsafeHead :: [a] -> a in addition to head :: Maybe a.

should we go down this road, it may make more sense for us to favor the unsafe js-style function as the default and add safeHead : [a] -> Maybe a instead of redefining head.

Agreed.  It's not that I object to including a Maybe.  It's that making it the default is moving to far from being "a library for Javascript developers".

since R.head([]) evaluates to undefined

Vaguely remember conversations here a while ago, but can anyone offer why this wasn't implemented to return error condition when accessing an empty collection?

I believe it's a mistake for Ramda to be divided into two libraries: ramda and ramda-fantasy.

Not in a position to make a recommendation here, that is definitely one for the core-team, but I would like to offer some thoughts as an avid long-time user of ramda and family of projects.
From what I understand ramda was borne out of eweda where:

Our basic data structures will be normal Javascript objects, and our usual collections will be Javascript arrays.

ramda was conceived as a practical (re-)implementation which initially at least, wished to retain a simple API (basic data structures being one).  Please correct me if this is incorrect. To that end, ramda has been a phenomenal success imho.  And bear in mind this all started at least a couple of years ago now (a long time in FP adoption around the world). We have seen some relatively fast-followers to Ramda as it was originally intended, such as lodash/fp.
In the meantime, the rest of the JS developer world has matured with regards to FP concepts - would argue most JS developers today (perhaps other than out and out newbies) actively use one of underscore, lodash, es5 / es6 array functions such as map, reduce, filter, or their favourite fp library such as ramda.  In fact, I recently did a pull request to this project: you might not need underscore and agree with where it is going too - the core language is gradually pushing out the need for many of the original toolbelt FP functions supplied by third party libs - albeit not in a point-free / curried way.
In fact, it is fair to say that FP is pervading most modern languages whether people like it or not. Take a look at even... Java 8 - exotic concepts like reactive functional programming, streams etc are now everyday constructs or else regularly included as third party libs. It is only a question of time imho, before more constructs such as maybe, either et al also become mainstream, perhaps supported as core language syntax.

It's not that I object to including a Maybe. It's that making it the default is moving to far from being "a library for Javascript developers".

Today, I would agree with this. The problem with Maybe is that you really have to opt in all the way to use it, and so do all the functions in which it is composed.
Perhaps misguided in asking this but.. - is it that what is really needed is either a new version of ramda with breaking changes, and baseline off what has been written to date as the original v1.
Or else, consider a fork of ramda as a separate project. In the same way that ramda was created as a reboot of eweda, perhaps now is the time to consider the future with a project reboot rather than a refactoring of what we know as ramda as it stands today?  Please understand I am not suggesting that ramda has any shortcomings, just that in order to push the envelope with more FP constructs that are still not mainstream today, it might be best to fork and have greater flexibility to make breaking changes.
My final observation would be this.  Please rename ramda-fantasy to something else? The name itself, regardless of whether it is an implementation of a fantasy-spec, is at odds with any developer that likes to be firmly grounded in the real world. Even ramda-next or ramda-fp (if that isn't an oxymoron of sorts) might work, and encourage adoption.
Certainly be very interested to hear your thoughts here.

@arcseldon your history is pretty much accurate. I don't have a problem with including a simple Maybe or Option type in the core lib. For now I think we should include both the low-level, unsafe functions as well.
I'd be loath to take it too far though. I'm afraid that once you start down the road of strong typing everything else gets pushed out. And I think supporting that would be a very difficult task in JS. I'd rather write in a language that would offer me some help, rather than relying on run-time checking.
As to the name of ramda-fantasy, this is the first complaint I've heard. But the audience is very small. I'm sorry to say that I find your alternative suggestions even worse, especially ramda/fp. To my mind, the acronym fp is so broad as to be almost meaningless. But perhaps something like ramda-types. Anyone for algebramda?

@buzzdecafe - thanks for reply.  Re. naming - I did take a quick look at Sheep breeds for inspiration but came up short :smile:   algebramda is an interesting suggestion - like that alot.
@davidchambers - you started this discussion, and know ramda as well as anyone - is your point of view here being as a consumer of ramda from a user perspective, or for better integration and extension with packages such as sanctuary?  Really like and appreciate what you and the team are doing to keep the momentum of innovation in this space perpetually moving forwards - towards both a safe & useful language (albeit JS) :smile:  Would like to play a (small) part in that too if possible.
The trouble I get with investing too much time in languages like haskell or purescript is that although these languages often form the source of inspiration for other languages to adopt what works for them, they are often not much use beyond petri dishes (as Simon Peyton Jones likes to put it). Sorry if I offend anyone here, perhaps I should point out this youtube clip - where most of the useful languages are those that are also unsafe. Of course, all this is sucking eggs, and we are all trying to move towards safe and useful right? ramda is definitely useful today, can it be made safe too, without losing some of that usefulness? If the answer is yes then my personal opinion is then go ahead and make the needed changes. But if it comes at the cost of being practical and relevant (useful) then it would be a mistake.

@arcseldon:

Perhaps misguided in asking this but.. - is it that what is really needed is either a new version of ramda with breaking changes [ ... ] Or else, consider a fork of ramda as a separate project.

I've thought a lot about both of these ideas.  I'm not quite ready for either of them, especially a new version before we've managed to reach 1.0!.  But I've been thinking pretty hard about what I would want in a library if I were starting from scratch and it was what eweda/ramda were at first, semi-private playgrounds for @buzzdecafe and me to work out our ideas.  For a new personal project, I would probably want a Maybe, for many of the cases that worry @davidchambers.  But I still would not want to go the route of strong-typing, for much the same reasons @buzzdecafe expressed.
As to the ramda-fantasy name, I have no strong feelings, although algebramda does have a very nice ring to it.  I did [express my concern][(co) about the name 'fantasy-land', but don't hold out much help for a change.

algebramda is great!

The discussion is starting to get very broad ...

Does a Set data type make sense for Ramda ?
Is Ramda in the business of providing data types at all or should this happen only in ramda-fantasy ?
Moving more towards FP can we omit the introduction of specific data types at all ?
Do we actually want to go into that direction ? Is Ramda slowly moving towards Ramda-Fantasy or not ?
Talking about Ramda-Fatansy is that actually a good name at all ?

I think a lot of it boils down to the question of what the user base should be. If Ramda is supposed to be a library that can be used by Javascript  developers without assuming existing knowledge of Functional Programming then certain things are hard to be had.
Some time ago @scott-christopher did great work on his profunctor based lens PR for ramda lens and on the one hand I really wish the PR had made it. On the other hand it seemed clear to me that this would not be something I could get my coworkers to get into. One or two days after the PR was closed a colleague at work asked me for help and I figured what he was asking for (without knowing it of course) were prisms. Sigh.
I think introducing data types to Ramda is a tough decision. I really wish Ramda could include Maybe and Either and adjust existing functions accordingly or provide safe variations where it makes sense. On the other hand there already are tickets such as #1578 and the inclusion of such data types would not improve the situation I am afraid.

@gilligan:

Is Ramda in the business of providing data types at all or should this happen only in ramda-fantasy ?

I think Ramda overall should not be in the business of providing types.  Ramda's functions should work with a great variety of types, though.
Nevertheless,

Does a Set data type make sense for Ramda ?

I think there's a good reason to consider this.  This might be an intermediate solution to some serious problems, less radical than what I started doing, then dropped (how did I forget that?) in #1463.  It would fit very nicely with the uniq work scott-christopher has done.  It essentially solves the problem that we occasionally run into of trying to illegitimately use a list as a set.
And of course because of the reference equality of built-in Sets, we'd have to roll our own.
I feel the same about Maybe, and possibly Either, but I would make these opt-in APIs rather than default ones.

i think i am warming up to this idea, subject to the following:

we should also provide well-defined functions for list intersection,list difference, etc.
we should determine what laws the Set type should satisfy. Clearly it's a functor; but what else makes sense to support?

we should also provide well-defined functions for list intersection,list difference, etc.

Sure. Currently we're forced to decide whether [1, 2, 2, 3] represents [1, 2, 2, 3] or {1, 2, 3}. If we chose the former we can't provide set intersection, set difference, etc. If we chose the latter we can't provide list intersection, list difference, etc. If we consider both sets of functions important, we need—unsurprisingly—two sets of functions. These could, of course, both rely on arrays, but having a Set type would make the set functions simpler.

Linking here to findings recorded in this issue

Please pardon my lack of understanding, but is this "Set" type different from the native JavaScript Set?

@HarryPehkonen: Please pardon my lack of understanding, but is this "Set" type different from the native JavaScript Set?

The main difference would be how membership is determined. The native Set effectively uses reference equality, while the Ramda instance would have to use the semantics of R.equals.

Let's play with this in Sanctuary first. If we're happy with the result we can reconsider this proposal.


remove useless code, the instanceof test always return true

remove useless code, the instanceof test will always return true

Codecov Report

Merging #10781 (97cdf90) into 3.1 (f37502c) will decrease coverage by 0.54%.
The diff coverage is 25.00%.

@@             Coverage Diff              @@
##                3.1   #10781      +/-   ##
============================================
- Coverage     65.13%   64.58%   -0.55%
+ Complexity      468      467       -1
============================================
  Files          1336     1336
  Lines         56963    56959       -4
  Branches       8425     8401      -24
============================================
- Hits          37100    36785     -315
- Misses        15882    16208     +326
+ Partials       3981     3966      -15

Impacted Files
Coverage Δ

...ubbo/config/deploy/DefaultApplicationDeployer.java
72.18% <0.00%> (-0.29%)
:arrow_down:

...center/initializer/ConfigZookeeperInitializer.java
0.00% <0.00%> (ø)

...java/org/apache/dubbo/rpc/support/MockInvoker.java
83.05% <50.00%> (-0.71%)
:arrow_down:

...luster/router/script/ScriptStateRouterFactory.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...zookeeper/curator/CuratorZookeeperTransporter.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...pc/cluster/router/file/FileStateRouterFactory.java
0.00% <0.00%> (-80.96%)
:arrow_down:

...o/rpc/cluster/router/script/ScriptStateRouter.java
0.00% <0.00%> (-67.31%)
:arrow_down:

...mmon/serialize/fastjson2/FastJson2ObjectInput.java
0.00% <0.00%> (-62.50%)
:arrow_down:

...ting/zookeeper/curator/CuratorZookeeperClient.java
14.10% <0.00%> (-56.42%)
:arrow_down:

...mon/serialize/fastjson2/FastJson2ObjectOutput.java
0.00% <0.00%> (-56.25%)
:arrow_down:

... and 52 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Translatable Model event

Hi,
I using astrotomic/laravel-translatable models.
When an event is triggered on the master model. It doesn't include translate model.
Therefore, when I create separate events for both models, they become independent of the relationship.
Page - Model
PageTranslation - Model
I've searched the documentation and think I should do it manually.
#5 @sebastiandedeyne
What do you think ?
Thanks.

Hey,
I maintain both packages. The main model save event is also fired if only translation has changed. But you can't access the translations for the changes in the activity log. So to log everything your translation model should also use the LogsActivity trait.
Do you have any further questions?

Hey,
I maintain both packages. The main model save event is also fired if only translation has changed. But you can't access the translations for the changes in the activity log. So to log everything your translation model should also use the LogsActivity trait.
Do you have any further questions?

All I want is to create a single log, but the system creates a log for the main model and each language.
the result has not changed again.
<?php

namespace App\Models\Page;

use Illuminate\Database\Eloquent\Model;
use Astrotomic\Translatable\Translatable;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\Traits\CausesActivity;
use Illuminate\Database\Eloquent\SoftDeletes;
use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;

class Page extends Model
{
    use LogsActivity,
        CausesActivity,
        SoftDeletes;

   protected $table = 'pages';
    protected $softDelete = true;

    public $translationModel = 'App\Models\Page\PageTranslations';
    public $translatedAttributes = ['name', 'excerpt', 'content', 'slug', 'canonical_link', 'meta_title', 'meta_description', 'meta_keywords'];

protected $fillable = [
        'sort', 'status'
    ];

protected static $logFillable = true;
    protected static $logOnlyDirty = true;
    protected static $logName = "page";
    public function getDescriptionForEvent(string $eventName): string
    {
        return 'page.' . $eventName;
    }

}

<?php

namespace App\Models\Page;

use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;

class PageTranslations extends Model
{
    use LogsActivity;

    protected $table = 'page_translations';

    protected $fillable = ['name', 'excerpt', 'content', 'slug', 'canonical_link', 'meta_title', 'meta_description', 'meta_keywords'];

    public $timestamps = false;

}

Okay, this is the general problem we have with many relationships. #560 could be kind of a solution. To have at least a batch identifier which connects all activitylog entries.
But this is primary based in the Laravel core which doesn't fire any events for many relationship changes. Which also based in it's nature that there are different ways to save them.
For this special combination there could be a way to override the translatable trait, put all translation changes into a temporary array and read from there during the after listener. We already do this for the updated event https://github.com/spatie/laravel-activitylog/blob/808a3e5c119d31d1115ff7831efa866aa3fe9692/src/Traits/DetectsChanges.php#L17-L24
A similar approach could be a solution. But it won't happen in one of the packages. But I would be happy to link a package that combines these packages if you want to do one?

Overall I understood the problem. Thank you.
But I didn't understand which two packages you were talking about combining?

The two you refer to 😉

spatie/laravel-activitylog
astrotomic/laravel-translatable

So you can create a new package which requires both packages, adds a trait which uses both package traits and overrides/adds needed logic. I you do just comment the resulted package/repo here and I will link it in at least the translatable docs.

How do we proceed?

I won't proceed in any of both packages because for activitylog it has to be a solution for all many relationships which we haven't found yet. And for translatable it's a coupling to another package which I won't add.
It could be that I create a package in future, if not already happened. But it's not on my current roadmap.
So you are free to fix it in your own app, create a package for it. If you have any questions, want a review or anything you can ask me. 😊

Thank you for your support @Gummibeer :)


[Question / Suggestion] Is AM software or hardware encoded?

I don't know whether AM is software or hardware encoded. If you can transmit AM decently, would it be possible to program a single side band mod?
Another question: would it be possible to program more modes? (i.e. SSB, digital)

AM is software decoded, the chip is FM-only;
there is no way to transmit AM;
consequently, until we figure out how they're doing AM demodulation, we can't do SSB demodulation.

As a help measure you can add cw wave from a signal generator,  from VNA for example to the receiving signal. Tested.


Change progress fg & bg colors to provide better contrast

PR Summary
This improves the fg/bg contrast of the progress colors which improves readability in various color schemes.  The current colors are particularly poor in the One Half Dark color scheme.  The screenshots below show the before (left) and after (right) for both the Campbell (default) color scheme on top and the One Half Dark color scheme on the bottom:

PR Context
This addresses a comment I made on issue #10780, that the progress fg/bg contrast is not great particularly for the One Half Dark color scheme.  FWIW I'm not set on these particular colors. It's just that black on yellow provides good contrast in "most" color schemes whereas yellow on dark cyan does not.
We could consider using RGB colors to "fix" the fg/bg progress colors on hosts that SupportsVirtualTerminal.  Using ConsoleColor indices is somewhat problematic as you can see above.  That would mean the progress colors might not "fit" the current color scheme but OTOH the progress text would have good contrast for better readability. Also, this represents more code change since the current host colors take only ConsoleColors.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[x] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[x] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[x] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include:

Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode (which runs in a different PS Host).
Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).
Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

I believe it is a task exclusively for MSFT usability engineers.

This is a UX change. Better let's the committee weigh in.

@PowerShell/powershell-committee reviewed this, ideally the colors should be configurable, but we would not block this PR to make that happen as that is a bigger work item.  We'll follow up with the Accessibility experts to confirm the colors meet requirements but we are open to a change

This made changed to ConsoleHost. Why was the first box checked on affecting tooling?

Why was the first box checked on affecting tooling?

After these check boxed was added in PR template I ask how we will do the checks and answer was - manually by owners. So I never set the check boxes.
Make sense to add you to ConsoleHost file owners? Github will automatically add you in reviewer list.

Make sense to add you to ConsoleHost file owners? Github will automatically add you in reviewer list.

I'm fine with this... but I'll let the maintainers decide.

@SteveL-MSFT @TravisEz13 Can we add @TylerLeonhardt to the file owner list?


Traefik

Hey, I currently struggling setting the forwarded http connection behind traefik to provide https. Any ideas / recommendations ?

This should work with a reverse proxy in front of it. In fact, that's been my exact use case also (though I'm not using Traefik).
I'd check:

that Traefik uses port 80 to talk to holepunch-server.
try checking if you can curl https://holepunch-server-hostname/_ssh , you should get some error relating to your request not asking for websocket
then repeat that same for directly talking to holepunch-server (without reverse proxy in front of it)
if that does not work, try checking for Traefik logs

Which Proxy do you use? can you provide me your docker-compose as an example?

I'm using Edgerouter which is a loadbalancer I built myself (yes, I know how crazy it sounds). Edgerouter is probably not usable for anyone else than me right now, but it started with Traefik-compatible annotations. I'm confident holepunch-server works with Traefik, because that's what I used with holepunch-server before building Edgerouter. Basically my loadbalancer layer is using traefik.frontend.rule with value of HostRegexp:{[^.]+}.punch.example.com
Then if you have an SSH client (OpenSSH or holepunch-client) providing reverse tunnel in the container port 8080, then https://8080.punch.example.com/ should be accessible from internet, provided that your loadbalancer is redirecting *.punch.example.com traffic to right container IP's port 80. The holepunch-server container itself reverse proxies TCP traffic (on top of WebSocket) from HTTP 80 to the port 8080 based on the subdomain match.
Have you assigned wildcard certificate to *.holepunch.something.com?
Make sure your loadbalancer is not stripping away the Host:  header. Traefik seems to do the right thing by default.
Did all the checks pass that I asked about? What exactly are you trying to do? Specifically, you haven't mentioned any error messages or troubleshooting steps that have failed? Is plain HTTP working but HTTPS not? Does it work without loadbalancer, or is the trouble present only when behind a loadbalancer?

seems like I had some issues with docker on armv7.
finally i solved it by: (running traefik in another docker-compose instance)
version: "3.5"

services:
  holepunch:
    image: holepunch-server:latest
    environment:
      SSH_HOSTKEY: "somthing"
      CLIENT_PUBKEY: "something else"
    restart: always
    ports:
      - "5050:5050"
      - "2222:2222"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.hp.rule=Host(`home.host.com`)"
      - "traefik.http.routers.hp.entrypoints=http"
      - "traefik.http.routers.hp.tls.certResolver=le"

      - "traefik.http.routers.api.rule=Host(`api.home.host.com`)"
      - "traefik.http.routers.api.service=api"
      - "traefik.http.routers.api.entrypoints=https"
      - "traefik.http.routers.api.tls.certResolver=le"
      - "traefik.http.services.api.loadbalancer.server.port=5050"
      - "traefik.http.routers.api.tls=true"
    networks:
      - backend
      - frontend

networks:
  frontend:
    name: frontend
    external: true
  backend:
    name: backend
    driver: bridge

Somehow i could not use your docker image on dockerhub as the binary is missing. I just did some workaround by
(latest alpine got some issues with armv7....)
FROM alpine:3.12

RUN apk update
RUN apk add openssh wget

RUN wget https://github.com/function61/holepunch-server/releases/download/20210312_0738_8f5e8775/holepunch-server_linux-arm
RUN mv holepunch-server_linux-arm holepunch-server
RUN chmod +x holepunch-server
ENTRYPOINT ["./holepunch-server", "server", "--http-reverse-proxy", "--sshd-websocket","--sshd-tcp","<IP_ADDRESS>:2222"]


chore(generator): IWorker

Closes #1252

We can't merge this, unless https://github.com/microsoft/playwright/pull/5730 merges, because we're expecting the method to become async.


Add Dockerfile to run h2spec.

Motivation:
When we get around to it we should aim for our example server to pass
h2spec with flying colours. We aren't there yet, but it's helpful to
be able to run h2spec easily.
Modifications:
Add a docker-compose recipe for running h2spec.
Result:
It'll be easier to run h2spec.

Awesome idea, having a passing h2spec should instill even more confidence in the quality of the implementation 👍

+1... We do the same in netty and it really helped us to find problems and fix these :)

The long term plan will be to have this be in CI, to avoid regressing in the future. Not there yet, sadly. One step at a time!


workbench: Adds 'Show Code Version' Action

Fixes: #40574

@joaomoreno Please review this.

@shobhitchittora can I ask, why not simply show the about dialog that includes the version?

This is as per suggestion from @joaomoreno in the issue thread. Also I think here the intent is just show version number and not any additional info, thus adding as a Command.

@shobhitchittora @joaomoreno I would prefer a command that simply shows the about dialog

@bpasero I found the below function which open the About dialog from menu bar items.
https://github.com/Microsoft/vscode/blob/master/src/vs/code/electron-main/menus.ts#L1201
Is it possible to invoke this by registering a new Action in the registry?

@shobhitchittora Thanks for the contribution! 🍻
Sorry for not getting back earlier. I've renamed the command to Help: About. I've moved it to another contribution file. I've also changed the implementation to what @bpasero suggested.

Awesome ✌


DateTime deserialization issue

Hi @volkanceylan
I am hoping you might be able to assist in solving this problem:
Situation:  (Time zone:  CDT -05:00)
xyz.row.cs:
[DateTimeKind(DateTimeKind.Utc)]
public DateTime? DateTime { get { return Fields.DateTime[this]; } set { Fields.DateTime[this] = value; } }
public partial class RowFields { public DateTimeField DateTime; }
Note:  xyzRow is the Detail in the given MasterDetailRelation scenario .  Hence this property is rendered in a row on a editor grid and the rows in that editor grid are not editable (none of the columns are marked with the edit link).
#1
Before save in xyzDialog.ts, i see the following value in the UI:
Tues 10/17/2017 12:07:50 PM (localized time)
#2
After hitting save, i see the following value for the DateTime property on the wire, using chrome:
2017-10-17T17:07:50.274Z  (correctly converted to UTC and i see the 'Z' at the end indication UTC)
#3
The debug break point in the XYZendpoint.cs
public SaveResponse Update(IUnitOfWork uow, SaveRequest request)
{
return new MyRepository().Update(uow, request);
}
In there i see the following value for the DateTime property:
10/17/2017 10:07:50 PM (DateTime.kind=UTC)
Problem:  It seems that a conversion occurred between #2 and #3.  There shouldn't have been.  The time on the wire was in UTC.  upon deserialization it seems to have treated the time on the wire as local and converted it to utc (added 5 hours).   The is a problem because the time keeps changing even when the user hasn't made a change.
Thanks in advance.

Sorry, tried but can't reproduce this:

I'm UTC+3 so this works as expected, not sure what's wrong in your case

Thanks Volkan for looking into this.  I will try to put together a sample for you to test.

Hi @volkanceylan
i was able to reproduce it easily.  please see the attached project.  Simply navigate to default -> Master Record navigation menu.  Click the 'new Master Record' button.  in the MasterRecordDialog in afterLoadEntity i simply call the service to manually Create an entity to demonstrate the problem.
see the screen capture below

The sample project can be downloaded from here (it gets automatically deleted after 48 hours, i can upload again if that happens):
https://expirebox.com/download/4d7c76edf47bc00627bac723d4a64205.html
this zip only contains the files that were changed.
MasterRecordChangedFiles.zip

eda387453a3d2ad262a30fe7fd17ba867ec2bc0f should probably resolve this

Thanks Volkan! :)


Olfactometer

new device:

[ ] 5 channels: carrier channel + 4 odor channels
[ ] channel type (odor/carrier)
[ ] each channel has a flow_range (unit = mL/min)
[ ] odor vial volume and odorant volume

add as a stimulus device in rig
In session:

[ ] per channel: odor identity. dilution (what are units?). (flow rate is stimulus data, not metadta)

@bruno-f-cruz am I missing something here?

Olfactometer should inherit from Harp Device. Otherwise looks fine.
Per session, I completely agree that flow rate is data (we are already saving it).
Odor Identity should be a string
Odor dilution. I am not sure about this, there are probably several ways to express an odor dilution, not sure if we should accept them all or converge on a single one.
Here's an example:
Cindy suggests using %(V/V) (i.e. ml_odor / 100ml of solvent). However this creates a situation where the experimenter also needs to express the absolute concentration of the stock solution used for the dilution (probably in molar concentration). The solvent solution should also be represented somehow. The alternative could be to express it in %(W/V) (mg of solute per ml of solvent), but once again you need to keep track of the solvent identity. So my question is: How much information do you expect to be able to recover from the metadata field? If it is just a qualitative metric, then leaving it at a float is probably sufficient, and then people will need to document what that number means down the road, if it you want have something that can fully express a dilution, you might want to go ahead and implement a dilution class that is able to express such dilution.


chore(release): v1.1.0

Description:
Updates CHANGELOG for v1.1.0 release.
Related Issues:
N/A
Checklist:

[x] Review the CONTRIBUTING.md documentation.
[x] Add a reference to a related issue in the repository.
[x] Add a description of the changes proposed in the pull request.
[x] Add unit tests if applicable.
[x] Update documentation if applicable.
[x] Add a note in the CHANGELOG.md if applicable.
[x] Sign the Google CLA.

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

Comparison is base (856f045) 98.32% compared to head (28cc900) 98.32%.

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #516   +/-   ##
=======================================
  Coverage   98.32%   98.32%
=======================================
  Files           4        4
  Lines         179      179
  Branches       19       19
=======================================
  Hits          176      176
  Partials        3        3


sxv RegEx blocks shows from Hulu

The ^ad([sxv]?[0-9]|system)_.-{1,}|[_.-]ad([sxv]?[0-9]|system)[_.-] regex blocks (for me it was a handful episodes of Lost, not all of them) shows on Hulu. Not sure why Lost, the Finals worked fine, not 100% sure how to fully DEBUG, but I was able to get Lost working again by disabling the above regex after some googling.
I did try playing around with the regex to filter out Hulu requests, but ended up just disabling it.

To fix Hulu I added to my allow list two entries:
(.|^)hulustream.com$
and
(.|^)conviva.com$


[BUG] Sending form with javascript disabled not working

Are you using the latest version of this library?

[X] I verified that the issue exists in the latest next-safe-action release

Is there an existing issue for this?

[X] I have searched the existing issues and found nothing that matches

Describe the bug
Sending form with js disabled does not work when using useAction hook.
Reproduction steps

Go to playground https://next-safe-action-playground.vercel.app/stateless-form
Disable javascript in devtools
Try sending the form

See attached screenshot of the form element

Expected behavior
Form should be sent with javascript disabled, at least that's what I understand from looking at the example in the docs https://next-safe-action.dev/docs/recipes/form-actions
Minimal reproduction example
https://next-safe-action-playground.vercel.app/stateless-form
Operating System
macOS
Library version
7.1.3
Next.js version
15.0.0-rc.0
Additional context
No response

Not sure if I'm missing something, but how can it work with JS disabled if you're using the action via a hook, which is a JavaScript function by definition? Don't think this is related to next-safe-action. I guess progressive enhancement is only available if you're passing the Server Action directly to the form action.

You may want to take a look on Jack's Harrington example repo and its corresponding yt video
I also checked ZSA and its executeFormAction method from useServerAction hook and it works as expected with js disabled. See the example

First, I tested the executeFormAction exported by zsa's useServerAction, which also does not support progressive enhancement. If I write it like this, I will still get an unsupported error prompt, just like this:
export function UseZsaStateExaple() {
  const { isPending, executeFormAction, data, error } =
    useServerAction(produceNewMessage);

  return (

      <form action={executeFormAction}>
        <input name="name" placeholder="Enter your name..." />
        <button type="submit" disabled={isPending}>
          submit me
        </button>
      </form>
      {isPending &&
Loading...
}
      {data &&
Message: {data}
}
      {error &&
Error: {JSON.stringify(error)}
}

  );
}

In addition, if you want to support progressive enhancement, you need to use the official useActionState of React, and the example of zsa is the same
"use client";

import { useActionState } from "react";
import { produceNewMessage } from "./actions";

export default function UseActionStateExample() {
  let [[data, err], submitAction, isPending] = useActionState(
    produceNewMessage,
    [null, null] // or [initialData, null]
  );

  return (

      <form action={submitAction}>
        <input name="name" placeholder="Enter your name..." />
        <button type="submit" disabled={isPending}>
          submit me
        </button>
      </form>
      {isPending &&
Loading...
}
      {data &&
Message: {data}
}
      {error &&
Error: {JSON.stringify(error)}
}

  );
}

Here is an example of using useActionState to support progressive enhancement in next-safe-action
// actions.ts
'use server'

import { createSafeActionClient } from "next-safe-action"
import { zfd } from "zod-form-data";

export const produceNewMessageAction = createSafeActionClient()
  .schema(
    zfd.formData({
      name: zfd.text(),
    })
  )
  .stateAction(async ({ parsedInput }) => {
    await new Promise((resolve) => { setTimeout(resolve, 500) })
    return "Hello, " + parsedInput.name
  })

"use client"

import { useActionState } from "react";
import { produceNewMessageAction } from "./actions";

export function UseActionStateExample() {
  const [state, submitAction, isPending] = useActionState(
    produceNewMessageAction,
    {}
  );

  return (

      <form action={submitAction}>
        <input name="name" placeholder="Enter your name..." />
        <button type="submit" disabled={isPending}>submit me</button>
      </form>
      {isPending &&
Loading...
}
      {state.data &&
Message: {state.data}
}
      {state.validationErrors &&
Error: {JSON.stringify(state.validationErrors)}
}

  );
}

Thanks for making it clear. I think it could be a good idea to clearly state it in the docs that if you want progressive enhancement you need to use react native hook.

As @tenghuan123 said, progressive enhancement is available via useActionState hook from React.
next-safe-action exports a hook called useStateAction from /stateful-hooks path, but I've just tested it and it doesn't work with JavaScript disabled. The execute function returned from that hook is a wrapper of the dispatcher from React's useActionState hook. This is because otherwise useful props (such as status and client input) couldn't be returned from the hook  — see the image below. *
Now I'm actually thinking of changing the useStateAction API to just return the [state, action, isPending] original array or remove the stateful hook entirely from the library and tell users to use the React one.
If this will be the case, the useStateAction hook will be marked as deprecated for a number of minor versions and then removed.
What do you think?
* useStateAction return object:

Hey, BTW, do you guys can use the bindArgsSchemas ? I'm new on this so that's the reason I didn't open a new issue, and it could be an error on my side. This is the error that I get
The 'this' context of type 'SafeActionFn<string, ZodObject<{ username: ZodString; }, "strip", ZodTypeAny, { username: string; }, { username: string; }>, [userId: ZodString, age: ZodNumber], any, any, { ...; }>' is not assignable to method's 'this' of type '(this: null, args_0: string, args_1: number, ...args_2: any[]) => Promise<SafeActionResult<string, ZodObject<{ username: ZodString; }, "strip", ZodTypeAny, { username: string; }, { username: string; }>, ... 4 more ..., unknown> | undefined>'.
  Types of parameters 'bindArgsInputs' and 'args_0' are incompatible.
    Type '[string, number, ...any[]]' is not assignable to type '[...bindArgsInputs: any[], input: any]'.
      Source provides no match for required element at position 1 in target.ts(2684)
(alias) const onboardUser: SafeActionFn<string, z.ZodObject<{
    username: z.ZodString;
}, "strip", z.ZodTypeAny, {
    username: string;
}, {
    username: string;
}>, [userId: z.ZodString, age: z.ZodNumber], any, any, {
    ...;
}>
import onboardUser

@redBaron23 are you using TS 5.5?

As @tenghuan123 said, progressive enhancement is available via useActionState hook from React.
next-safe-action exports a hook called useStateAction from /stateful-hooks path, but I've just tested it and it doesn't work with JavaScript disabled. The execute function returned from that hook is a wrapper of the dispatcher from React's useActionState hook. This is because otherwise useful props (such as status and client input) couldn't be returned from the hook — see the image below. *
Now I'm actually thinking of changing the useStateAction API to just return the [state, action, isPending] original array or remove the stateful hook entirely from the library and tell users to use the React one. If this will be the case, the useStateAction hook will be marked as deprecated for a number of minor versions and then removed.
What do you think?

useStateAction return object:

First of all, thank you for your outstanding work, next-safe-action is great.
Secondly, I think it is very difficult for a website to fully support progressive enhancement and have good UX, because it has nothing to do with the implementation of the code, but requires many compromises in product design.
Why is this being said? Following the previous example, the user did call the server action in a non-JS state and display the result, but it did not display the effect of isPending. The reason is that isPending is always a state and cannot update itself in non-JS. Therefore, progressive enhancement can only return values through different server actions to obtain successful and failed states, without intermediate transition states.
There is no intermediate state like isPending, which feels very bad for UX, because when the network situation is bad, users may not receive page feedback for a long time, and users may fall into self-doubt, whether it is a software bug or not submitted.
Therefore, I believe that if developers want more states to provide better UX and good DX, they need to use useStateAction provided by next-secure-action. If developers want to support progressive enhancement, they need to use useActionState. In short, useStateAction is an enhanced version of useActionState. Perhaps useStateAction should export the dispatch of useActionState used internally to the outside, because in this way useStateAction only extends the original functionality of useActionState without losing the ability to support progressive enhancement

@tenghuan123 thank you for your feedback. This issue has also been discussed here:

https://github.com/TheEdoRan/next-safe-action/discussions/190

It would be great to return the dispatcher from useActionState hook too, and it would also be really simple to implement. The problem, as explained in the discussion, is this:

Problem is that if users use dispatcher instead of execute, then input and status properties go out of sync [...] Returning dispatcher from useStateAction would allow writing buggy code, and I already can see the number of issues that would be opened if I implemented that.
So, not sure if there's a good solution. If you want progressive enhancement, it's probably best to use the useActionState hook from React.

Added a section about progressive enhancement on the website: https://next-safe-action.dev/docs/execution/hooks/usestateaction#progressive-enhancement

@redBaron23 are you using TS 5.5?

Yes 5.5.3

@redBaron23 check out

https://github.com/TheEdoRan/next-safe-action/issues/180#issuecomment-2201607407

@redBaron23 check out

https://github.com/TheEdoRan/next-safe-action/issues/180#issuecomment-2201607407

Thank you so much. Awesome lib BTW

https://github.com/TheEdoRan/next-safe-action/discussions/190#discussioncomment-10098371

Here is an example of using useActionState to support progressive enhancement in next-safe-action

do you have any typing errors with this approach?

**MrOxMasTer ** commented Jul 20, 2024 •
I understood the reason. In the 2nd argument of useActionState


User Warnings/Notifications

As a user, I can see, act upon, and dismiss notifications in the case that the application noticed something strange or unexpected in my activity.
Use case: Autograding is enabled, but the app cannot connect to Jenkins. How does the instructor know without digging into logs or hearing from students first?
Use case: During initial setup, the web-hooks are injected into the organization and it is possible for that to fail. We can notify the instructor to do it manually (or click a button that tries again).

Perhaps we can have a list of known issues (with error codes) that have corresponding recommended actions or notes. Then, we can attach an error to a user notification so they can see the message.


M2M feature parity: math functions

What type of PR is this?

What does this PR do / why is it needed ?

Which issue(s) this PR fixes:

Fixes #
Other notes for reviewers:
Does this PR introduce a user-facing change?

Both mod and sqrt functions are already implemented (though were added recently to master branch). Also there is no need to add entries for a simple functions like these to Library.java (you can compare with how it's done on master branch).

No tests were added for stdDev

No tests were added for stdDev

javaGenerationTest has sufficient test cases for stdDev.


The implementation of CustomRun is not aligned with what we documented.

Expected Behavior
We documented that timeout in CustomRun is for constrainting the running time of all retry attempts, see TEP-069 and docs/runs.md. If we implement a CustomRun controller as the documentation guided, and use it in a Pipeline:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: custom-task-pipeline
spec:
  tasks:
  - name: wait
    timeout: "1s"
    retries: 2
    taskRef:
      apiVersion: wait.testing.tekton.dev/v1alpha1
      kind: Wait
    params:
    - name: duration
      value: "2s"

---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  generateName: pr-custom-task-
spec:
  pipelineRef:
    apiVersion: tekton.dev/v1beta1
    name: custom-task-pipeline

In Custom Controller, it detects that the run has timedout, so marked it as timedout, won't update retriesStatus.
And we expect the PipelineRun failed right after the CustomRun been marked as failed on timedout.
Actual Behavior
The PipelineRun never treats the CustomRun as timedout, instead, it treat the CustomRun as Running forever until PipelineRun iteself hits its Timeout limit (default.DefaultTimeoutMinutes if the timeout is not set). Because the len(run.retriesStatus) is always less than retries.
Steps to Reproduce the Problem

Have a Custom Task controller:

Can run a specific period of time.
Support retries and timeout as documented.

Submit a PipelineRun that contains the CustomTask.

Set the timeout less than the running time of the Run.
Set retriesStatus > 0

The PipelineRun will fail after default.DefaultTimeoutMinutes.

The current implementation in PipelineRun reconciler, it relies on both Condition and retriesStatus: run.IsDone() & len(retriesStatus)==retries
// isFailure returns true only if the run has failed and will not be retried.
// If the PipelineTask has a Matrix, isFailure returns true if any run has failed (no remaining retries)
// and all other runs are done.
func (t ResolvedPipelineTask) isFailure() bool {
	if t.isCancelledForTimeOut() {
		return true
	}
	if t.isCancelled() {
		return true
	}
	if t.isSuccessful() {
		return false
	}
	var c *apis.Condition
	var isDone bool

	switch {
	case t.IsCustomTask() && t.IsMatrixed():
		if len(t.Runs) == 0 {
			return false
		}
		isDone = true
		atLeastOneFailed := false
		for _, run := range t.Runs {
			isDone = isDone && run.IsDone()
			runFailed := run.Status.GetCondition(apis.ConditionSucceeded).IsFalse() && !t.hasRemainingRetries()
			atLeastOneFailed = atLeastOneFailed || runFailed
		}
		return atLeastOneFailed && isDone
	case t.IsCustomTask():
		if t.Run == nil {
			return false
		}
		c = t.Run.Status.GetCondition(apis.ConditionSucceeded)
		isDone = t.Run.IsDone()
	case t.IsMatrixed():
		if len(t.TaskRuns) == 0 {
			return false
		}
		isDone = true
		atLeastOneFailed := false
		for _, taskRun := range t.TaskRuns {
			isDone = isDone && taskRun.IsDone()
			taskRunFailed := taskRun.Status.GetCondition(apis.ConditionSucceeded).IsFalse() && !t.hasRemainingRetries()
			atLeastOneFailed = atLeastOneFailed || taskRunFailed
		}
		return atLeastOneFailed && isDone
	default:
		if t.TaskRun == nil {
			return false
		}
		c = t.TaskRun.Status.GetCondition(apis.ConditionSucceeded)
		isDone = t.TaskRun.IsDone()
	}
	return isDone && c.IsFalse() && !t.hasRemainingRetries()
}

As per the developer Guide, https://tekton.dev/docs/pipelines/runs/#developer-guide-for-custom-controllers-supporting-timeout
A Custom task controller has to perform :
			run.Status.MarkRunFailed(reason, "Run %s/%s was cancelled due to Timeout.", run.Namespace, run.Name)

When it observes, run.IsCancelled()  as true.
This should make run.IsDone() true and run.IsFailed() evaluate true as well.
This is the expectation, what do you observe in your code? Can you show us what you are running? or may be give an example reproducer?

Yeah, run.IsDone() and run.IsFailed() will be true, but !t.hasRemainingRetries() will be false. So this run will be never considered as Done in Resolved.PipelineTask.IsDone() https://github.com/tektoncd/pipeline/blob/e1fd72720652fa5a1b7f811a6ce1d6c943be11a6/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go#L76
Therefore, it will be always treated as schedulable, but when the PipelineRun controller wants to schedule it (create a new run), it will find that the run already exists.
I created a custom run controller that implements the functionality as described in the developer guide. Install it locally, then apply the following yamls, you'll reproduce the error.
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: custom-task-pipeline
spec:
  tasks:
  - name: wait
    timeout: "1s"
    retries: 1
    taskRef:
      apiVersion: wait.testing.tekton.dev/v1alpha1
      kind: Wait
    params:
    - name: duration
      value: "2s"
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  generateName: pr-custom-task-
spec:
  pipelineRef:
    apiVersion: tekton.dev/v1beta1
    name: custom-task-pipeline

See the result:

❯ kubectl get run pr-custom-task-gdpqw-wait -o yaml
apiVersion: tekton.dev/v1alpha1
kind: Run
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"tekton.dev/v1beta1","kind":"Pipeline","metadata":{"annotations":{},"name":"custom-task-pipeline","namespace":"default"},"spec":{"tasks":[{"name":"wait","params":[{"name":"duration","value":"2s"}],"retries":1,"taskRef":{"apiVersion":"wait.testing.tekton.dev/v1alpha1","kind":"Wait"},"timeout":"1s"}]}}
  creationTimestamp: "2022-09-30T15:28:41Z"
  generation: 1
  labels:
    tekton.dev/memberOf: tasks
    tekton.dev/pipeline: custom-task-pipeline
    tekton.dev/pipelineRun: pr-custom-task-gdpqw
    tekton.dev/pipelineTask: wait
  name: pr-custom-task-gdpqw-wait
  namespace: default
  ownerReferences:
  - apiVersion: tekton.dev/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: PipelineRun
    name: pr-custom-task-gdpqw
    uid: 3cb51ad5-6a19-4355-819e-52cba778198d
  resourceVersion: "53449752"
  uid: 357684a8-8b90-4532-bc2d-620ba0564e26
spec:
  params:
  - name: duration
    value: 2s
  ref:
    apiVersion: wait.testing.tekton.dev/v1alpha1
    kind: Wait
  retries: 1
  serviceAccountName: default
  timeout: 1s
status:
  completionTime: "2022-09-30T15:28:42Z"
  conditions:
  - lastTransitionTime: "2022-09-30T15:28:42Z"
    message: Custom Task Run %!v(MISSING) timed out
    reason: TimedOut
    status: "False"
    type: Succeeded
  extraFields: null
  observedGeneration: 1
  startTime: "2022-09-30T15:28:41Z"

❯ kubectl get pr pr-custom-task-gdpqw -o yaml
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"tekton.dev/v1beta1","kind":"Pipeline","metadata":{"annotations":{},"name":"custom-task-pipeline","namespace":"default"},"spec":{"tasks":[{"name":"wait","params":[{"name":"duration","value":"2s"}],"retries":1,"taskRef":{"apiVersion":"wait.testing.tekton.dev/v1alpha1","kind":"Wait"},"timeout":"1s"}]}}
  creationTimestamp: "2022-09-30T15:28:41Z"
  generateName: pr-custom-task-
  generation: 1
  labels:
    tekton.dev/pipeline: custom-task-pipeline
  name: pr-custom-task-gdpqw
  namespace: default
  resourceVersion: "53449738"
  uid: 3cb51ad5-6a19-4355-819e-52cba778198d
spec:
  pipelineRef:
    apiVersion: tekton.dev/v1beta1
    name: custom-task-pipeline
  serviceAccountName: default
  timeout: 1h0m0s
status:
  childReferences:
  - apiVersion: tekton.dev/v1alpha1
    kind: Run
    name: pr-custom-task-gdpqw-wait
    pipelineTaskName: wait
  conditions:
  - lastTransitionTime: "2022-09-30T15:28:41Z"
    message: 'Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped:
      0'
    reason: Running
    status: Unknown
    type: Succeeded
  pipelineSpec:
    tasks:
    - name: wait
      params:
      - name: duration
        value: 2s
      retries: 1
      taskRef:
        apiVersion: wait.testing.tekton.dev/v1alpha1
        kind: Wait
      timeout: 1s
  startTime: "2022-09-30T15:28:41Z"

❯ kubectl describe pr pr-custom-task-gdpqw
Name:         pr-custom-task-gdpqw
Namespace:    default
Labels:       tekton.dev/pipeline=custom-task-pipeline
Annotations:  <none>
API Version:  tekton.dev/v1beta1
Kind:         PipelineRun
Metadata:
  Creation Timestamp:  2022-09-30T15:28:41Z
  Generate Name:       pr-custom-task-
  Generation:          1
  Managed Fields:
    API Version:  tekton.dev/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
        f:labels:
          .:
          f:tekton.dev/pipeline:
    Manager:      controller
    Operation:    Update
    Time:         2022-09-30T15:28:41Z
    API Version:  tekton.dev/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:childReferences:
        f:conditions:
        f:pipelineSpec:
          .:
          f:tasks:
        f:startTime:
    Manager:      controller
    Operation:    Update
    Subresource:  status
    Time:         2022-09-30T15:28:41Z
    API Version:  tekton.dev/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:generateName:
      f:spec:
        .:
        f:pipelineRef:
          .:
          f:apiVersion:
          f:name:
    Manager:         kubectl-create
    Operation:       Update
    Time:            2022-09-30T15:28:41Z
  Resource Version:  53449738
  UID:               3cb51ad5-6a19-4355-819e-52cba778198d
Spec:
  Pipeline Ref:
    API Version:         tekton.dev/v1beta1
    Name:                custom-task-pipeline
  Service Account Name:  default
  Timeout:               1h0m0s
Status:
  Child References:
    API Version:         tekton.dev/v1alpha1
    Kind:                Run
    Name:                pr-custom-task-gdpqw-wait
    Pipeline Task Name:  wait
  Conditions:
    Last Transition Time:  2022-09-30T15:28:41Z
    Message:               Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0
    Reason:                Running
    Status:                Unknown
    Type:                  Succeeded
  Pipeline Spec:
    Tasks:
      Name:  wait
      Params:
        Name:   duration
        Value:  2s
      Retries:  1
      Task Ref:
        API Version:  wait.testing.tekton.dev/v1alpha1
        Kind:         Wait
      Timeout:        1s
  Start Time:         2022-09-30T15:28:41Z
Events:
  Type     Reason         Age                 From         Message
  ----     ------         ----                ----         -------
  Normal   Started        16m                 PipelineRun
  Normal   Running        16m                 PipelineRun  Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0
  Warning  InternalError  16m (x11 over 16m)  PipelineRun  1 error occurred:
           * error creating Run called pr-custom-task-gdpqw-wait for PipelineTask wait from PipelineRun pr-custom-task-gdpqw: runs.tekton.dev "pr-custom-task-gdpqw-wait" already exists
  Warning  RunCreationFailed  5m19s (x18 over 16m)  PipelineRun  Failed to create Run "pr-custom-task-gdpqw-wait": runs.tekton.dev "pr-custom-task-gdpqw-wait" already exists

This issue was fixed in v0.43 through implementation of TEP-0121 and TEP-0114
/close


🐛Bug: Slider lagging behind on fast mouse movements

Would you mind sharing a video? Also, is this happening on the docs, or on your repository? I can't reproduce on my system:
https://github.com/melt-ui/melt-ui/assets/26071571/286df97c-246b-49a4-811f-6ee1c3791937


error: ‘CUtensorMap’ has not been declared

Description:
I'm encountering the following compilation errors when building the project:
cmake --build . --config {build_type} --parallel {job_count} --target tensorrt_llm nvinfer_plugin_tensorrt_llm th_common bindings   executorWorker
[  0%] Building CXX object tensorrt_llm/runtime/CMakeFiles/runtime_src.dir/utils/numpyUtils.cpp.o
In file included from /tmp/package/MEP-tensorRT/cpp/include/tensorrt_llm/common/cudaUtils.h:20,
                 from /tmp/package/MEP-tensorRT/cpp/include/tensorrt_llm/runtime/cudaStream.h:20,
                 from /tmp/package/MEP-tensorRT/cpp/include/tensorrt_llm/runtime/bufferManager.h:20,
                 from /tmp/package/MEP-tensorRT/cpp/tensorrt_llm/runtime/utils/numpyUtils.h:19,
                 from /tmp/package/MEP-tensorRT/cpp/tensorrt_llm/runtime/utils/numpyUtils.cpp:17:
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:74:37: error: ‘CUtensorMap’ has not been declared
   74 |     CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank,
      |                                     ^~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:74:61: error: ‘CUtensorMapDataType’ has not been declared
   74 |     CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank,
      |                                                             ^~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:76:43: error: ‘CUtensorMapInterleave’ has not been declared
   76 |         cuuint32_t const* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle,
      |                                           ^~~~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:76:77: error: ‘CUtensorMapSwizzle’ has not been declared
   76 |         cuuint32_t const* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle,
      |                                                                             ^~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:77:9: error: ‘CUtensorMapL2promotion’ has not been declared
   77 |         CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) const;
      |         ^~~~~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:77:45: error: ‘CUtensorMapFloatOOBfill’ has not been declared
   77 |         CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) const;
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:103:41: error: ‘CUtensorMap’ has not been declared
  103 |     CUresult (*_cuTensorMapEncodeTiled)(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType,
      |                                         ^~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:103:65: error: ‘CUtensorMapDataType’ has not been declared
  103 |     CUresult (*_cuTensorMapEncodeTiled)(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType,
      |                                                                 ^~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:105:69: error: ‘CUtensorMapInterleave’ has not been declared
  105 |         cuuint32_t const* boxDim, cuuint32_t const* elementStrides, CUtensorMapInterleave interleave,
      |                                                                     ^~~~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:106:9: error: ‘CUtensorMapSwizzle’ has not been declared
  106 |         CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill);
      |         ^~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:106:37: error: ‘CUtensorMapL2promotion’ has not been declared
  106 |         CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/package/MEP-tensorRT/cpp/tensorrt_llm/common/cudaDriverWrapper.h:106:73: error: ‘CUtensorMapFloatOOBfill’ has not been declared
  106 |         CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill);
      |                                                                         ^~~~~~~~~~~~~~~~~~~~~~~
gmake[3]: *** [tensorrt_llm/runtime/CMakeFiles/runtime_src.dir/build.make:76: tensorrt_llm/runtime/CMakeFiles/runtime_src.dir/utils/numpyUtils.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:1556: tensorrt_llm/runtime/CMakeFiles/runtime_src.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1225: tensorrt_llm/CMakeFiles/tensorrt_llm.dir/rule] Error 2

The errors indicate that several types related to CUtensorMap (like CUtensorMapDataType, CUtensorMapInterleave, etc.) are not recognized. These types are likely missing from an included header or are not defined in the project.
How to solve it?
ENV:
-- The CXX compiler identification is GNU 9.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- NVTX is disabled
-- Importing batch manager
-- Importing executor
-- Importing nvrtc wrapper
-- Importing internal cutlass kernels
-- Building PyTorch
-- Building Google tests
-- Building benchmarks
-- Not building C++ micro benchmarks
-- TensorRT-LLM version: 0.16.0.dev2024112600
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - /usr/local/cuda-11.2/bin/nvcc
-- CUDA compiler: /usr/local/cuda-11.2/bin/nvcc
-- GPU architectures: 70-real;80-real;86-real
-- The C compiler identification is GNU 9.2.0
-- The CUDA compiler identification is NVIDIA 11.2.67
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/bin/mpicc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.2/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /usr/local/cuda-11.2/include (found version "11.2.67")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- CUDA library status:
--     version: 11.2.67
--     libraries: /usr/local/cuda-11.2/lib64
--     include path: /usr/local/cuda-11.2/targets/x86_64-linux/include
-- pybind11 v3.0.0 dev1
-- Found PythonInterp: /opt/miniconda/envs/python37/envs/py39/bin/python (found suitable version "3.9.20", minimum required is "3.8")
-- Found PythonLibs: /opt/miniconda/envs/python37/envs/py39/lib/libpython3.9.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /usr/local/tensorrt/targets/x86_64-linux-gnu/lib/libnvinfer.so
-- ==========================================================================================
-- CUDAToolkit_VERSION 11.2 is greater or equal than 11.0, enable -DENABLE_BF16 flag
-- Found MPI_C: /usr/local/bin/mpicc (found version "3.1")
-- Found MPI_CXX: /usr/local/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- COMMON_HEADER_DIRS: /tmp/package/MEP-tensorRT/cpp;/usr/local/cuda-11.2/include
-- Found Python3: /opt/miniconda/envs/python37/envs/py39/bin/python3.9 (found version "3.9.20") found components: Interpreter Development Development.Module Development.Embed
-- USE_CXX11_ABI is set by python Torch to 0
-- TORCH_CUDA_ARCH_LIST: 7.0;8.0;8.6
-- Found Python executable at /optminiconda/envs/python37/envs/py39/bin/python3.9
-- Found Python libraries at /opt/miniconda/envs/python37/envs/py39/lib
-- Found CUDA: /usr/local/cuda-11.2 (found version "11.2")
-- Found CUDAToolkit: /usr/local/cuda-11.2/include (found version "11.2.67")
-- Caffe2: CUDA detected: 11.2
-- Caffe2: CUDA nvcc is: /usr/local/cuda-11.2/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-11.2
-- Caffe2: Header version is: 11.2

cuda 11.2 is too old


tweak the device description for emulators

tweak the device description for emulators (use simulator for the iOS simulator and emulator for other devices)

1 connected device:

iPhone 6s Plus • 5CE9B176-0962-4C15-BFCA-E2B55B56830C • ios (simulator)

@danrubel


Add virtual file tester

The main purpose of a language plugin, is to provide (embdded) virtual files. These virtual files contain a snapshot and mappings. The Volar Labs VSCode extension provides a great way to inspect them. However, the mappings become pretty hard to interpret when writing tests (example).
It would be nice if Volar provides a way to represent virtual files in a way that’s friendly to the reader.
Idea: Add a function to represent a Volar virtual file as a markdown file containing annotated code blocks.
import { printVirtualFile } from '@volar/test-utils'

printSnapshot(printVirtualFile, {
  comments: {
    markdown: ['<!--', '-->'],
    mdx: ['{/*', '*/}'],
    typescriptreact: '//',
  }
})

```mdx fileName="file.mdx"
{/* Exact match */}
    import { Component } from './component.js'

    Hello <Component name={props.name} />
```

```javascriptreact fileName="file.mdx.jsx"
   import { Component } from './component.js'
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   /**
    * @deprecated
    *   Do not use.
    *
    * @param {{readonly [K in keyof MDXContentProps]: MDXContentProps[K]}} props
    *   The [props](https://mdxjs.com/docs/using-mdx/#props) that have been passed to the MDX component.
    */
   function _createMdxContent(props) {
     return <><Component name={props.name} /></>
//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   }

   /**
    * Render the MDX contents.
    *
    * @param {{readonly [K in keyof MDXContentProps]: MDXContentProps[K]}} props
    *   The [props](https://mdxjs.com/docs/using-mdx/#props) that have been passed to the MDX component.
    */
   export default function MDXContent(props) {
     return <_createMdxContent {...props} />
   }

   // @ts-ignore
   /** @typedef {0 extends 1 & Props ? {} : Props} MDXContentProps */
```

```markdown fileName="file.mdx.md"

<!-- ^ --->
     Hello <!---->
<!-- ^^^^^^       ^ -->
```

The comment could be configured per language ID. Code is indented by the length of the opening comment. The commend uses ^ to indicate a character that matches the position in the parent virtual file, and shows the original character in case of a mismatch.
This file could be written to disk using any snapshotting library, or inlined in a multiline string.

Good idea! 👍 Will look into this.

Maybe the markdown formatting is a bit much. The result can be Map<VirtualFile, string>, where each virtual file is mapped to its representation.


[Question]: RAG with Causal AI

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
Are there any implementations of RAG that take advantage of Causal AI? Think of RAG+causal AI as a white-box approach compared to usual RAG.

Look at
Causal QA: https://aclanthology.org/2022.coling-1.291.pdf
Causal Embeddings: https://arxiv.org/abs/1609.08097


Return yarnDistributionProvided option

before 6.0.0 there was a very nice option "yarnDistributionProvided" which allowed to use an already existing global yarn version. This is actually the only allowed possibility to use yarn in some environment which work unconnected to internet and use only repositories from intranet.
I can't find the way to make yarn work in offline mode. It seems installYarn always wants to "phone home".

Hi @Gamadril,
Thank you for your message and for using the plugin.
Indeed, property yarnDistributionProvided has been removed in version 6.0.0 and I understand it may be surprising. Version 6.0.0 brings support of Yarn Berry baseline, and removes support of Yarn Classic baseline. The plugin will not deal with both baselines in any version, due to the complexity of such implementation. Forcing usage of the Yarn Berry baseline encourages developers to migrate their project. If you can't do that, then you can't upgrade the plugin in version 6.0.0. With your message, I assume you are still using the Yarn Classic baseline in a project (i.e. a Yarn 1.x version). If I'm mistaken, please correct me and sorry for the following details.
Yarn Berry provides access to Yarn v1 (still, but in a totally different way) and Yarn v2+ releases. To do so, Yarn Berry does not rely on a concrete distribution anymore, as opposed to the Classic baseline. Yarn Berry must be seen as a new package manager, not an enhancement. There's no Yarn distribution anymore, that's how the Berry baseline works. Therefore, property yarnDistributionProvided and other ones are now irrelevant.
If you succeed in migrating your project to the Berry baseline, then you'll be able to use v6.0.0 of the plugin.  After migration, you should look at Yarn Berry's documentation to find out how to configure this Node.js distribution, and what to save in your Git repository.
Hope this helps!
BR

Hi @v1nc3n4,
thanks for the detailed answer. I'm talking about using preinstalled yarn v3.2.4 Version. Let me explain the situation.
Many workstations with restricted internet access, same situation with Jenkins build server which has no internet access at all. All libs/packages are located on a local nexus server.
To install yarn > classic in such an environment you still need a client with internet access, but only to prepare the package for offline installation later on all other workstations.
Starting point: Local NodeJS version (v16.18.0 in my case)

Enable corepack
corepack enable

Save yarn 3.2.4 release to local archive
corepack prepare<EMAIL_ADDRESS>-o

rename to yarn-3.2.4.tgz and put it on local nexus server

Administration service running on all workstations will execute this in background without user interaction:
corepack enable
wget http://nexuss.intern/bin/yarn/yarn-3.2.4.tgz
corepack hydrate yarn-3.2.4.tgz --activate

yarn is in PATH, user can start yarn directly
$ yarn --version
3.2.4

So the gradle plugin should in this case find yarn in PATH and just call it without trying to install it first. I had to go back to 5.3.0, which seems to work in my case.

I have a workaround for the 6.0.0 version by disabling all node- and yarn-installation tasks
installNode.enabled = false
installYarnGlobally.enabled = false
enableYarnBerry.enabled = false
installYarn.enabled = false


Is TryChain::is_terminated correct?

Looking at https://github.com/rust-lang-nursery/futures-rs/blob/af434e1d495264dfd7f8b5094b69fbba490d423e/futures-util/src/try_future/try_chain.rs#L28-L33
Shouldn't those flipped? The FusedFuture docs say "Returns true if the underlying future should no longer be polled." Isn't the Empty state the completed state?

Seems current implementation is incorrect.


Clarify config cache doc around dependency resolution results as task inputs

The documentation was outdated and confusing.

@bot-gradle test QFL

OK, I've already triggered the following builds for you:

QuickFeedbackLinux build

@bot-gradle test and merge

OK, I've already triggered a build for you.


Update users.md

add medical-humanities to users list (hopefully migrate to medical-humanities.org soon)

Thanks for using Congo, @cbeauhilton! I'll merge this change in and your site will appear on the public list when the next theme release is published.


SendGridKit Version 1.0.0

This package is a port of https://github.com/vapor-community/sendgrid-provider based on feedback addressed in https://github.com/vapor-community/sendgrid-provider/pull/32#issuecomment-546926785.

@Andrewangeta Requested changes have been implemented


Closes: #1

Updated validations.py python script.
Fixed the behaviour of validate_user function in validations.py.
The output is now modified in accordance with the needs.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!

thanks!


Race condition with double successive calls mutate

Bug report
Description / Observed Behavior
Race condition when mutating consistently single useSWR hook
Expected Behavior
When I call mutate with callback I expect the first argument in the callback is the equal previous state after first mutating.
And I expected when I set initialData to some value then it passes to the first argument in mutating callback, but it's set undefined.
Repro Steps / Code Example
https://codesandbox.io/s/laughing-sky-xzllr?file=/src/App.js:0-706
Additional Context
SWR version 0.3.5
Sorry for my English guys.

This issue was fixed in #735, please upgrade to the latest version (0.3.9).
Also there's a small issue in the sandbox which is old.filter((el) => el === id), I believe it should be !==. Let me know if you have other question!


Why does CKKS encryptor need modulus switching?

I have same wonder with the post (https://github.com/microsoft/SEAL/issues/402#issue-1022757442).
Let's suppose that CKKS use the primes for crt with {60, 40, 40, 60} bitwidth.
Let's call them q0, q1, q2, q3 respectively.
I checked that the encrypted data are in modulus q0, q1, q2 (crt format) after encryption from the encoder's plaintext.
But I saw void Encryptor::encrypt_zero_internal function includes "Modulus Switching". (using q3)
I wanna understand why the modulus switching process is needed.

This is undocumented trick to decrease the noise from asymmetric encryption


Fix extra714: result is FAIL when CloudFront is configured for real-time logs via Kinesis

Consider adding a check for kinesis stream logging before failing this check. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html

Thanks @sectoramen good point! That is a new feature that I didn't take into consideration, I think the trick is to see if there is an existing RealtimeLogConfigArn set up for a distribution. This query aws cloudfront get-distribution --id DISTRIBUTIONID --query Distribution.DistributionConfig.DefaultCacheBehavior.RealtimeLogConfigArn

Can you test this one and see if that is somehow what is needed? https://gist.github.com/toniblyx/7c248593c2443e244289a7631305ddf9


python3Packages.pymeteireann: init at 0.2

Motivation for this change
Python module to communicate with the Met Éireann Public Weather Forecast API
https://github.com/DylanGore/PyMetEireann/
This is a new Home Assistant dependency (> 2021.5.x)
ToDo:

[x] Update component-packages
[x] Enable tests (met_eireann)

Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 121853 run on x86_64-linux 1

2 packages built:

python38Packages.pymeteireann
python39Packages.pymeteireann

Result of nixpkgs-review pr 121853 at 9f79927c run on aarch64-linux 1

2 packages built successfully:

python38Packages.pymeteireann
python39Packages.pymeteireann

1 suggestion:

warning: unused-argument
Unused argument: dicttoxml.
Near pkgs/development/python-modules/pymeteireann/default.nix:5:3:
  |
5 | , dicttoxml
  |   ^

Result of nixpkgs-review pr 121853 run on x86_64-linux 1

3 packages built:

home-assistant
python38Packages.pymeteireann
python39Packages.pymeteireann


[Bug]  flink doris connector occur error

Search before asking

[X] I had searched in the issues and found no similar issues.

Version
master
What's Wrong?
Flink Doris Connector, it will returen error when get backends by api ( http://fehost:8030/rest/v1/system?path=//backends')
return result: "Internal Error","code":500,"data":"22","count":0

What You Expected?
success , get backends
How to Reproduce?
use new master code build doris-flink-1.0-SNAPSHOT.jar
Anything Else?
none
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

have you enable httpV2?

default value is  true,i use new master code compile


learnable_codebook and in-place optimization

Hi, I tried to use both codebook loss and commitment loss instead of EMA update, but I was confused about how to use codebook loss.
If 'learable_codebook' is True, then 'commit_quantize' is not detached from 'quantize',
            maybe_detach = torch.detach if not self.learnable_codebook or freeze_codebook else identity

            commit_quantize = maybe_detach(quantize)

and 'commit_loss' will serve as both codebook loss and commitment loss.
commit_loss = F.mse_loss(commit_quantize, x)

So, just setting 'learable_codebook' as True is all I need for applying codebook loss, or need to implement codebook loss seperately?
Also, if 'commit_loss' serves as codebook loss, then I think 'commit_quantize' should be detached when using in-place update, so that codebook will not be updated twice!
        # one step in-place update

        if should_inplace_optimize and self.training and not freeze_codebook:

            if exists(mask):
                loss = F.mse_loss(quantize, x.detach(), reduction = 'none')

                loss_mask = mask
                if is_multiheaded:
                    loss_mask = repeat(mask, 'b n -> c (b h) n', c = loss.shape[0], h = loss.shape[1] // mask.shape[0])

                loss = loss[loss_mask].mean()

            else:
                loss = F.mse_loss(quantize, x.detach())

            loss.backward()
            self.in_place_codebook_optimizer.step()
            self.in_place_codebook_optimizer.zero_grad()

            # quantize again

            quantize, embed_ind, distances = self._codebook(x, **codebook_forward_kwargs)

I think that F.mse_loss(commit_quantize, x) is equivalent to F.mse_loss(commit_quantize.detach(), x) + F.mse_loss(commit_quantize, x.detach()). However, It's unable to configure the coefficient of these two terms in the original formula. If coefficient adjustment is necessary, perhaps an additional update could be performed using the in-place optimize?


RPC to dump policy config as json

As a PEP developer I need the ability to dump all policy config for a platform so I can function offline.
Acceptance Criteria

draft proto to capture the services, messages and rpc to enable dumping policy config
implement GRPC service and db handlers
implement integration tests
respect authorization policies

@ttschampel should we close this for the OCI feature or will that be a paid feature and this will still add value?


Automatically prefix /// when adding newlines in doc comments

In RLS in VSCode it would automatically add the ///  prefix while I'm inside of a doc comment and I add a newline. This was rather convenient and it would be cool to have Rust Analyzer do this as well.

You need to explicitly enable it: https://github.com/rust-analyzer/rust-analyzer/blob/bf1043cac2f3cc2264d9fcda242f63616f4efa1b/crates/ide/src/typing/on_enter.rs#L22

Oh, nice, that works. Ah, that is in the docs, too. Would it be possible to make that a setting, or is that not how VSCode works?

I think we can toggle preferences at run-time, but can't add keybindings, so not really.

Bummer. Oh, well. Thanks for the help! :)

Does it really needs LSP extension and manual shortcut? All languages have some kind of comments that should be extended on enter, but I don't think they do it this way. We can't do what RLS does?

We can, but matklad isn't fond of the idea because it's reimplementing part of the Rust syntax in regexes, instead of using the proper parser in RA.
In practice there might be some corner cases where the regexes don't work, but IMO it's still better than sluggish Enter.

Apart from speed, default-ness is also an important issue IMO.
Is the reimplementing regex something like \s*\/\/[\/,!].*? Or it is not that easy?

See https://code.visualstudio.com/api/language-extensions/language-configuration-guide#on-enter-rules.
Does this already work in vscode-rust? It doesn't seem to be configured in https://github.com/rust-lang/vscode-rust/blob/master/language-configuration.json.

Does this already work in vscode-rust?

Yes it works. It is here: https://github.com/rust-lang/vscode-rust/blob/master/src/extension.ts#L287
Any argument against copying it as is in RA? People that need LSP based behavior still can add a shortcut I think?


Improve the unpacking process on all platform (#505)

NOTE: lzma is not avaiable out of the box on Python 2. Somewhere on the wiki we should indicate a single "pip install pylzma" is necessary before building.

NOTE: lzma is not avaiable out of the box on Python 2. Somewhere on the wiki we should indicate a single "pip install pylzma" is necessary before building.

It looks like the pyzlma import is failing CI

Indeed, can indicate Travis CI to use python 3 instead of python 2 ?

UAC kicks in on Windows. I just get WinError [740] The requested operation requires elevation when trying to run waf configure on Windows.

There is now a cmake build system. waf looks hard to use for nearly everyone. Do you agree that we should polish the cmake stuff and phrase out waf? (by changing Wiki pages first, I can update the Arch Linux cquery packages)


Program nickname for quick launch in PowerToys Run

Description of the new feature / enhancement
You can specify an nickname for a particular program so when you type the nickname, the program will be listed for a quick launch. Such as: "vs" for Visual Studio; "ps" for Adobe Photoshop; “lr" for Adobe lightroom.
As a lot of programs are not been remembered as its full name but by its initial or other nicknames, this function will largely help users to quick launch a specific program.
Scenario when this would be used?
When you want to launch a program but its name is long and not easy to type.
Supporting information
No response

Duplicate of #12339


fix window aggregation with alias and add integration test case

Which issue does this PR close?
fix window aggregation with alias
Closes #455.
Rationale for this change

What changes are included in this PR?

fix by rebasing exprs
add integration test cases

Are there any user-facing changes?

Codecov Report

Merging #454 (7cb2f1c) into master (c8ab5a4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #454   +/-   ##
=======================================
  Coverage   75.30%   75.30%
=======================================
  Files         152      152
  Lines       25275    25279    +4
=======================================
+ Hits        19033    19037    +4
  Misses       6242     6242

Impacted Files
Coverage Δ

datafusion/src/logical_plan/builder.rs
90.47% <100.00%> (ø)

datafusion/src/sql/planner.rs
84.10% <100.00%> (+0.05%)
:arrow_up:

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 c8ab5a4...7cb2f1c. Read the comment docs.

I am loving the integration test harness . Thanks @Jimexist 👍


Update MD file on new branch 2017-30-26_23-11-49

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon.md
:white_check_mark:Succeeded

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


Link to vgg16_weights.h5 is broken

The link to vgg16_weights.h5 on google drive is broken
Can you update that link? It is really necessary for us
Thank you <3

https://drive.google.com/file/d/1xJbtMZzKv62PaohN1fRySZR6l9gHTz6Z/view?usp=sharing

Hi
Thank you so much for sending me your pretrain model <3
Vào Th 2, 1 thg 2, 2021 vào lúc 21:29 aaditya prakash <
<EMAIL_ADDRESS>đã viết:

https://drive.google.com/file/d/1xJbtMZzKv62PaohN1fRySZR6l9gHTz6Z/view?usp=sharing
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/iamaaditya/VQA_Demo/issues/33#issuecomment-770895194,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMUWTAG5E7TMPZ76V44FMPLS422V3ANCNFSM4W4L42BQ
.

--
Full name: Nguyen Huy Tuong
From:* Tien Phuoc, Quang Nam
https://www.google.com/maps/place/Tiên+Cảnh,+Tiên+Phước,+Quảng+Nam,+Việt+Nam/@15.4616367,108.2612937,15251m/data=!3m2!1e3!4b1!4m8!1m2!2m1!1zdGjDtG4gNCB4w6MgdGnDqm4gY-G6o25o!3m4!1s0x3169ec255a287c5f:0xc7862323f96bc150!8m2!3d15.4595934!4d108.2970692?hl=vi-VN*
University: Da Nang University of Technology http://dut.udn.vn/
Facebook: Nguyễn Huy Tưởng http://www.facebook.com/huytuong010101
Phone:<PHONE_NUMBER>

Fun when Code - Code for Fun!


fix Swift 1.2 warnings shown in Xcode7.3

Thank you for very helpful Cocoapod!
We use it with Xcode7.3 and have see these warnings:
EPContactsPicker/EPContactsPicker.swift:72:117: Use of string literal for Objective-C selectors is deprecated; use '#selector' instead

EPContactsPicker/EPContactsPicker.swift:76:117: Use of string literal for Objective-C selectors is deprecated; use '#selector' instead

EPContactsPicker/EPExtensions.swift:21:25: 'init(start:end:)' is deprecated: it will be removed in Swift 3.  Use the '..<' operator.

This is proposed fix for them. Thank you!

Thanks :)


[Unlockables] Enable unlockables for Characters

Should be straightforward using the same functions as for puchicharas

Added by #387


#1128 | Remove deprecated type hints from typing module

Description
Remove deprecated type hints from typing module
Fixes #1128
Type of change

[X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

[X] Unit Test

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[X] I have checked my code and corrected any misspellings

Maintainer Checklist

[ ] closes #1128
[ ] Made sure Checks passed

@sandrasgg looks like these conflicts are ther after I merged your previous PR. Can you please resolve these so that we can review the code? Thanks!

@deshraj I've rebased with main and resolved the conflicts, it's ready to review 👌🏼

@deshraj I see there's a conflict again, I'll resolve it soon and let you know