Analyzer awaiting X&F? where F is a proper subtype of Future, behaves weirdly

Example:
extension type ExtF(Future<int> _) implements Future<int> {}

class ClassF implements Future<int> {
  then<T>(onValue, {onError}) => Future.value(42).then(onValue);
  noSuchMethod(i) => super.noSuchMethod(i);
}

typedef F = ExtF;
// typedef F = ClassF;
// typedef F = Future<int>; // CHange to this to see difference.

void main() {
  test<Object?>(ClassF());
  test<Object?>(null);
}

void test<X extends Object?>(X x) async {
  if (x is F?) (await x).st<E<int?>>(); // Is error: Analyzer (type `int`)
  if (x is F?) (await x).st<E<int?>>; // ??
  if (x is F?) (await x).st<E<String>>; // ??
}

extension<T> on T {
  // Expect static type to be `E`(xactly) `T`
  void st<X extends E<T>>() {
    print("$this: $runtimeType @ $T");
  }
}
typedef E<T> = T Function(T);

This shows both with an extension type and a class implementing Future<int>, so it's not specific to extenstion types.
The promoted type of x is F?, where F is a proper subtype of Future<int>.
Awaiting that should give an int?, but analyzer says it's an int. (Comment out the String line, and the code will run in DartPad and give a null result from the int-typed expression.)
Further, if I remove the () from the st invocation, making it a tear-off which should have the same parameter requirements as a call, it seems the type parameters are not checked at all.
If I change the type F to be Future<int> directly, so the promoted type is Future<int>?, the type of await becomes int?, and the two tear-offs get checked again. (Which is why I'm guessing the issues are related.)

I'll argue that's a bug in the specification of "Derives a future type".
The intent of that is to figure out whether a type suggests a specific future type, which will be the one flattened by flatten.
When you flatten Future<int>?, it becomes int?. When you flatten X&(Future<int>?) it should also become int?.
If it doesn't, we've made a mistake, and should fix that.
The behavior I'd want for "derives a future type" is:

FutureOr<T> derives a future type.
T derives a future type if T has Future<S> as superinterface for some S
T? derives a future type if T does.
X with bound B derives a future if B does.
X&B derives a future type either

if B does, or
if B doesn't and X does.

The point of "derives a future type" is to preserve X instead of B from X&B when B doesn't suggest a future type at all, but to flatten it when it does.
When B looks like something you'd otherwise want to await, then that should be the thing you await on X&B.
If not, we fall back on X, so you don't lose the original type to an await nonFuture.
I.e., is flatten(X & Object) = X and *flatten*(X & Future) = int`.
A type like Future<int>? is something you'd have reason to await, therefore X extends Future<int>? and X & Future<int>? will also be types you'd want to await, and we should include them in the "derives a future type".

.. that's a bug ..

Yes, that's certainly a fair characterization. This is also the reason why I suggested that we might want to change the rules. However, we know that we must be careful in this area.

When you flatten Future<int>?, it becomes int?. When you flatten X&(Future<int>?) it should also become int?. If it doesn't, we've made a mistake, and should fix that.

This is already working just fine.
The missing part is that we're now focusing on proper subtypes of Future, and they are not handled in this situation.
Proper (non-bottom) subtypes of Future used to be very rare in user code. Instances of _Future would occur frequently at run-time, but the static type would typically be Future<S> or FutureOr<S> for some S, and very rarely a proper subtype of Future. In this issue we may suddenly have proper subtypes of Future as static types all over the place, because we're specifically focusing on extension types and await. The fact that we can create a class which is also a proper subtype of Future is relevant, but it hasn't played much of a role so far. In any case, we need to handle those proper subtypes in a meaningful way.
Returning to the example, flatten(X & (Future<int>?)) == int? as intended, but flatten(X & F?) == X when F is an extension type or class that implements Future<int>. We fail to see that F? is useful, because it doesn't "derive a future type", so we proceed to use X, whose flatten is just X (if we still have X extends Object?).
As I see the situation, we could just proceed and generalize 'derives a future type' in order to get a consistent and understandable semantics, and then ask for implementations. However, we don't want introduce breaking changes with respect to anything that isn't in need of improvements.

I created https://github.com/dart-lang/language/pull/3574 in order to handle a potential specification change.

Awaiting that should give an int?, but analyzer says it's an int. (Comment out the String line, and the code will run in DartPad and give a null result from the int-typed expression.)

@lrhn I'm confused about what you're seeing.  I can't reproduce this.  What I do see is that the analyzer and the CFE are inconsistent here, but I don't see any unsoundness, and I don't see the analyzer producing int here.  Specifically, if I modify your code to get the analyzer to print out the types, I get the following:
void f(int x) {}
void test<X extends Object?>(X x) async {
  if (x is F?) f(x); // Is error: Analyzer (type `X & ExtF`)
  if (x is F?) f((await x)); // Is error: Analyzer (type `X`)
}

This is inconsistent with the CFE, which seems to infer X & F for x (it doesn't print out the intersection type in the error, but adding an assignment seems to validate that the intersection is there) and int? for await x.
Either of these choices could, I believe, be sound in the sense that they are internally consistent: the await x would simply check that the value is of the type Future<X> in the analyzer interpretation and Future<int? for the CFE interpretation.  Is that right?  Or am I missing something?
Assuming the soundness issue is put to the side, the question then is, which is correct?  I believe that the CFE is consistent with the current specification if we expand "derives a Future type" to extension types in the obvious way, right?

I don't think this is an actual runtime unsoundness. It can't be since the issue is only aimed at the analyzer.
If I remember correctly, the "give a null result from the int-typed expression" tries to say that the runtime behavior (dart2js) gives a null value from the expression that the analyzer reported as having type int. Which makes the analyzer out of touch with reality, but the runtime isn't unsound because Dart2JS/CFE inferred int?.
(The analyzer can't really be unsound, if unsoundness is defined as a runtime value not satisfying the static type, since the analyzer has no runtime values. I'll sometimes say "unsound" about it meaning that the type it predicts is not a sound approximation of what the runtime semantics says the result will be, but that's only an analytical unsoundness, not a "real" one.)
It's hard to get a runtime unsoundness with await because of how we've defined it. We only await a future if it is a Future<T> where T is the static type of the await expression. That can't be wrong. So as long as any value which isn't awaited is also a subtype of T, soundness is pretty much certain. (That's the S <: FutureOr<flatten(S)> requirement for flatten, which it's defined to satisfy. If that's not satisfied, we do have a problem.)
Back to this issue: The analyzer does not appear to infer int any more, only int?, which is consistent with reality.
Not sure when it was fixed, can't find a commit mentioning this issue, so maybe it was fixed as a side effect of something else.
So what is left is the discrepancy between implementations of flatten(X&F?) where F is a proper subtype of Future, and my opinion that what we have specified (and the analyzer might now be implementing) is not necessarily the right choice.
extension type EF<T>(Future<T> _) implements Future<T> {}
void test<X extends Object?>(X o) async {
  if (o is EF<int>) {
    var v = await o;
    v.st<E<int>>();  // Both agree. (And this test would erase an intersection type to the variable)
  }
  if (o is EF<int>?) {
    // Promotion succeeds.
    var (Future<int>? _) = o;
    var (X _) = o;
    // Await it.
    var v = await o;

    var (X _) = v; // Analyzer accepts, CFE error (int? not assignable to X)
    v.st<E<X>>(); // Analyzer accepts, CFE error
    var (int? _) = v; // CFE accepts, analyzer error (X not assignable to int?)
    v.st<E<int?>>();  // CFE accepts, analyzer error
  }
}
extension <T> on T {
  void st<X extends E<T>>(){}
}
typedef E<T> = T Function(T);

The spec says that EF<int>? does not derive a future type.
Because of that flatten(X & EF<int>?) should be flatten(X) = X.
The CFE thinks it does, which is why its flatten gives flatten(EF<int>?) = int? instead.
(It doesn't just always uses the flatten of the promotion.)
My position is that the bug is in "derives a future type", and EF<int>? should derive one, and the CFE got it right.
When you promote a type variable to a type X&B, we should treat the promoted type variable type as B as much as possible. The user specifically asked for this type, and got it.
(Which is why I, now, think flatten(X&B) should just always be flatten(B). It's the most precise thing we know about the type of the value of that type. That may mean that awaiting an X&Object loses the assignability to X, but otherwise it loses the "is not null", which may be equally bad for the user. And I think if (x is T) { ... x used as T ...} should generally work exactly the same whether we promote x from Object? or X extends Object?. The only difference should be that x can be up-cast back to X in the latter case.)

Yes, the analyzer is correctly implementing the spec. The spec is meaningless as written, because it doesn't actually say what it intended to say.  It's not completely surprising that the CFE actually did what was intended, if they understood the intent and implemented it, and missed that the spec hadn't actually hit the mark.

Am I correct that what we want "T derives a future type Future<U>" to mean is just "T is a subtype of Future<U>, and for all S such that T is a subtype of Future<S>, U is a subtype of S"?

No.
The intent is to see if a type has a Future part which can meaningfully be awaited. Basically, whether flatten(T) ≠ T, except that that equality might be able to happen by accident even if T has some future-part. (Not sure, but can't rule out an X extends Future<X> type variable, or something similarly sinister.)
So "derives a future type" traverses the type structure just like flatten would, until it finds a type that is implements Future or is FutureOr, where flatten would actually do something.
The idea with it was that for flatten(X&B), if B doesn't derive a future type, then B really isn't interesting for flatten. Choosing flatten(B) = B as the result of flatten would mean that await x of that type would check if the value of x implements Future<B>, which it overwhelmingly likely doesn't, and otherwise just delay and evaluate to x again, at type B, which isn't even assignable to X.
If B of X&B has such a future part, we choose flatten(X&B) = flatten(B). Otherwise we choose flatten(X) instead, which is at least assignable to X, and might, hypothetically, derive a future type.
Seemed like a great idea at the time. I don't believe in it any more.
If someone promoted X to X&B, and B doesn't derive a future type, then most likely neither does X.
If X does, then either X has a, possibly nullable, Future-implementing type as bound, and B is a promotion to Null or Never, or X has a, possibly nullable, FutureOr type as bound, and B is a promotion into the non-future side of the FutureOr.
In either case, I don't think we should just ignore the promotion and fall back on the bound. That's not what the user asked for.
(The one argument for doing it anyway is that the user did await the type, so presumably they expected some kind of future.
But if X doesn't derive a future type either, should we go back to B again?)
I suggest we drop the "derives a future type", let flatten(X&B) = flatten(B), and don't try to be clever.

@leafpetersen wrote, and @lrhn responded:

Am I correct that what we want "T derives a future type Future<U>" to mean is just "T is a subtype of Future<U>, and for all S such that T is a subtype of Future<S>, U is a subtype of S"?

No.
The intent is to see if a type has a Future part

Right, that's the reason why I keep saying that if we're looking for the type S such that "T derives the future type S" for a given T then we must search the set of supertypes of T, looking for types of the forms Future<U>, Future<U>?, FutureOr<U>, and FutureOr<U>?. They are the forms of type that have a future part.
It's tempting to say the following:

If T <: Future<U> and U is minimal then T derives the future type Future<U>, otherwise
if T <: Future<U>?, and U is minimal then T derives the future type Future<U>?, otherwise
if T <: FutureOr<U>, and U is minimal thenT derives the future type FutureOr<U>, otherwise
if T <: FutureOr<U>?, and U is minimal then T derives the future type FutureOr<U>?, otherwise
T does not derive a future type.

However, that won't quite work, because T could be int, say, and we don't want to say that int derives the future type FutureOr<int>.
So we don't just want to use the (nice, declarative, complete) subtype relationship. The approach we've taken so far in the specification is to refer to types with which T has an explicitly declared subtype relationship. We know that such subtype relationships can be introduced by superinterface relationships (extends ... with ..., implements, and mixin-on) and by type parameter bound declarations.
That gives rise to the following definition of "derives a future type" (which is exactly what I'm proposing in dart-lang/language#3574):

If T is a type which is introduced by a class, mixin, mixin class, enum, or extension type declaration, and if T or a direct or indirect superinterface of T is Future<U> for some U, then T derives the future type Future<U>.
If T is the type FutureOr<U> for some U, then T derives the future type FutureOr<U>.
If T is S? for some S, and S derives the future type F, then T derives the future type F?.
If T is a type variable with bound B, and B derives the future type F, then T derives the future type F.
(There is no rule for the case where T is of the form X & S because this will never occur.)

Granted, this definition is much less declarative. However, the reliance on the subtyping relationship opens a door which is too large, and then we'd still have to say something along these lines in order to avoid introducing irrelevant supertypes (like int spuriously deriving FutureOr<int>).
It's very easy to see that T <: S whenever T derives the future type S, and also that S has one of the forms Future<U>, Future<U>?, FutureOr<U>, and FutureOr<U>?, and that U is minimal.
@lrhn mentioned that we might want to get rid of "derives a future type" entirely. I have been thinking about this, too, and I've been thinking about ways to simplify flatten (because we appear to have some kind of overlap in the definition of "derives a future type" and flatten). It would be nice if we could have something like the following:

If T derives the future type Future<S> or FutureOr<S> then flatten(T) = S.
If T derives the future type Future<S>? or FutureOr<S>? then flatten(T ) = S?.
Otherwise, flatten(T) = T.

We could then change it to the following (in 2035 or so):

If T derives the future type Future<S> or FutureOr<S> then flatten(T) = S.
If T derives the future type Future<S>? or FutureOr<S>? then flatten(T) = S?.
Otherwise, flatten(T) is undefined.

.. and we could make it a compile-time error to have await e when flatten of the type of e is undefined. ;-)
If we do that then we certainly have to introduce a rule about "X & S derives a future type".
However, I did not change flatten at this time: We do need to generalize "derives a future type" in order to handle types like X extends F? meaningfully, where F derives a future type, and I think we can refactor flatten later: It just needs to be expressed in a way which is more elegant, but still equivalent.

However, that won't quite work, because T could be int, say, and we don't want to say that int derives the future type FutureOr<int>.
So we don't just want to use the (nice, declarative, complete) subtype relationship.

Thanks, that's a very useful example for me to understand why we're specifying this separately from subtyping.


prefix test script test with TS_

Crucible needs Gemfile.lock updated along with the test version to force update

Seems to work fine in crucible after I refreshed my db.  Don't forget to update crucible (LOAD_VERSION & Gemfile.lock) on crucible.


Added a functional interface EventLoopSchedulerFactory

Motivation:
Issue #5289 outlines how the current Event Loop Scheduler factory method may not be enough to create more sophisticated Event Loop Schedulers. I seek to address this by adding a more generalized factory method as requested.
Modifications:

Added a functional interface for an Event Loop Scheduler Factory method that takes the follow parameters:

EventLoopGroup eventLoopGroup
List<ToIntFunction> maxNumEventLoopsFunctions
int maxNumEventLoopsPerEndpoint
int maxNumEventLoopsPerHttp1Endpoint
long idleTimeoutMillis

Result:

Closes #5289
You can implement a more generalized event loop scheduler factory interface to create event loop schedulers with more information.

Modifications:

Added a functional interface for an Event Loop Scheduler Factory method that takes the follow parameters:

EventLoopGroup eventLoopGroup
List<ToIntFunction> maxNumEventLoopsFunctions
int maxNumEventLoopsPerEndpoint
int maxNumEventLoopsPerHttp1Endpoint
long idleTimeoutMillis

Added a new API for building an Event Loop Scheduler using the new interface.
Deprecated the old API for lacking the ability to create more sophisticated schedulers.

Result:

Closes #5289
(Deprecated) The old eventLoopSchedulerFactory API has been deprecated.

You can instead use the new eventLoopSchedulerFactory API in the ClientFactoryBuilder, which uses the above-mentioned     interface, to create more sophisticated EventLoopSchedulers.

Rolled things back, updated the project, added the changes. I don't know what happened that made the previous update so polluted.


Jexus Manager website forgets that it is started (seems to lose connection to iisexpress) after some time

Hello,
Another bug I discovered is that if you create a website and then start it. and just stay on the dialog for some time or switch to another window and come back, you will see the UI for Start / Stop / Restart stopped like the site became stopped even though it is still running!
Also, restart website seems to not do anything in this case. It seems like it loses the "connection" with iisexpress after some time.

Should have been resolved after tracking PID during the process lifecycle.


Theme preview tile for OS themes

Closes #3358 🎉
What I did?

I've extracted the svg that is used to preview the theme into a function named renderThemePreview.
Then I invoked renderThemePreview under the select dropdown used for selecting the theme if the option use OS color scheme is enabled.

From the feature request:

Show a preview tile directly below each drop-down, only when Use OS color scheme is enabled.

I decided not to hide the preview tile and instead rendered it disabled since it was hard to notice that the preview tile appeared on the bottom of the select just by looking at the scrollbar. Here you can find the problem I'm trying to describe:
https://user-images.githubusercontent.com/30463479/118369706-b4f2b100-b5a4-11eb-80f4-6152f5b0f7dd.mp4
The final implementation looks as follows:
https://user-images.githubusercontent.com/30463479/118371129-685ea400-b5ab-11eb-9574-7a1ebd158f9d.mp4
Let me know if you see anything that can be improved, I'll change it ASAP.

Not sure about the failing test in macOS since I can't test the application in that environment but it seems it's not reproducible in Windows/Linux. Do you know what could be the cause?

Not sure about the failing test in macOS since I can't test the application in that environment but it seems it's not reproducible in Windows/Linux. Do you know what could be the cause?

Seemed to be a smoke test timeout, these can happen some times. I have re-run 👍🏽

From the feature request:

Show a preview tile directly below each drop-down, only when Use OS color scheme is enabled.

I decided not to hide the preview tile and instead rendered it disabled since it was hard to notice that the preview tile appeared on the bottom of the select just by looking at the scrollbar. Here you can find the problem I'm trying to describe:

Seems fine to me for the time being. We do have another task to bring the OS color scheme selector above the list of themes (instead of below, as it is now), and in that case hiding the previous would work better.
I pulled this branch locally and did a quick experiment with moving the selector and changing the behavior slightly, but will need some design feedback before going ahead with the following. This is unrelated to your PR though, which can go through regardless (pending another review/QA).

Thanks for your review @develohpanda! I'm going to have a look at the issues page and start working on another issue.


[Swift 4.2] Update Binary Search

Checklist

[x] I've looked at the contribution guidelines.
[x] This pull request is complete and ready for review.

Description
No migration needed for Binary Search

Thanks @subdan!

References #748. Makes it easier to find algorithms to update.


⚠ Bofrost.fr has degraded performance

In 5d75c1e, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1141 ms

Resolved: Bofrost.fr performance has improved in 5028fcd after 6 minutes.


Dependency suggestion

It's an awesome project to get rid of Hive dependencies to make project spark more independent and lightweight.
As design now, sql/jdbc depends on sql/services, it means the downstream application which use this jdbc driver client will include services and other transactive dependencies, it's a risk to fall into jar hell. Actually, Hadoop, Hive, ElasticSearch used the same design (a.k.a client depends on server) and really falled into jar hell. But Kafka choosen a inverse way,  let server depends on client to make client more clean and lightweight. I thought it maybe a better design.

Good suggestion. Thank you @pan3793.


Implement Functional Options

Hello,
As proposed in here #31, the following implements functional options into the library. This is a breaking change and should probably increase the major version. A few things to consider:
New package names
Why?
I started to have name conflicts with the options that were common to both clients since both of them are in the root folder of the project. Here is an example of the issue:

httpClient := heimdall.NewHTTPClient(
	heimdall.WithHTTPTimeout(10),
	heimdall.WithRetryCount(4),
)

hystrixClient := heimdall.NewHystrixHTTPClient(
	heimdall.WithHTTPTimeout(10), // This name cannot be the same
	heimdall.WithRetryCount(4),// This name cannot be the same
	heimdall.WithHystrixTimeout(1100),
)

For this reason, I thought it would be more elegant to have the client implementations in their own package. I called them httpclient (to avoid conflict with the http package) and hystrix
Now the usage looks like:
	httpClient := httpclient.NewClient(
		httpclient.WithHTTPTimeout(timeout),
		httpclient.WithRetryCount(2),
	)

	hystrixClient := hystrix.NewClient(
		hystrix.WithHTTPTimeout(timeout),
		hystrix.WithCommandName("MyCommand"),
		hystrix.WithHystrixTimeout(1100),
		hystrix.WithMaxConcurrentRequests(100),
		hystrix.WithErrorPercentThreshold(25),
		hystrix.WithSleepWindow(10),
		hystrix.WithRequestVolumeThreshold(10),
	)

Returning concrete types
Now I started to return concrete types on the constructors of the clients and to make sure the compiler can identify if we are implementing the interface I added this line.
var _ heimdall.Client = (*Client)(nil)

If you don't like the packaging strategy please let me know and we can try to find a solution.
Thanks!

@italolelis There are merge conflicts, can you help resolve these plz.

@rShetty done

@italolelis Skimmed through the PR. Overall looks solid and Thank you for this. Have added few comments.

@rShetty Thanks for reviewing, I can't see the comments that you left though. Do I need to fix something?

@italolelis Have commented

Thank you very much for the PR


Fix "Reduced Shaders" Cloak

Right now, reduced shaders cloak does not conceal the player as well as with reduced shaders off.  Surely there's a reduced shader variant that can hide the cloaked ship as well as full shaders?

Modding the opacity to ~0.25 instead of 1 in PlayerShip.DrawEffectMesh() seems to buff reduced shader cloak well.  We'll probably need to consider how to handle those running without reduced shaders (make this reduced version the MP standard?) balance-wise so they're in line.
this.m_spawn_mpb.SetFloat(Robot.matid_opacity, 1f);
https://clips.twitch.tv/VastBrightSoymilkPupper

The idea I'd like to see is to get reduced shaders as close to full shaders as possible so that players choose which is best for their system, not which is best for gameplay.
Reduced shaders at 0.25 seems to be more effective than full shaders, I cannot see the ship you're shooting at in that clip at all unless it's charging TB, being hit, or is backdropped by the skybox.  I can at least make out where the ship is with full shaders.  However, the discrepancy may be due to video compression.
Could you provide the transpile for this so I can play around with it?

I’ll send the code over when I’m back in town Sunday night.  I’ve got it configured at the moment as an adjustable float via the console so it’s easily testable.

@tobiasksu Let's go with 30%.  Please PR for 0.4!

30% fixed, no menu option right?

Correct.


Outdated packages

Packages that will still be outdated after #89
@dilyn-corner

[x] extra-cmake-modules 5.78.0 -> 5.79.0

@mmatongo

[x] ghc-bin 8.10.3 -> 9.0.1
[ ] tor <IP_ADDRESS> -> <IP_ADDRESS>, <IP_ADDRESS>
[x] libcap 2.47 -> 2.48

@aaronNGi

[x] socat <IP_ADDRESS> -> 2.0.0_b9, 2.0.0beta9, 2.0.0-b9, 2.0.0_beta9, <IP_ADDRESS>

@Ominitay

[x] i3-gaps 4.19 -> 4.19.1
[x] i3 4.19 -> 4.19.1

Orphaned (?)
Some of the outdated orphaned packages have been dropped in #89 that i felt were not very important, only these packages are left now.
dylanaraps

[x] imagemagick 7.0.10-60 -> 7.0.10+62, 7.0.10-62, 7.0.10_62, <IP_ADDRESS>
[x] libburn 1.5.2.pl01 -> 1.5.4
[x] libisofs 1.5.2 -> 1.5.4
[x] btrfs-progs 5.10 -> 5.10.1
[x] procps-ng 3.3.16 -> 3.3.17

djt3

[x] xwallpaper 0.6.5 -> 0.6.6

Bridouz

[x] syncthing 1.12.1 -> 1.13.1

mcpcpc
DROPPED

[x] libsamplerate 0.1.9 -> 0.2.1
[x] libsndfile 1.0.30 -> 1.0.31
[x] fldigi 4.1.17 -> 4.1.18

magenbluten

[ ] openvpn 2.4.9 -> 2.5, 2.5.0
[ ] pkcs11-helper 1.26.0 -> 1.27, 1.27.0
[x] iputils 20200821 -> 20210202

konimex

[ ] lvm2 2.03.10 -> 2.03.11

trbednarzyk

[x] fuse 3.10.1 -> 3.10.2

I can take over btrfs-progs, procps-ng, imagemagick, fuse, iputils

I am still happy to maintaini3[-gaps], I'll be updating them this weekend.

ecm will be bumped when it's no longer an rc (tomorrow).

I've updated 2 out of 3, I'll work on tor tomorrow.

@Vouivre @mmatongo @noocsharp Would you be willing to adopt a few packages from the orphaned list?

I'm fine with it.

I would adopt some if I used any of them, but I don't. Probably best to drop if no one takes them.

I'll take lvm2 and openvpn

@mmatongo Could you take over pkcs11-helper aswell? It's a dependency for openvpn
I'll take over libisoburn, libisofs, xwallpaper.
syncthing, libsndfile, libsamplerate, fldigi will have to be dropped.

i3[-gaps] have been bumped in #103

I'm in the same case as noocsharp. I don't use any of them. By name I know syncthing, but that's all. That's the reason why I dropped emacs: I still think it's good to have it in a distribution, but I don't use it anymore.
But I'm still open to adopt some of them. If some of them are important to have, just tell me which one and I could adopt them.

@Vouivre It would be nice if you could take syncthing, ill drop the 3 remaining packages.

Ok, I'll take it.

@Vouivre Yeah I think it would be good to have emacs in community since it's pretty popular. You can take back build files from kiss-graveyard

I also still have it locally. Ok, I bring it back.

@Vouivre you forgot to re-add gnutls

Sorry, I didn't check, I simply brought emacs back to the repo.

socat-<IP_ADDRESS> is here.
I think we should give up on submitting PRs to the original repo.

@aaronNGi Sorry i was running the outdated script on another branch which didn't have your PR merged. and yeah we should shift completely to this repo from kisslinux/community now.

All good.
Okey great, means I can cleanup my repos :)

Tor is gonna be a min

I see that mpd still hasn't been updated, according to this, I'd be happy to take over that if no-one has it.

@Xeno-Hypster There's an update to 0.22.6, you can send a PR if you use the package. It was orphaned but i just bumped it because it's probably a useful package.

Will do then, I do enjoy having my music.

@dilyn-corner will be handling such issues, since they're the BDFL now.


Non-deterministic configuration for RibbonCommandFactory in Zuul

The ZuulProxyConfiguration has a bunch of nested configuration classes that eventually choose an implementation of RibbonCommandFactory. I was seeing test failures because the wrong type was being selected, and it's easy to see that if HttpClientRibbonConfiguration is registered first it always wins because its conditions have matchIfMissing=true. So we need to control the order (or stop using 3 mutually dependent booleans to control one feature).

Fixed in c4e2466

Thanks dave


non-zero-ezit-code not work

Hi,
we are looking to develop a CI/CD for Kong that let us know if there are drifting in the configuration on kong and the one on our git repo.
We know that there is a parameter for the the deck diff command (non-zero-ezit-code) that let us know if there is an actual difference between two yaml file. The problem is that deck is giving us false positives logging changes to
"updated_at"
and
"created_at"
and this is happening only on some services. In other services with lots of routes it detects changes only in some routes so it has also this random behavior that we don't understand.
Deck version used is 1.5.0 and we are using Kong-Enterprise

Hello! Have you tried 1.5.1 version of Deck?
This issue should be fixed with it

Correct. This should be fixed with v1.5.1. Please re-open if otherwise.


Time to update your screen shots

FTP settings are now under Settings->Configuration->General Settings, Deployment Center no longer looks like that, and Quickstart no longer has an FTP panel.

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

ID: f6924846-3993-db7f-92c2-96a069bda515
Version Independent ID: b0ec25d1-8ea8-c0e4-304d-ab03692fa8e7
Content: Deploy content using FTP/S - Azure App Service
Content Source: articles/app-service/deploy-ftp.md
Service: app-service
GitHub Login: @cephalin
Microsoft Alias: cephalin

@degrover-cn Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

@degrover-cn The doc is now updated. Thank you for your feedback. #please-close


Style updates for new website.

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.


Run 'make upgrade-klone' and 'make generate'

Manual Makefile modules PR, which is required due to limited permissions of the self-upgrade job (which cannot update/ change github actions itself).
Kind
/kind cleanup
Release Note
NONE

/approve


How to make automatic browsing to images from database ?

I work in MVC 5 c# in visual studio 2015 web applications
I have table pictures in SQL server 2012 have two fields
ID
Image
ID have number of image inserted like 1,2,3,4,5
Image field store picture added
what i need actually browsing images found in table pictures in database from last image inserted to first in page
and browsing between every image and another 1 second automatically without using button or scroll
suppose i have 4 images in database in table pictures
after page open picture 4 display after 1 second picture 3 display after 1 second picture 2 display after 1 second picture 1 display .
How i do that please ?

You can retrieve the data set as normal.
Then you can reverse loop the data set or copy that data set to an empty data set in reverse order.
You have to use Asynchronous methods / Timer to browsing the images.

This type of question is a better fit for a site such as https://stackoverflow.com/.


chore(readme.md & blesta.tar.gz): reviewed Documentation link and bumped blesta to latest version

:tada: This PR is included in version 3.0.13 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


add C-Shell style prompt to BashSession lexer

This is related to issue #2591: SuSE uses a C-Shell style prompt like user@host:path>
Previously only prompts ending in $#% symbols were supported.

Thanks, but you need to update the golden test output with tox -- --update-goldens. The change looks reasonable to me if this is the prompt in SUSE, but there are tests that explicitly check this isn't done (specifically tests/snippets/console/fake_ps2_prompt.txt) so that needs to be updated.


Rails 5.1.0 removed "render text: ..."

Which version of ruby is the project developed on?
ruby-2.2.3
What is the rails version?
5.1.0
What is the ember-cli-rails version (from Gemfile)?
0.8.4
What is the ember-cli-rails-addon version (from package.json)?
~> 0.8.0 resolved to 0.8.0
What are the contents of the Rails' view that renders the Ember application?
Default
How are the EmberCLI-related routes defined?
via mount_ember_app.
Running a (empty/default) ember-cli-rails project yields the error:
You invoked render but did not give any of :partial, :template, :inline, :file, :plain, :html or :body option.

referencing this line:
https://github.com/thoughtbot/ember-cli-rails/blob/v0.8.4/app/helpers/ember_rails_helper.rb#L11
According to Rails CHANGELOG this was removed in 5.1.0:
https://github.com/rails/rails/blob/v5.1.0.rc1/actionpack/CHANGELOG.md
"Remove deprecated support to :text in render."
The new way would be :plain instead of :text. (Which exists since Rails 4.1 ? I am not sure about this though...) as discussed here:
http://stackoverflow.com/questions/43428991/what-to-use-instead-of-render-text-in-rails-5-1-and-later

Fixed by 0.8.5.


jsx - wrap attributes

Hi,
would you please add an option to wrap component attributes in JSX (one attribute per line) along with wrap-attributes-indent-size option
Input Before Beautification
This is what the code looked like before:
<TextInput style={styles.input} placeholder='city ...' onChangeText={(text) => this.setState({city: text})}/>

Expected Output
The beautified code should have looked like this:
<TextInput
  style={styles.input}
  placeholder='city ...'
  onChangeText={(text) => this.setState({city: text})}
/>

Thanks in advance.

The latest version of Pretty Diff already does this :  http://prettydiff.com/ (drop var a= at the front of the code sample so that the tool thinks its JSX instead of XML)
I just need to get it into Atom Beautify.  On a side note I believe JSX format is JavaScript that allows islands of XML.  If I am wrong please let me know.

good to know that, waiting for the upcoming release.
regarding the side note: actually JSX is converted back into JavaScript.

I know JSX compiles into JS, but I am not sure if JSX can be expressed without JavaScript external to the markup tags.  I will look into this, because if it is true then I have some work to do.

@prettydiff Hi. Do you have any idea when this will be available in Atom Beautify ?

Yeah, Atom Beautify gets Pretty Diff from NPM.  Pretty Diff last updated to there as version 1.16.37 about a year ago.  I have built a replacement distribution scheme.  I will recommend its inclusion to Atom Beautify soon.  See https://github.com/Glavin001/atom-beautify/issues/881#issuecomment-275969938
The goal here is to invert dependency management.  NPM forces the user to download each dependency in either the latest version or a specific version defined by the dependent application.  In my opinion the user should have to download 2 files to get an application: a zip and a hash file.  Dependency management and version control should be managed by the publisher so that the user just requests the application and it automatically works without configuration or additional assets like games off of Steam.

any update/progress on this ?

@ali-hellani The enabling issue is https://github.com/prettydiff/prettydiff/issues/409 and I will work this immediately after resolution of https://github.com/prettydiff/prettydiff/issues/268 which I am a good way through.

Good to know that and thanks for your efforts.

https://github.com/Glavin001/atom-beautify/pull/1520 has been merged.
Published to v0.29.18

How can I implement this? There's no option in the settings panel that I can see, and adding       force_attribute: true directly to the config.cson doesn't have any effect.

I don't think the force_attribute is available to Atom Beautify yet.  Atom Beautify is currently using an older version of Pretty Diff.


[Java] Custom Teams Endpoint (CTE) GA

Description
Preparing CTE for the GA:

Added mandatory parameters(appId, userId) to getTokenForTeamsUser
Added GA API version to ServiceVersion

Implementation TODOs

[x] Update Identity SDK to point to new CTE path

[x] regenerate implementation from a new swagger spec
[x] update recordings

[ ] changes regarding to ACS verification of App ID & UserId

[x] regenerate implementation from a new swagger spec - https://github.com/Azure/azure-rest-api-specs/pull/17930
[x] update client implementation
[x] update & add tests
[x] update recordings
[x] update README & CHANGELOG
[x] update tag and require path in swagger/README.md

[x] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API changes have been detected in com.azure:azure-communication-identity. You can review API changes here
API changes
-         V2021_10_31_PREVIEW("2021-10-31-preview");
+         V2021_10_31_PREVIEW("2021-10-31-preview"),
+         V2022_06_01("2022-06-01");
+         public static final CommunicationTokenScope EMAIL = fromString("email");

API change check for com.azure:azure-communication-identity
API changes have been detected in com.azure:azure-communication-identity. You can review API changes here

@AikoBB if you by any chance read this, could you please give me contributor rights to your branch?

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-communication-identity


Panic when parsing config defined functions with config defined variable args

When parsing a program using config defined functions, where an argument is a config defined variable, the parser panics with:
panic: runtime error: index out of range [recovered]
        panic: interface conversion: interface {} is runtime.errorString, not *parser.ParseError [recovered]
        panic: interface conversion: interface {} is runtime.errorString, not *parser.ParseError

goroutine 321 [running]:
testing.tRunner.func1(0xc000179a00)
        /usr/local/Cellar/go/1.11.4/libexec/src/testing/testing.go:792 +0x387
panic(0x118aea0, 0xc000386a50)
        /usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:513 +0x1b9
github.com/benhoyt/goawk/parser.ParseProgram.func1(0xc00011fe08)
        /Users/ash/src/go/goawk/parser/parser.go:59 +0x98
panic(0x11895e0, 0x130d8f0)
        /usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:513 +0x1b9
github.com/benhoyt/goawk/parser.(*parser).resolveVars(0xc000333180, 0xc000388310)
        /Users/ash/src/go/goawk/parser/resolve.go:260 +0x1caa
github.com/benhoyt/goawk/parser.(*parser).program(0xc000333180, 0xc000333180)
        /Users/ash/src/go/goawk/parser/parser.go:176 +0x8ca
github.com/benhoyt/goawk/parser.ParseProgram(0xc0000145a0, 0x16, 0x20, 0xc0000326e0, 0x0, 0x0, 0x0)
        /Users/ash/src/go/goawk/parser/parser.go:71 +0x147

The panic is reproducible with this unit test:
func TestConfigVarsWithNativeFuncs(t *testing.T) {
	funcs := map[string]interface{}{
		"foo": func(i int) int {
			return i
		},
	}
	prog, err := parser.ParseProgram(
		[]byte(`BEGIN { print foo(x) }`), &parser.ParserConfig{
			Funcs: funcs,
		},
	)
	if err != nil {
		t.Fatalf("error parsing: %v", err)
	}

	outBuf := &bytes.Buffer{}
	errBuf := &bytes.Buffer{}
	config := &interp.Config{
		Stdin:  strings.NewReader(""),
		Output: outBuf,
		Error:  errBuf,
		Funcs:  funcs,
		Vars:   []string{"x", "5"},
	}
	if _, err = interp.ExecProgram(prog, config); err != nil {
		t.Fatal(err)
	}

	exp := "5\n"
	normalized := normalizeNewlines(outBuf.String() + errBuf.String())
	if normalized != exp {
		t.Fatalf("expected %q, got %q", exp, normalized)
	}
}

At a glance it looks as though it's because config defined functions aren't tracked the same way as others and this breaks the way in which variable type inference is done.

https://github.com/benhoyt/goawk/pull/18 is my attempt at simply burying my head in the sand by disabling the check for this particular occurrence.

Thanks @Jeffail -- good find, and great bug report. I think your fix is reasonable, but need to check a few things. You can go ahead with your patch in the meantime if you want, and I'll look at it further in the next few days.
Love your use of GoAWK in benthos! Is benthos a work project, or a side/hobby thing?

Sounds good, no rush. It started as a hobby but it's been a work project for a couple of years now. Thanks for building this, it's an awesome project and I imagine we're going to get a lot of use out of it via Benthos.

Awesome, thanks @benhoyt!


refactor(theme): move theme token variables to sass map

so we can use tokens in default and overrides mixin
so we can override default theme by setting one global sass variable

Closes #395
Changelog
New

functions.scss and variables.scss to support mixin changes
carbon--theme-overrides mixin

Changed

Previous theme mixins replaced with carbon--theme mixin that can pass in an optional theme name as parameter (white, g10, g90, or g100)

Migration

carbon-components needs to change @include carbon--theme-white() to @include carbon--theme, and also needs to document how $carbon--theme global variable can be set to use a non-white theme

Thank you for the work @mattrosno! Here are my suggestions, so we don't have to lock this feature down to carbon-elements' 1.0 release:

Keep mixins like @mixin carbon--theme-g10, by making it an alias to: @include carbon--theme('g10')
Avoid changing the import path, or keep the old import path by making it an alias to the new import path

But if @joshblack agrees, just going with this PR is fine as the change seems fairly containable.

@mattrosno good point on the default theme, I think there should be a $carbon--theme variable that we can then use as the default value in the carbon--theme mixin 👍

@joshblack my recent commit moves variable declarations inside the mixin so importing doesn't automatically initialize the variables - so we can determine when we initialize variables to play nicely with carbon-components feature flag.
I also added a parameter to the mixin to conditionally set the !defaults keyword. Either we have two mixins, or one as I did. By having one, $carbon--theme, with naming not specific to "default" or "overrides", we can be forward thinking so if future refactoring means we can eliminate !default and !global flags over time, we can so in a non-breaking way. (May have to keep around a second param but not use it to prevent the breaking change.)
I also removed theme-- aliases so we encourage proper use of namespacing. I have not documented yet; will do after our Sass output feels good.
With my change, in carbon-components you import the themes.scss and then in the feature flag mixin, call @include carbon--theme();.
Application usage:
// import theme variables only if need them to set a non-white default theme
@import '../../src/globals/scss/vendor/@carbon/elements/scss/themes/variables';

// uncomment both to apply the g90 theme with $interactive-01 being pink
// $carbon--theme: $carbon--theme--g90; // use g90 for default theme
// $interactive-01: pink; // or, instead, only globally define specific variables

// carbon components
@import '../../src/globals/scss/styles';

// second parameter omits `!default` in variable reassignments
@include carbon--theme($carbon--theme--g90, false) {
  .my-dark-theme .foo {
    color: $interactive-03;
  }
}

my recent commit moves variable declarations inside the mixin so importing doesn't automatically initialize the variables - so we can determine when we initialize variables to play nicely with carbon-components feature flag.

Is there any harm to the auto-init? Will solve this problem in future sass versions and they should all have !default so they will play nicely with carbon-components


update rule syntax to support subscopes in dynamic analysis flavor

following #1539, update the rule syntax, parser, and validator to accept subscope statements in the dynamic analysis flavor, such as:
rule:
  meta:
    scope:
      dynamic: process
  features:
    and:
      thread:
        api: CreateFile
      thread:
        api: RegSetValueExA

Closed in #1580


Feature: Option for TextureFrame to keep aspect ratio when expanding

TextureFrame can be stretched (expanded), but it is not always desired. Would be great if it could have another stretch mode that would also preserve it's original aspect ratio.
A new node with equal functionality can also be an option, for example if HBoxContainer has cells that are 2x3 in size, if that node is inside it gets shrinked down to 2x2 and centered. (more like it's children become shrinked)
Something in this direction (just a quick implementation out of CenterContainer)

this already exist in 2.1, check the stretch_mode property

@reduz, I hope you're not talking about project settings, viewport stretching is out of the picture for me since I'm using viewports, and 2d stretching is awful. If you mean stretch_mode in textureframe, I tried italready, I haven't managed to scale stars the same way as in the picture without using scripts. Watch closely how they scale accordingly. It's making use of all the space available by hboxcontainer, without changing aspect ratio.

sorry, I completely misunderstood what you wanted to do, adding this asap

ok should be done now

Thanks, Flash xD I made a different node for this purpose earlier, but seems like an overkill, too many nodes already.


Implement the /crawl API

This api will post a job that will crawl some website ( using the API or not ) for the specific images.
A limit will be imposed ( let's say 50 images max ).
The API will post a job ( maybe return the job-id). When we query for crawl request we should see if it's job and and use that to determine if the job is pending, doing, done
Parameters for the crawl api :

site (facebook, instagram ... etc )
tag ( multiple )
post_date
width
height

Done


Looping over empty Array cases crash in IE

For loop over empty array causes application to crash in IE 11, win8.1.
http://stackoverflow.com/questions/500504/why-is-using-for-in-with-array-iteration-such-a-bad-idea

I see now that you already have IE issue in the TODO list.
How is the build procedure here? I'm quite new to npm and webpack, which makes it a bit confusing for me to make a PR.

Yes, this is same issue I have on my TODO. I've been delaying it but if there are people out there that requires it I will make sure I do it in the next few days. But I would gladly accept a PR from you if are willing to send one.
Uh! I guess we need some instructions for contributions. I will add that to the TODO list.
Meanwhile here are some instructions:
1. Install dependencies with
npm install

2. Do your changes
3. Test it manually because we don't have any automatic tests :disappointed:
3.1. Build the demo page for a quick test. (This will use your local working copy of the package)
npm run gh-pages

Open ./gh-pages/index.html in your browser and do your testing
3.2. Alternatively if you want to make a build to import in your own project
npm run dist

Then in your project do npm install /path/to/local-react-json-editor --save. An you will have your changed react-json-editor in your project for testing.
4. When your happy with your changes submit a PR. Please don't send any changes to ./dist.
It would be awesome if some one submitted a PR with a better guides then this to a CONTRIBUTING.md file :heart:

Your guide doesn't quite work. When running npm run gh-pages:
npm run gh-pages

><EMAIL_ADDRESS>gh-pages /Users/h/dev/logibit/react-json-editor
> webpack --config ./config/webpack.gh-pages.js

Hash: 4a59bf8af54c303e6b39
Version: webpack 1.12.9
Time: 1727ms
     Asset       Size  Chunks             Chunk Names
 bundle.js    66.8 kB       0  [emitted]  main
index.html  253 bytes          [emitted]
   [0] multi main 28 bytes {0} [built]
    + 20 hidden modules

ERROR in ./demos/index.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/logibit/react-json-editor/demos
 @ ./demos/index.js 11:12-28

ERROR in ./demos/app.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/logibit/react-json-editor/demos
 @ ./demos/app.js 3:12-28

ERROR in ./demos/demo.jsx
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/logibit/react-json-editor/demos
 @ ./demos/demo.jsx 3:12-28

ERROR in ./~/react-ghfork/dist/react-ghfork.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/logibit/react-json-editor/node_modules/react-ghfork/dist
 @ ./~/react-ghfork/dist/react-ghfork.js 3:27-43

ERROR in ./dist/react-json-editor.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/logibit/react-json-editor/dist
 @ ./dist/react-json-editor.js 3:27-43

@haf I know I'm a bit late, but did you found a way around it? Did npm install fix that error?

Afraid I haven't been able to go any further with this after not getting into the environment properly.


error lesson 13 in the translation into Spanish / comparisons section

This was fixed some time ago it seems, closing as a result


Fix test to avoid checking for named IR values

The previous change to the DebugInfo/linetable-cleanups.swift test
introduced FileCheck patterns with references to named IR values. In a
release build, the values are anonymous, so those patterns do not match.
rdar://problem/35639381

@swift-ci please test and merge


Add support for data-* attribute

Per my understanding of the HTML5 recommendation we should be relying on data-* attributes for custom element attributes.  Currently the bootstrapper only supports aurelia-app and not data-aurelia-app.
I don't mind submitting a pull request for it but I wanted to make sure there wasn't a reason it isn't already supported before doing so.

We would be interested in a a pr to add this but we cannot remove the existing attribute support. It's our understanding that data- isn't really that important anymore. We're happy to support it if you submit the pr though.


Update CONTRIBUTING doc

[ ] Added an entry to CHANGELOG.md if this change could be valuable to users

Thank you Jakub, Dongdong!


Add LGTM code quality badges

Hi there!
I thought you might be interested in adding these LGTM code quality badges to your project. They indicate how you care about code quality and encourage your future contributors to do the same.
To get an idea of the analyses reflected by these grades, check the alerts discovered by LGTM.
N.B.: I am on the team behind LGTM.com, I'd appreciate your feedback on this initiative, whether you're interested or not, if you find time to drop me a line. Thanks.

not sure we want to pilot code badges on a critical repo. Sometimes, these things result in work or confusion, no offence. Maybe try first on an openzipkin-contrib repo?

Hi @adriancole
Thanks for the feedback and the advice. No offence taken at all.
Let me know if you have feedback on the tool and service itself (if you find time of course)
Cheers


Timeout Cancellation

There should be a way to cancel a timeout request.

So I understand correctly, you want to set a timeout on a subscription and then cancel that timeout?

Feel free to submit PR.

Fair enough.


Update stable version in repo to 1.0.10

Think about update stable version to 1.0.10
Version: stable=1.0.4 (524 days old) => latest=1.0.10 (39 days old)
Installs: stable=148 (63.52%), latest=62 (26.61%), total=233
Click to edit

https://github.com/ioBroker/ioBroker.repositories/pull/663


Still Maintained?

I was wondering if this was still maintained? I see a lot of open issues, PR's, and forks.

Yes - feel free to send any pull reqs and we'll look them over!


Bug in network partition detection logic?

Scenario 3 nodes: s1, s2 and s3
Kill s1 (current leader)
Noticed that s2 repeatedly gets elected leader and immediately steps down suspecting a network partition.
Here are the relevant logs for s2:
13:35:35.542 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Heartbeat timed out in PT1.4S 13:35:35.542 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Polling members [Address[localhost/<IP_ADDRESS>:5001], Address[localhost/<IP_ADDRESS>:5003]] 13:35:35.542 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Polling Address[localhost/<IP_ADDRESS>:5001] for next term 114 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Polling Address[localhost/<IP_ADDRESS>:5003] for next term 114 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Received accepted poll from Address[localhost/<IP_ADDRESS>:5003] 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Transitioning to CANDIDATE 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.FollowerState - Address[localhost/<IP_ADDRESS>:5002] - Cancelling heartbeat timer 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Starting election 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Set term 114 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Voted for Address[localhost/<IP_ADDRESS>:5002] 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Requesting votes from [Address[localhost/<IP_ADDRESS>:5001], Address[localhost/<IP_ADDRESS>:5003]] 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Requesting vote from Address[localhost/<IP_ADDRESS>:5001] for term 114 13:35:35.543 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Requesting vote from Address[localhost/<IP_ADDRESS>:5003] for term 114 13:35:35.544 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Received successful vote from Address[localhost/<IP_ADDRESS>:5003] 13:35:35.544 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Transitioning to LEADER 13:35:35.544 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.c.server.state.CandidateState - Address[localhost/<IP_ADDRESS>:5002] - Cancelling election 13:35:35.544 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Found leader Address[localhost/<IP_ADDRESS>:5002] 13:35:35.560 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.LeaderState - Address[localhost/<IP_ADDRESS>:5002] - Sent AppendRequest[term=114, leader=2130712286, logIndex=742033, logTerm=1, entries=[325], commitIndex=787602, globalIndex=787570] to Address[localhost/<IP_ADDRESS>:5001] 13:35:35.575 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.LeaderState - Address[localhost/<IP_ADDRESS>:5002] - Sent AppendRequest[term=114, leader=2130712286, logIndex=742031, logTerm=1, entries=[327], commitIndex=787602, globalIndex=787570] to Address[localhost/<IP_ADDRESS>:5003] 13:35:35.575 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.LeaderState - Address[localhost/<IP_ADDRESS>:5002] - Starting heartbeat timer 13:35:35.575 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] WARN  i.a.copycat.server.state.LeaderState - Address[localhost/<IP_ADDRESS>:5002] - Suspected network partition. Stepping down 13:35:35.575 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] INFO  i.a.copycat.server.state.ServerState - Address[localhost/<IP_ADDRESS>:5002] - Transitioning to FOLLOWER 13:35:35.575 [copycat-server-Address[localhost/<IP_ADDRESS>:5002]] DEBUG i.a.copycat.server.state.LeaderState - Address[localhost/<IP_ADDRESS>:5002] - Cancelling heartbeat timer
My hunch is that the logic in place for a leader to detect if it is partitioned away is causing this.
When a AE request to a follower fails we immediately check to see if the leader is partitioned by checking when the last successful commit happened. I feel this check should include the time when the leader's term started.
So perhaps the check ought to be:
System.currentTimeMillis() - Math.max(commitTime(), termStartTime) > context.getElectionTimeout().toMillis() * 2

Ahh good point. That makes sense.
The leader now also stores the index of its no-op entry which has to be committed before the leader will commit entries from previous terms. This could be used to prevent the leader from stepping down until it's able to commit an entry from its term. Essentially, the condition becomes commitIndex >= leaderIndex. Once the leader is able to commit its no-op entry we know it was able to talk to a majority and if that majority is lost the partition detection can cause the leader to step down.
But this approach does have the potential to prevent the leader from stepping down altogether if a follower crashes right when the leader is elected and the leader can't commit an entry from its term and so will never check for partitions. That doesn't cause any safety issues since if it can't commit its no-op entry it can't commit commands either, but it's something to think about.
I think storing and using the term start time is probably fine since it won't prevent the leader from stepping down in that scenario.


Create JupyterNotebook.gitignore

Reasons for making this change:
Make Jupyter Notebook repository clean.
Links to documentation supporting these rule changes:
https://stackoverflow.com/questions/36306017/should-ipynb-checkpoints-be-stored-in-git
If this is a new template:

Link to application or project’s homepage: http://jupyter.org/

@mosdeo apologies for the delay in replying to this.
I had a lot of these templates requested, but I couldn't quite figure out the right place for them. I ended up settling on #2857, and the Jupyter Notebooks template now lives at community/Python/JupyterNotebooks.gitignore.
Feel free to add any further changes there, and thanks again for the contribution!


Serialization of custom resources on the network

Godot version:
v3.1-stable
OS/device including version:
ArchLinux rolling
Issue description:
There does not seem to be a generic way of serializing custom Resource classes. This requires every resource to be serialized/de-serialized to/from JSON before sending them via RPC. If this is not going to be implemented, I think it would be good to add a new entry to networking documentation describing what can be serialized by Godot and what does not.
Currently documentation mentions that Godot in fact can serialize resources, but it does not seem to work for custom resources.
Steps to reproduce:
# foo.gd
extends Resource
class_name Foo
export (int) var answer = 42

# bar.gd
extends Node
sync func take_this_resource(resource):
    print(resource)  # Prints [Resource], but it does not have the "answer" field.

func _ready():
    some_node.rpc('take_this_resource', Foo.new())

This requires to implement a lot of boilerplate methods like serialize(instance) and restore(data) and call methods like this:
# foo.gd
extends Resource
class_name Foo
export (int) var answer = 42

func serialize():
    return {'answer': self.answer}

func restore(data):
    self.answer = data.answer
    return self

# bar.gd
extends Node
sync func take_this_resource(resource_data):
    resource = Foo.new().restore(resource_data)
    print(resource)  # Prints [Resource] with properly defined "answer" field.

func _ready():
    some_node.rpc('take_this_resource', Foo.new().serialize())

Are there any other out-of-the-box solutions that I'm missing here?

If anybody could point where does resource serialization happen in sources, I could work on PR to implement this.

I ran into this too and did some poking around. Turns out, there is an out-of-the-box solution:
get_tree().get_multiplayer().allow_object_decoding = true

Might make a docs PR pointing that out later.

See https://github.com/godotengine/godot/pull/27485 for context (CC @Faless).
Though @and3rson reported this against 3.1-stable, while this fix was added in 3.1.1-stable / 3.2-stable, so not sure if it was exactly the same issue.

If I understand correctly, this has been documented and no further action seems to be envisioned, so this issue might no longer be relevant ?

Closed as this is documented in the engine reference, we might want to open an issue/PR in godot-doc if it's not mentioned in the networking tutorials.


[FormRecognizer] Updated Form Recognizer sanitized properties

Long story short, this is the timeline of events that caused the bug we're fixing in this PR:

Test Framework introduces a bug that prevents tests from correctly finding mismatches in Playback mode.
A miscopy updates the FR live test base constructor, sanitizing the wrong property. This would make tests fail, but this goes undetected because of the Test Framework bug.
The Test Framework bug is detected and fixed. The FR bug is exposed.
We're fixing the FR bug now.

Fixes https://github.com/azure/azure-sdk-for-net/issues/27701.

API change check for Azure.AI.FormRecognizer
API changes are not detected in this pull request for Azure.AI.FormRecognizer


Just deploy it with ARM

It would be really nice to have a deploy from zip option in the ARM template. Or even better an option to deploy from a repo but without creating in the repo action or an azure pipeline.
So you can basically archive the ability to add the deploy to azure button, for your repo, and the user of the Application must just deploy it without bothering to connect a build system or something else to it.
So it is easier to share done solutions that are for example codewise is hosted on github, and N customers just deploy it with a ARM template in there subscriptions. The ARM template would look like:
                "apiVersion": "2021-01-15",
                "name": "[parameters('name')]",
                "type": "Microsoft.Web/staticSites",
                "location": "[parameters('location')]",
                "tags": "[parameters('resourceTags')]",
                "properties": {
                    "repositoryUrl": "[parameters('repositoryUrl')]",
                    "branch": "[parameters('branch')]",
                    // This shouldn't be needed for this usecase.
                    //"repositoryToken": "[parameters('repositoryToken')]",
                    "buildProperties": {
                        "appLocation": "[parameters('appLocation')]",
                        "apiLocation": "[parameters('apiLocation')]",
                        "appArtifactLocation": "[parameters('appArtifactLocation')]"
                    }
                },

Thank you for the feedback @paule96 . related to #7

Hi there,
We have a similar use case, where we've developed an SWA with a linked Function App as a (bring your own function) API, and want to allow customers to deploy these resources, as well as the SWA's (pre-built) assets (just three files - an index.html, main.js and style.css), using an ARM template (compiled from a Bicep file). Is there any way to achieve this yet?

There is another business need to deploy your application with your infrastructure. In Azure there are many components Azure Events.
These events can fire to webhooks. But that is only allowed if the remote endpoint answers correctly to the validation request. This must happen while the deployment of the event happens. Because you deploy the Events also over ARM you have currently only the following option:

Deploy your infrastructure (without events)
Deploy your static webApp app into your static webApp resource
Deploy your infrastructure (only events)


attempting to clear error after truncation fails

Obviously, we should not attempt to clear an error that we don't have access to. We should only try to clear the error in the logfile.
Somehow these errors are not being cleared in the logfile either

ID: 621, 00:01:07, Sample error message 1.22, ACTIVE
ID: 622, 00:01:07, Sample evenCLEAREDge 2; 76; 55.4
ID: 623, 00:01:07, Sample error message 1.22, CLEARED


CNPJ validation

Validate CNPJ when registering, via this website: https://publica.cnpj.ws/cnpj/55342254000180

That website has a rate-limit which is pretty limiting. Find another solution


Fix truncate punctuation mark by mistake

Previously, if a whole 'mtu' or 'bip' expression ends with a punctuation mark
on the end of line, user have to manually add additional space to prevent
truncate the mark by mistake. So use sed to add space before 'mtu' and 'bip'
replacement.

I signed it!

docker-multinode has been removed so I'm going to close this PR.

This change is


Version bump please? 🙏🏼

I noticed in the source it has useful improvements like the markdown table including the PR status. Looks like that might be part of a 0.1.7 release, right now crates just has 0.1.6.
Would it be possible to bump the version?

Although it turns out v0.1.7 doesn't work yet, so that's probably why the author hasn't published it yet.
If this were in JS I'd be hacking away on it in an instant, but I still need to go through baby steps of rust before working on something like this.
Here's to hoping more improvements are forthcoming, I really love this project!


Add ChatGPT fine-tuned model option

@ldhoax thanks for the PR.
I think the main point would be to be able to configure the model (specifically model name) used?
Current approach in OpenGPTs is a bit rigid. I hope that will be changed in the future to a configuration that live in the database.

I agree that the current approach is a bit rigid :smile: but I think it's a bit inconvenient and difficult to work with just config in the database, for several reasons:

With new agents (like google_agent, xml_agent), we still need new code to handle
And in my case, I just used one OpenAI key for my fine-tuned model, I think it doesn't really need a database for that key :smile: and also a bit insecure.

I think our expectation is just to add new model name to an existing object (like AgentType) every time a new model becomes available. How do you think @mkorpela :thinking:


Flutter android.graphics.ImageDecoder fails to decode jpg image

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

use Android version 13 for the testing machine and flutter 3.10.6
put some sample jpg files in the directory path of join(appDocumentsDirectory.path, 'images'
run the code sample

Expected results
index on the left, actual images on the right
Actual results
index on the left, an image with "Exception: Invalid image data" underneath of a red box with a red "X" inside of it
Code sample
Code sample
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:image/image.dart' as widget;
import 'package:path_provider/path_provider.dart';
import 'package:path/path.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FTP ListView Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  List imgFiles = [];
  @override
  void initState() {
    super.initState();
    _getImages();
  }

 Future<void> _getImages() async {
    try {
      Directory appDocumentsDirectory = await getApplicationDocumentsDirectory();
      //creates a directory called "images" for images in the app's designated memory
      Directory directory = Directory(join(appDocumentsDirectory.path, 'images'));
      List<FileSystemEntity> fileList = directory.listSync();

      for(FileSystemEntity e in fileList){
        if(e is File && e.path.toLowerCase().endsWith('.jpg')){
          imgFiles.add(e.path);
        }
      }

      setState(() {});
    } catch (e) {
      if (kDebugMode) {
        print('Error: $e');
      }
    }
  }

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Local JPG List Example'),
      ),
      body: ListView.builder(
        itemCount: imgFiles.length,
        itemBuilder: (context, index) {
          return ListTile(
            leading: Text((index + 1).toString()),
            title: Image.file(File(imgFiles[index])),
            onTap: () {
              // Handle tile tap (e.g., open the image)
            },
          );
        },
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Logs
Logs
======== Exception caught by image resource service ================================================
The following _Exception was thrown resolving an image codec:
Exception: Invalid image data

When the exception was thrown, this was the stack:
#0      _futurize (dart:ui/painting.dart:6637:5)
#1      ImageDescriptor.encoded (dart:ui/painting.dart:6494:12)
#2      instantiateImageCodecWithSize (dart:ui/painting.dart:2291:60)
#3      PaintingBinding.instantiateImageCodecWithSize (package:flutter/src/painting/binding.dart:182:15)
#4      FileImage._loadAsync (package:flutter/src/painting/image_provider.dart:1598:20)
<asynchronous suspension>
Path: /data/user/0/com.example.place_holder_name/app_flutter/images/some_jpg.jpg
====================================================================================================
E/FlutterJNI( 9097): Failed to decode image
E/FlutterJNI( 9097): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI( 9097): 	at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI( 9097): 	at android.graphics.ImageDecoder.-$$Nest$smnCreate(Unknown Source:0)
E/FlutterJNI( 9097): 	at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:242)
E/FlutterJNI( 9097): 	at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:2015)
E/FlutterJNI( 9097): 	at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:2008)
E/FlutterJNI( 9097): 	at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:538)

Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version 10.0.19045.3208], locale en-US)
    • Flutter version 3.10.6 on channel stable at C:\Users\genac\flutter\flutter_3.10.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (4 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
    • Android SDK at C:\Users\genac\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0-rc2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33829.357
    • Windows 10 SDK version 10.0.19041.0
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop
      development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] IntelliJ IDEA Community Edition (version 2022.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1.4
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (4 available)
    • SM G991U1 (mobile) • R5CR715D70Y • android-arm64  • Android 13 (API 33)
    • Windows (desktop)  • windows     • windows-x64    • Microsoft Windows [Version 10.0.19045.3208]
    • Chrome (web)       • chrome      • web-javascript • Google Chrome 115.0.5790.110
    • Edge (web)         • edge        • web-javascript • Microsoft Edge 115.0.1901.188

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Hi @carra-hamner. Thanks for filing this issue. I can't seem to reproduce this on my device Android 9 though, is this specific to Android version 13, also, are there specific jpg images that this reproduces with (if possible, you could as well share a link to the images that reproduces this issue).

Hi @dam-ease . Thank you for replying to me. The problem was not rooted in Flutter official codes, but in a community package (FTPConnect). After some research, I have found the solution to the issue. The problem was rooted in Dart package "ftpconnect" (import 'package:ftpconnect/ftpconnect.dart';); its default FTP transfer format is for text files, not for binary files. Therefore, I downloaded these jpg files as text files and was unable to retrieve them in my Flutter app.
(for whoever faced the same problem, please follow this link: https://github.com/salim-lachdhaf/dartFTP/issues/21)


The 5V Arduino SD modules might work with a simple trick

Hi,
I believe blue 5V Arduino SD modules work with 3v3 devices with a simple trick. These feature a 74LVC125A and an AMS1117 3v3 LDO. If you bypass the LDO (connect the 3v3 supply to the ldo's 3v3 pin), the module seems to work fine.
Though, of course, modules designed for 3v3 could be better suited, especially those from known brands.
If the resistors are used as dividers, everything should work fine as long as the 74LVC125A's inputs are above 2V when high.

Ah, so you're bypassing the LDO to avoid the dropout?
I'm working on developing my own Pico oriented SD card board; something that could go right on the Pico, perhaps in a "hat"-like stackable design like this RTC module:

(https://www.waveshare.com/wiki/Pico-RTC-DS3231)
There are so many possible configurations. Since these could be pretty small (no need to be a full-size "hat"), and JLCPCB's lowest prices go up to 100mm x 100mm, I'm thinking of designing a "panelized" board containing a few different configurations. That would help keep costs down since one board from JLCPCB would contain multiple units of the SD card board.
One module I'm considering would be arranged like this:

Pico GPIO
Function

GP2
CLK/SCK

GP3
CMD/COPI (or Peripheral's SDI)

GP4
DATA 0/CIPO (or Peripheral's SDO)

GP5
DATA 1

GP6
DATA 2

GP7
DATA 3/CS

GP9
Card Detect

which would be useable on SPI0 or with SDIO.

If mounted directly on the Pico, it should be capable of very high speeds.

Nice idea! So one ordered PCB will actually contain multiple SD modules (in order to cut costs), and you're going to split them yourself, right?

Yes, like this:

Not only to cut costs, but to have more than one configuration. Another dual use (SPI & SDIO) configuration could be:

GPIO
Pico Pin
Function
SPI
SPI signal
SDIO

GP10

CLK/SCK
SCLK
SPI1_SCK
CLK

GP11

CMD/COPI (or Peripheral's SDI)
MOSI
SPI1_TX
CMD

GP12

DATA 0/CIPO (or Peripheral's SDO)
MISO
SPI1_RX
D0

GP13

DATA 1

D1

GP14

DATA 2

D2

GP15

DATA 3/CS
SS (or "CS")

D3

GP9?

Card Detect

I'm also thinking of some minimal small boards for, say, SPI only, or even 1-bit SDIO (which no-OS-FatFS-SD-SPI-RPi-Pico does not yet support, but there is the old pico_sd_card implementation). For short boards, getting to the 3V3 pin is a problem unless you're up at the USB end of the Pico. But, that could be solved with a jumper. SDIO can be moved around more easily than SPI. I need to look at how the Pico-W is laid out.

And yes, I tried the bypass trick (basically directly supplying 3.3v from the Pico) since I had one of those modules around :)

Maybe you could take a photo?

Maybe you could take a photo?

Yes, it's just a simple jumper soldered to the LDO's 3.3v, which is then connected to the Pico:

The other pins are connected as usual, and the Vcc pin is unused.

I need to look at how the Pico-W is laid out.

I think the pinout is similar, if not the same (except the LED is connected to the WiFi module and the SWD pins' position has changed).
I like your ideas. Good luck with this project!
By the way (maybe I should open another issue for this?), is there any easy way to check whether the SPI bus is in use by the SD card? For example, when you want to use an SD card and another SPI device on the same bus, you would want to check whether the DMA transfer has finished before switching the CS pin and sending data to the other device (to avoid race conditions). I took a quick at your library's internals, and perhaps I could use the SD object's mutex attribute and the mutex_try_enter() SDK function like this: mutex_try_enter(sd_init_driver(0)->mutex)?

Maybe you could take a photo?

Yes, it's just a simple jumper soldered to the LDO's 3.3v, which is then connected to the Pico:  The other pins are connected as usual, and the Vcc pin is unused.

Thanks. That might be worth adding to the README.

...
By the way (maybe I should open another issue for this?), is there any easy way to check whether the SPI bus is in use by the SD card? For example, when you want to use an SD card and another SPI device on the same bus, you would want to check whether the DMA transfer has finished before switching the CS pin and sending data to the other device (to avoid race conditions). I took a quick at your library's internals, and perhaps I could use the SD object's mutex attribute and the mutex_try_enter() SDK function like this: mutex_try_enter(&sd_init_driver(0)->mutex)?

At the low level, there is dma_channel_is_busy(spi_p->rx_dma). But, the mutex protects whole transactions against interruption, so that is probably a better approach. Maybe you could add another higher-level mutex to control access to the SPI bus itself. The library's mutex was designed to keep multiple threads using the library from interfering with one another.

Maybe you could take a photo?

Yes, it's just a simple jumper soldered to the LDO's 3.3v, which is then connected to the Pico: ... The other pins are connected as usual, and the Vcc pin is unused.

Thanks. That might be worth adding to the README.

Yes, sure.

By the way (maybe I should open another issue for this?), is there any easy way to check whether the SPI bus is in use by the SD card? For example, when you want to use an SD card and another SPI device on the same bus, you would want to check whether the DMA transfer has finished before switching the CS pin and sending data to the other device (to avoid race conditions). I took a quick at your library's internals, and perhaps I could use the SD object's mutex attribute and the mutex_try_enter() SDK function like this: mutex_try_enter(&sd_init_driver(0)->mutex)?

At the low level, there is dma_channel_is_busy(spi_p->rx_dma). But, the mutex protects whole transactions against interruption, so that is probably a better approach. Maybe you could add another higher-level mutex to control access to the SPI bus itself. The library's mutex was designed to keep multiple threads using the library from interfering with one another.
EDIT: Also, take heed of ChaN's Cosideration on Multi-slave Configuration.

Alright, thanks! I've noticed that spi_t also has a mutex attribute. Maybe I could use this one instead.

I've noticed that spi_t also has a mutex attribute. Maybe I could use
this one instead.

Right, the library supports multiple SD cards per SPI as well as multiple
SPIs. An SD card can only do one thing at a time, and an SPI bus can only
do one thing at a time. But, where possible (e.g., two cards are on
separate buses [whether SPI or SDIO], multiple SD cards should be able to
work in parallel.
On Thu, Aug 31, 2023 at 1:28 PM CMD @.***> wrote:

Maybe you could take a photo?
Yes, it's just a simple jumper soldered to the LDO's 3.3v, which is then
connected to the Pico: ... The other pins are connected as usual, and the
Vcc pin is unused.
Thanks. That might be worth adding to the README.
Yes, sure.
By the way (maybe I should open another issue for this?), is there any
easy way to check whether the SPI bus is in use by the SD card? For
example, when you want to use an SD card and another SPI device on the same
bus, you would want to check whether the DMA transfer has finished before
switching the CS pin and sending data to the other device (to avoid race
conditions). I took a quick at your library's internals, and perhaps I
could use the SD object's mutex attribute and the mutex_try_enter() SDK
function like this: mutex_try_enter(&sd_init_driver(0)->mutex)?
At the low level, there is dma_channel_is_busy(spi_p->rx_dma). But, the
mutex protects whole transactions against interruption, so that is probably
a better approach. Maybe you could add another higher-level mutex to
control access to the SPI bus itself. The library's mutex was designed to
keep multiple threads using the library from interfering with one another.
EDIT: Also, take heed of ChaN's Cosideration on Multi-slave Configuration
http://elm-chan.org/docs/mmc/mmc_e.html#spibus.
Alright, thanks! I've noticed that spi_t also has a mutex attribute.
Maybe I could use this one instead.
—
Reply to this email directly, view it on GitHub
https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico/issues/83#issuecomment-1701665444,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL6MY4JHXH4IQG3DQBNLAMDXYDQVLANCNFSM6AAAAAA4EIWAWA
.
You are receiving this because you commented.Message ID:
@.***>


UIIDs not correct for DIY mode

A Sonoff D1 with v3.5.0 running in DIY mode returns a 'new' UIID: diylight

And although it reports API v1 it actually does implement api v2:
`$ curl -d '{"deviceid":"", "data":{}}' -H "Content-Type: application/json" -X POST http://x.x.x.x:8081/zeroconf/info
{"seq":25,"error":0,"data":{"deviceid":"1000xxxxxx","switch":"on","startup":"on","brightness":25,"brightMin":0,"brightMax":255,"mode":0,"otaUnlock":false,"fwVersion":"3.5.0","ssid":"xxxxxx","bssid":"x:x:x:x:x:x","signalStrength":-62}}
$`
Also a BASICR3 in DIY mode returns a 'new' UIID: diy_plug:

;-))

These are exactly the DIY models that I have in my setup so be glad to help testing if it helps.

@MarcoV-git do you see any reason to add the new UIID of the BASICR3 with the latest firmware? The fact that is not identified properly, will add it by default as switch which is what the BASICR3 does. Any comment is more than welcome. Thank you!

Thanks! Fixed in latest master-version. Will be in next release.


The ego vehicle sometimes does not make lane change behind the NPC Vehicle.

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I'm convinced that this is not my fault but a bug.

Description
Hi team,
I'm currently running Autoware with Carla, and I met a situation that the ego vehicle sometimes does not make lane change behind the NPC Vehicle.
Here are the videos: [frontview] and rviz below:
https://github.com/autowarefoundation/autoware.universe/assets/50267797/b10979de-e800-437d-813b-b023dc7a82e7
At the start of the rviz video, the trajectory for lane change instantly show up, but it disappears right away.
Also, at 0:03, the lane changing trajectory also appears, but only the straight trajectory remains.
So the ego vehicle stops forever behind the stopping vehicle.
However, I'm confused as I also observed sometimes the lane change is successful: [frontview2]
As you can see in the frontview2 video, every NPC Vehicles and the starting point of the ego vehicle are the same, but the ego could change lane and successfully goes to the destination.
Expected behavior
I hope changing lane always to be successful.
Actual behavior
But sometimes the ego vehicle cannot properly make lane change.
Steps to reproduce
Here's the ros2bag file for the reproduction: [ros2bag]
Versions

Autoware: 20240115, prebuilt docker
Carla: 0.9.13
OS (host): Ubuntu 20.04
OS (docker): Ubuntu 22.04

Possible causes
No response
Additional context
No response

@Kim-mins Sorry to bother you. I'm also learning on the scenario about the ego vehicle making lane change. I have tried the bridge zenoh_carla_bridge and open_planner. But I can't reappear the lane changing scenario when the ego vehicle runs behind the NPC vehicle, even not lane change trajectory like what you presented, only the straight trajectory. Do I need to write additional code for this in the bridge or does my lanelet2 map not support lane changing?

Hi @TianYifan-Vincent!
For the lane change, you should modify the lanelet2 map file.
I referred to the map file provided here, and modified the lanes around the starting point of the video above.

@Kim-mins Thanks for your help! Indeed this awsim map is more standardized and detailed. The lanelet2 map file can be used and modified in autoware, but how to create the corresponding Carla map?

Actually, I don't know how to create carla map either.. I just partially modified the carla map file referring to the lines for supporting lane change from awsim's map.

@Kim-mins Thanks for your help! Indeed this awsim map is more standardized and detailed. The lanelet2 map file can be used and modified in autoware, but how to create the corresponding Carla map?

Hi, you can use RoadRunner to create the corresponding Carla map.

Sorry for late response @sgNicola.
Thank you for the information! I'll try it soon!

Hi guys I may find the solution of this proble, see issues below:
https://github.com/orgs/autowarefoundation/discussions/4577
https://github.com/hatem-darweesh/op_agent/issues/3

Thank you for sharing @equantumWang.
Actually, as I mentioned in this comment, I aware that the map file does not support lane changing itself, so I already modified the map to support it.
This issue is regarding the lane changing functionality of Autoware, which does not support lane changing properly even when the map supports lane changing.
Thanks.


More concise MatchGroup

Turns out using:

Groups in matches
Optional groups in matches
Optional groups in matches with coalesce to other groups
is a really freaquent usage of API.

Suggestions below:

pattern($p)->match($s)->first(function (Match $match, array $match) {
    $match->group('val')->text() == $match['val'];
    $match->group(1)->text() == $match[1];
});

Same for replacing, foreach, map, etc.
Pros: 0
Cons: First paremeter is useless

pattern($p)->match($s)->first(function (string $match) {
  // $match is group `0`
});

pattern($p)->match($s)->first(function (array $match) {
  // $match are all groups, with `null` if they're optional
});

Same for replacing, foreach, map, etc.
Pros: 0
Cons:

No method for coalesce, except ??
Every Match method must be changed

pattern($p)->match($s)->first(function (Match $match) {
    $match->group('val')->text() == $match['val'];  // ArrayAccess
    $match->group(1)->text() == $match[1];  // ArrayAccess
});

Pros:

No changing of every method that calls Match
Can react to invalid group
Cons:
Match gets "dirty"
Unwanted ArrayAccess methods pollution (maybe not include ArrayAccess in Match interface, only implementation?

pattern($p)->match($s)->first(function (Match $match) {
    $groups = $match->asArray();
});

Pros:

Most Clean
Very easily testable
Cons:
Additional line for the users

Should
isset($match[-1])

throw an exception?

isset() and empty() both call \ArrayAccess.offsetExists().
array_key_exists() doesn't call \ArrayAccess.offsetExists() (calling it on object is deprecated since PHP 7.4, so we should ignore it).
We might create a frankenstein-like-array, that works with isset, empty and [], but not with other array functions like array_map() :/
isset($match[-2]); // false
isset($match['missing']); // false
isset($match['unmatched']); // true
isset($match['empty']); // true
isset($match['matched']); // true

empty($match[-2]); // invalid
empty($match['missing']); // Nonexistent
empty($match['unmatched']); // true
empty($match['empty']); // true -- useless
empty($match['matched']); // false.

$match[-2]; // \Invalid
$match['missing']); // Nonexistent
$match['unmatched']); // null
$match['empty']); // string ""
$match['matched']); // string "foo"

I have serious doubts about this ArrayAccess being implemented.
On one hand, it's handy. On the other, empty() treats empty string or even "0" as not matched, array_key_exists() don't work, other array methods won't work. isset() could throw for invalid group, but that's just weird for isset() to throw.
So maybe it's just not worth it.

We could make $match->toArray() that returns:
[
  0 => '12cm',
  1 => '12',  'value' => '12',
  2 => 'cm',  'unit' => 'cm'
];

but it kinda already exists with $match->namedGroups()->texts() which returns
[
  'value' => 12,
  'cm' => '12'
];

and same for indexedGroups()

I just found out that '100' is treated as int, instead of string in ArrayAccess.offsetExists(). :/
This is probably caused by this PHP bug: https://bugs.php.net/bug.php?id=63217 reported in 2012, and then explicitly rejected by PHP dev 5 years later. :/
So \ArrayAccess won't happen in Match, because of the horrible design. (added one con to the post above).

Instead, we'll do something like this:
pattern($p)->match($subject)->first(function (Match $match) {
  $array = $match->toArray();
});

or
pattern($p)->match($subject)->asArray()->first(function (array $match) {
  echo $array[0];

});

This has two adventages:

we work on real arrays (so every con from 2 posts up is fixed)
bypassing php bad design


[tests-only] Trigger CI

To see if anything is failing.

It passes first time. CI is OK in master. So some commit id bump... in #1168 is causing a aproblem.

It passes first time. CI is OK in master. So some commit id bump... in #1168 is causing a aproblem.


Ionic 1x commands not executing!

I've installed ionic a couple of times now, but still the commands are not running
Cordova works ok but not ionic. The ionic commands don't seem to finish execution. I don't know what the issue is. I've tried countless solutions such as reinstalling node, cordova and ionic itself even installing different versions, resetting registry but still the same issue. Currently the ionic version is 1.7.16, node 4.4.7, npm 2.15.8

This issue was moved to driftyco/ionic-cli#1232


Fix: purge may encounter nil pointer error

Purpose of the PR
Fix #65
Fixes #
Add a nil check to avoid "invalid memory address or nil pointer dereference" error.

We need to fix #63 first to pass the CI build


CSS parse error on Nokia S40 and S60

A very strange parse error on style.css prevents everything after the affected line to be applied, rendering an unstyled page.
It's a @page declaration inside the @media print part of the file. This line:
 @page { margin: 0.5cm; }
If we remove this line, everything works fine. Other solution is to move this declaration outside the @media print block (affecting all media types, but since this is a paged media declaration, I guess it's not a problem).
One last solution is to put this declaration as the last one in your CSS file. But I guess a common use case is to put the custom styles after MBP style.css (I did that and lost a few ours debugging). We could put a big warning telling people to use this line as the last one, but I prefer to just remove this.

Tested on Nokia's emulators for S40 6th edition, S60 5th edition and S60 3.2. Also tested on a real N95 device with S60 3.1.

Since MBP is meant for mobile web apps, we probably don't need any of those print rules anyway.

@necolas @sergiolopes the app maybe a news app or a map that someone wants to print, so personally, i think we should move this declaration outside the @media print block. +1 ?


Hotfix / Programming-Exercises: Handle Template and Solution Participation access

Checklist

[x] I tested the changes and all related features on the test server https://artemistest.ase.in.tum.de.
[x] I documented my source code using the JavaDoc / JSDoc style.
[x] ~I added integration test cases for the server (Spring) related to the features~
[x] ~I added integration test cases for the client (Jest) related to the features~
[x] ~I added screenshots/screencast of my UI changes~
[x] ~I translated all the newly inserted strings~

Description

Older Template and Solution Participations don't have a reference to an exercise.
This PR addresses how to handle their permissions as their exercise can't be retrieved.
Steps for Testing

Log in to ArTEMiS
Navigate to Course Administration
...

Screenshots

@krusche Ready for review.


connection.execute does not handle ?? anymore

Describe the bug
A execute statement that uses ?? does not work correctly. It replaces the first ? with the string values instead of replacing ?? with the symbol.
Versions
| Dependency | Version |
| node | v12.13.0 |
| typescript | 4.0.3 |
| mikro-orm | 4.2.1 |
| your-driver | postgres |

This was never a goal, how do you use it? Provide something I can try (and what you expect).

e.g. await orm.em.getConnection('write').execute(`CREATE USER ?? WITH PASSWORD \'${password}\';`
or GRANT USAGE ON SCHEMA ?? TO ??; .

I asked also for the expected output. Why dont you use single question mark? How is that different?
As i said, this was never meant to be supported.

the output to the DB should be CREATE USER USER1 WITH PASSWORD 'X', but with single question mark it prints CREATE 'USER' USER1 WITH PASSWORD 'X', which does not work. It must be double quotes or no quotes for this to work...
https://www.postgresql.org/docs/8.0/sql-createuser.html

Before the v4.3 release, you can try the dev build, latest one is 4.2.4-dev.81.


TINY: Move console colors to constants

Codecov Report

Merging #39 into master will decrease coverage by 0.22%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   13.15%   12.93%   -0.23%
==========================================
  Files           1        1
  Lines         114      116       +2
  Branches       18       18
==========================================
  Hits           15       15
- Misses         99      101       +2

Impacted Files
Coverage Δ

src/testla.js
12.93% <0%> (-0.23%)
:arrow_down:

Continue to review full report at Codecov.

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


Enable existing download code

The site already has the code to download videos in the frontend, it just has to be enabled via __is_premium.

Thank you for contribution!