Array.includes type is too narrow

TypeScript Version:  2.9.2

Search Terms: array includes es2016 widen
Code
Array.includes should allow the searchElement param to be a subtype of the array element type, e.g.
type A = 'foo' | 'bar' | 'baz'
type ASub = Extract<A, 'foo' | 'bar'>;
declare const aSubs: ASub[];
declare const a: A;
/*
Argument of type 'A' is not assignable to parameter of type '"foo" | "bar"'.
  Type '"baz"' is not assignable to type '"foo" | "bar"'.
*/
aSubs.includes(a);

Expected behavior:
No error.

'foo' | 'bar' | 'baz' is a supertype of 'foo' | 'bar', not a subtype (subtypes represent subdomains of their supertypes).
See #14520 for discussion of upper-bounded generics.

@RyanCavanaugh Thanks for the link to Stackoverflow; as indicated on Stackoverflow:

TypeScript may issue type warnings on code that it considers incorrect.

However, I'm curious as to why TypeScript would consider:
includes(searchElement: any, fromIndex?: number): boolean;

to be incorrect?
The includes method[1] is defined as:

includes compares searchElement to the elements of the array, in ascending order, using the SameValueZero algorithm, and if found at any position, returns true; otherwise, false is returned.
The optional second argument fromIndex defaults to 0 (i.e. the whole array is searched). If it is greater than or equal to the length of the array, false is returned, i.e. the array will not be searched. If it is negative, it is used as the offset from the end of the array to compute fromIndex. If the computed index is less than 0, the whole array will be searched.

There's no indication this function should not be called with types that do not exist in the array. Somewhat to the contrary, the first step of the aforementioned SameValueZero[2] algorithm is:

If Type(x) is different from Type(y), return false.

As such includes offers behavior specifically guaranteed to return false if the type of searchElement matches no elements in the array. Given the function was designed and documented to have this behaviour, is there any particular reason why TypeScript won't allow us to utilise this function as documented?
However, at least based on my current understanding, it seems unusual to me that...:
const KNOWN_VALUES = Object.freeze(['a', 'b', 'c'])

function foo(input?: string | null) {
    if (KNOWN_VALUES.includes(input)) { // <== TS2345
        // ... Do thing
    }
}

gives the error...:

TS2345: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'.

given that the ECMAScript spec documents this as being a case in which I can safely expect includes to return false.
Granted, I understand TypeScript goes above and beyond JS; it's inherently adding type-safety to a language (and spec) that never had it in mind. However, I'm not sure under which circumstances the above error provides additional type safety.
Somewhat to the contrary, to work around the error I must train myself to do something that is unsafe e.g. use a ! postfix or a cast. By definition calling includes does not cause any side effects, so I'm (presently) unsure what benefit this seemingly overly restrictive function type definition affords users of TypeScript. Especially given checking unsanitized input against a set of known values it a very common pattern.
Just to clarify, my query isn't specifically regarding null and undefined (despite the chosen example). I would expect the described pattern to work equally as well if input to foo is of type any i.e  I'd want to use this pattern to safely determine whether input is a value my program knows about at runtime. I can then use this information to make further inferences (perhaps even type inferences) at runtime to provide sanitation/safety at runtime.
However, admittedly I'm approaching this from a particular mind-set based on my own experience and use-cases; which quite frankly may not be enough to understand the situation at large. Consequently, there may be something immediately apparent to others that I'm simply not seeing.  As such, if I'm off base here, I would absolutely appreciate any time anyone is willing to afford me such that I can be better educated on the matter.
[1] https://www.ecma-international.org/ecma-262/9.0/index.html#sec-array.prototype.includes
[2] https://www.ecma-international.org/ecma-262/9.0/index.html#sec-samevaluezero

Sorry, the tldr; of my post above is...
If the type definition of includes were to be changed to:
includes(searchElement: any, fromIndex?: number): boolean;

would it actually break a single piece of software written in TypeScript?
My current thinking, is no. However, that may be incorrect.
Even still, that alone isn't reason to change the signature. Assuming the change wouldn't break any real-world software. Would changing the signature worsen or improve code comprehension?
I'm of the opinion (at present) that it would actually significantly improve code comprehension as it would allow a common coding pattern to be utilized without littering code with unnecessary (and technically incorrect) casts.

There's no indication this function should not be called with types that do not exist in the array

⁉

... includes(searchElement: any, fromIndex?: number): boolean;

You're arguing is that this code is totally fine and has no obvious problems:
function foo(arr: string[], content: string, index: number) {
  if (arr.includes(index)) {
    // Do something important
  }
}

This code is in fact extremely suspicious! Type checking is not a valuable operation if it's not capable of identifying code that's very likely to be wrong.
If/when we do get upper-bounded constraints, it absolutely makes sense to make includes be a bivariant operation. Until then, the current definition is the best available.

would it actually break (or cause someone to "break") a single piece of software written in TypeScript?

Changing every built-in function to accept anys would also "break" no one, but that doesn't make it a good idea. Part of TypeScript's value proposition is to catch errors; failing to catch an error is a reduction in that value and is something we have to weigh carefully against "Well maybe I meant that" cases.

@RyanCavanaugh That's a fairly reasonable example of suspicious code, something I admittedly hadn't considered as being a possibility. I'm not sure how frequently this sort of thing would occur in practice. I suspect this would be highly infrequent, but honestly I can't back that up. If it does occur frequently, then it may well trump everything that follows...
However, my concern is that this function has been given a narrow type constraint simply because this is TypeScript, so there's a desire to add types to existing APIs. However, presumably this should only be done for the purpose of facilitating correctness, if the function already has well defined and well understood semantics, then altering these semantics may not be desirable. In this particular instance I believe it leads developers to write code that is non-obvious, unnatural, and therefore more likely to be error prone.
Take for example the sanitation use case. A developer wants to check if some input, is in some collection (technically this applies to sets as well as primitive arrays). The natural way to write this code is:
const KNOWN_VALUES = Object.freeze(['a', 'b', 'c'])

function isKnownValue(input?: string) {
	if (KNOWN_VALUES.includes(input)) {
		// Do something...
	}
}

It's not clever or complicated code, it matches the developers intention precisely, yet TypeScript rejects the code.
So, what does the developer do correct this issue? A cast, a type check? Let's try the latter:
const KNOWN_VALUES = Object.freeze(['a', 'b', 'c'])

function isKnownValue(input?: string) {
	if (typeof(input) === 'string' && KNOWN_VALUES.includes(input)) {
		// Do something...
	}}

Great, it passes. We've got an extra check in there that will be compiled to JS, but "it's a small price to pay for type safety" 👍
Now consider we want to handle numbers in our known value set:
const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3])

function isKnownValue(input?: string | number) {
	if (typeof(input) === 'string' && KNOWN_VALUES.includes(input)) {
		// Do something...
	}}
}

Uh oh!
TypeScript allows this through, but it's not correct. Why is that? Where is the breakdown here?
It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. We created tight couplings with the type system that we never really intended.
Generally TypeScript doesn't get in the way, for the most part it encourages correctness - honestly it's great. However, I think in this particular circumstance, it's not facilitating correctness or behaving how developers would expect.
Note: To work around the initial TS error, I could have used a cast instead of an explicit type-check. This would be even more unnatural as we'd essentially intentionally be performing a cast that we know may be inaccurate - however, it would have the benefit that the error above would have been adverted. Of course, reading the code after adding in number handling would then be even more confusing.

I'm hitting a similar issue but in literal types:
const allDogNames = {
  django: 'django',
  tom: 'tom',
  buster: 'buster',
} as const;

type AllDogNames = (typeof allDogNames)[keyof typeof allDogNames]; // "django" | "tom" | "buster"

const checkDogOnShortlist = (name: AllDogNames): boolean => {
  return [allDogNames.django, allDogNames.tom].includes(name);
};

Error:(26, 57) TS2345: Argument of type '"django" | "tom" | "buster"' is not assignable to parameter of type '"django" | "tom"'.  Type '"buster"' is not assignable to type '"django" | "tom"'.

To get around this you have to declare the shortlist type that it "could" be any of the names even if the defined array clearly is not:
const checkNameForDog = (name: AllDogNames): boolean => {
  const dogShortList: AllDogNames[] = [allDogNames.django, allDogNames.tom]; // type -> ("django" | "tom" | "buster")[]
  return dogShortList.includes(name);
};

No error

Behaviour doesn't seem expected in that it would seem reasonable for typescript to determine if you are comparing against a list of string literals with a string literal then this is Ok?

How about using this signature?
function includes<T, U extends T>(arr: readonly U[], elem: T): elem is U {
    return arr.includes(elem as any);
}

This isn't too restrictive, and provides a nice type type guard.
const ARR = ['a', 'b', 'c'] as const;

const x = 'a';
if (includes(ARR, x)) {
  console.log(x); // type is "a"
}

const x = 'x';
if (includes(ARR, x)) {
  console.log(x); // type is never
}

const x = 'doesnt matter' as string;
if (includes(ARR, x)) {
  console.log(x); // type is "a" | "b" | "c"
}

Also hit this issue when trying to look if the users locale setting was in the list of supported locales and otherwise default to the default language. A bit unintuitive having to do type casts before using `.includes().
It is a real world case of the example Benjamin-Dobell posted.

My hard-coded decision for real-world cases:
type DU = 'a' | 'b' | 'c';

let x: DU;
let y: string;

type THelper<T, U> = T extends string
  ? {[P in T]: P extends U ? P : never}[T] extends {[P in T]: unknown}
    ? U
    : never
  : U;

function includes<T, U extends THelper<T, U> extends never ? unknown : never>(
  arr: readonly T[],
  searchElement: U,
  fromIndex?: number,
): boolean {
  return (arr as any).includes(searchElement, fromIndex);
}

/*1*/ if (includes(['a', 'c'] as const, x)) {
  // no error
  doSmth();
}

/*2*/ if (includes(['a', 'd'] as const, x)) {
  // error
  doSmth();
}

/*3*/ if (includes(['a', 'c'] as const, y)) {
  // no error
  doSmth();
}

/*4*/ if (includes(['a', 'c'] as const, 4)) {
  // error
  doSmth();
}

function doSmth() {}

@OliverJAsh, it seems to be working fine with your example.
@RyanCavanaugh, it brokes supertype/subtype logic but works well as enum replacement:
enum ReallyLongEnumName {
  a,
  b,
  c,
}

let x: ReallyLongEnumName;
let y: string;

/*1*/ if ([ReallyLongEnumName.a, ReallyLongEnumName.c].includes(x)) {
  // no error
  doSmth();
}

function doSmth() {}

I agree with @Benjamin-Dobell and others; it's too restrictive if we can't check for any type belonging to an array. I think there are good foundational reasons why Java's signature on all collection types allow any Object (which is the base of all types in Java) with Collection.contains(Object o) . Ditto for indexOf etc.
To give one additional example, suppose I have an exhaustive list of a union type, and I want an is MyType style boolean function for type-checking if a string is a valid member of the union type. Without the ability to check for any belonging to a collection, we need dangerous casts, e.g.
// This is contrived and I'd do it somewhat differently, but it illustrates a 100% valid situation
type Silverware = "fork" | "spoon" | "knife";
const ALL_SILVERWARE: readonly Silverware[] = [ "fork", "spoon", "knife" ];
export const isSilverware(foo: any): foo is Silverware {
  // DANGEROUS cast.
  // It's valid in thie case, but it's bad practice and dangerous
  // if our code has to do this regularly
  return (ALL_SILVERWARE as any[]).includes(foo);
}

I don't know why this is a duplicate of the other, more in-depth, proposal. This is an issue with certain functions that should act like type assertions, but do not do so. Array.includes is an assertion that searchElement is inside the array. What it does currently is demand searchElement is a value of array, which isn't helpful in most use cases. If I know it is within the array, I don't need the function. It is also overly strict when considering runtime validation and its purpose. This is likely a legacy issue from prior to function assertions existing and I'd like to see a fix.
Here's the current implementation:
interface Array<T> {
    /**
     * Determines whether an array includes a certain element, returning true or false as appropriate.
     * @param searchElement The element to search for.
     * @param fromIndex The position in this array at which to begin searching for searchElement.
     */
    includes(searchElement: T, fromIndex?: number): boolean;
}

A change of the interface to the below serves the expected purpose without making assumptions on the array (const or otherwise) and the values it contains.
interface Array<T> {
    /**
     * Determines whether an array includes a certain element, returning true or false as appropriate.
     * @param searchElement The element to search for.
     * @param fromIndex The position in this array at which to begin searching for searchElement.
     */
    includes(searchElement: unknown, fromIndex?: number): searchElement is T;
}

What is the objection to such a change? Is a PR welcome here?

Please re-open this issue, the current implementation makes includes unusable in validation scenarios. The following should be perfectly valid:
const Foo = {
	'a': 'foo',
	'b': 'bar',
	'c': 'xyz',
	'd': '123',
} as const;

type Foo = typeof Foo[keyof typeof Foo];

// Foo.c is not assignable to type '"foo' | 'bar'"
const hasC = [Foo.a, Foo.b].includes(Foo.c);

const hasC = [Foo.a, Foo.b].includes(Foo.c);

A workaround could be
const hasC = ([Foo.a, Foo.b] as Foo[]).includes(Foo.c);

I found the following trick that unblocks me right now in a rush.
const FooArr = [
    "Hi",
    "Bye",
] as const;

const hasC1 = FooArr.includes("Chocolate"); // Doesn't work, TS is too strong in checking -- Argument of type '"Chocolate"' is not assignable to parameter of type '"Hi" | "Bye"'.(2345)

const hasC2 = (FooArr as string[]).includes("Chocolate"); // Doesn't work either -- Conversion of type 'readonly ["Hi", "Bye"]' to type 'string[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. The type 'readonly ["Hi", "Bye"]' is 'readonly' and cannot be assigned to the mutable type 'string[]'.(2352)

const hasC3 = ([...FooArr] as string[]).includes("Chocolate"); // Only hasC3 works!

I don't advise this, but since I am in a rush, I'm gonna leave it in my code with a link to this ticket as // Yet another TypeScript's unnecessary freaks: https://github.com/microsoft/TypeScript/issues/26255. :)

@eyedean Casting as (foo as readonly string[]) will downgrade that overly-restrictive searchTerm to just string. It's what I've used as a workaround for a while now, but it sucks that I'm forced to use this big wordy cast all the time for something as straightforward as Array.prototype.includes ought to be.
As mentioned above, it's way too restrictive, and should be changed to a type assertion instead.
P.S. IMO, capitals are for classes / React components, and baking types into names like with that Arr prefix is also not my cup of tea either

While I agree this signature needs to change, I'm a little confused by all of these weird (and possibly dangerous) workarounds casting the array instead of casting the search element. Can anyone explain this to me?
type ArrT = 'foo' | 'bar' | 'baz';
const a: ArrT[] = ['bar', 'baz'];

(a as any).includes('hello'); // why this (or some variant)

a.includes('hello' as any);   // instead of this?

Of course casting at all is not what we want here, but to me it seems like casting the search element is the lesser of two evils. Also, the type guard signature gets my vote for best temporary workaround.

I've only been using typescript a month. So far, I'm a fan, but this particular typing for includes requires some unnecessary verbosity when a naive check is just fine, especially considering that I didn't explicitly define the array type in the first place
What I tried to use:
enum Role { ... }
const show = [Role.Support, Role.Admin].includes(user.role)) // user.role could be undefined

What I ended up using to make typescript happy:
enum Role { ... }
const { role } = user
const show = role && [Role.Support, Role.Admin].includes(role))

Or I could have used:
enum Role { ... }
const show = ([Role.Support, Role.Admin] as any).includes(user.role))

🤮  I hate when languages make me be clever in the name of safety, but add bloat that makes my code harder to read and easier to introduce bugs.

@RyanCavanaugh (et. al) I see we keep referencing this issue as a duplicate to others, even referencing my comment's suggested change in many cases, but this issue remains closed. Can we at least re-open this issue if it is going to be referenced as a duplicate given TS not supports more functionality than the original close suggested? Can we also answer my previous question regarding if setting a type assertion will be accepted as a PR?
I'd love to help support the team and get this in the code base if it means you won't need to reference a closed ticket as duplicate any longer ;)

@kevinpeno The way we would fix this is by implementing #14520, so we don't need two issues tracking the same thing. I typically send people here first so they can understand that they could have searched better and found this 🙂. Regarding the type guard change, please open a new issue for that -- this issue is a complaint about being unable to search for supertypes in an array (which should be valid). I don't think we would take that change verbatim since it would allow ["foo"].includes(0) which we want to be an error.

@RyanCavanaugh But it's not an error…? ["foo"].includes(0) returns false, which is correct because ["foo"] does indeed not include 0. Why shouldn't includes accept any like most type guards do?

@vdh by that logic, almost anything should be allowed. Why can't I write "hello world".elgnth ? It just produces undefined, there should be no problem with that. Why not allow [1, 2, 3].sort(class { }) ? That just returns an array in some order. Why not allow "42" * true ? That produces 42, totally OK.
TS has many checks that are based on our judgment about what's "over the line" in terms of intentional vs unintentional behavior of JavaScript. If you want includes to accept any argument, you are already free to add that declaration to your project at the risk of missing other errors.
If you don't like the fact that TS disallows many operations that are "allowed" by JavaScript, the good news is that JavaScript still exists.

I do agree with your response to me that it should allow "supertypes" of the value (existing or not; e.g. string) to be checked but not, say 0. I'll open up an issue on that specifically as well as try to update the example I gave to support your request for some level of strictness.
Thanks for your response.

@RyanCavanaugh That's a bit of a nasty response to make. Instead of seriously answering whether or not it's a good candidate to type it as a real type guard, you instead mock me as if I'm somehow suggesting all garbage code of any wrong type should be allowed.
Array.prototype.includes has the express designed purpose of determining whether or not a given value is included or not in an array. It's basically a type guard before Typescript existed. I only suggested any within the context of it being a type guard. Or unknown, as the original suggestion mentioned. Please correct me if I'm misinformed, but this is a common practise for type guards.
Of course an edge case of an inlined 0 paired with an inlined ["foo"] array doesn't make sense because it would always return false. The one-line nature of that snippet muddles the issue. The fact that it will always return false for that type combination should be the issue flagged by Typescript, not the value passed into includes. The test value shouldn't be rejected if it has at least some amount of overlap with the array type. If a value is string and your array is readonly ("foo" | "bar")[], rejecting it for not being exactly a type of "foo" | "bar" ruins the useful and common scenario of using includes as a type guard for checking if your value is in fact "foo" | "bar" in the first place.
I apologise for neglecting to detail the nuance of the ["foo"].includes(0) edge case and being curt about it in my rebuttal, but was it really necessary to mock me with an ad hominem over it? I don't want to engage in hostility, I just earnestly want that original suggestion to be taken seriously and not glossed over.

Please don't misinterpret technical discussions as personal attacks. Anyway, I think you're missing the fact that we already agree here - supertypes absolutely should be allowed inputs to includes, but we lack a mechanism to allow this.

The fact that it will always return false for that type combination should be the issue flagged by Typescript

Absolutely! It should be flagged as an error, by what mechanism? That's the thing here; we already agree that supertypes should be allowed inputs, it's just that we don't have any way to make supertypes allowed without also allowing everything else, which is why this issue is just a manifestation of #14520. Once that was implemented, we absolute would change the signature to something like includes(arg: T | super T). The desired behavior is clear, but we lack the mechanics to enable it.
The options on the table (without implementing #14520) are:

Only allow subtypes
Allow anything

We (the team) think that "anything" is a bad answer here because of examples like ["foo"].includes(42). If you disagree, you can add the (searchElement: unknown): searchElement is T declaration to your own library and opt in to that behavior. If we made the opposite decision and said anything goes, then no one would be able to opt in to the "subtypes only" behavior because there is no mechanism for removing an overload.
Just to spell this out explicitly: There's no point discussing a type guard in the case where only subtypes are allowed, since that will never narrow the type of the argument.
Regardless of which behavior of the two currently available with existing mechanics you think is clearly preferable, the fact is that one of them allows users to opt into the other, and the other doesn't. When we're faced with that situation, unless the choice is truly obvious (and IMO it's not), then we're going to go with the one that keeps flexibility on the user side.

I just earnestly want that original suggestion to be taken seriously and not glossed over.

That isn't the original suggestion; it's a comment. The original suggestion is at the top of this page and it just says that supertypes should be allowed inputs to includes, which we agree on, but can only implement (and would implement) with #14520. The linked comment is a comment, and I asked the person suggesting it to file a new issue ("Regarding the type guard change, please open a new issue for that ") so it could be considered separately and with proper visibility, which is exactly the process by which we take things seriously.

You can also review other duplicate proposals for the type guard behavior where it has been pointed out that treating this as a type guard is unsound:
interface Array<T> {
    includes2(searchElement: any, fromIndex?: number): searchElement is T;
}

declare let s: string | number;
if (["foo"].includes2(s)) {

} else {
    // 's' might be "bar" or any other string that's not "foo"
    s.toFixed();
}

For the type guard flavor to be correct, we'd need #15048.
So ultimately you're blocked one of three things here:

A feature request for lower-bounded generics
A feature request for "one-sided" type guards
A fundamental disagreement about whether includes should just take any arbitrary input, for which syntax to opt into that behavior already exists

I may be overlooking some other case where this would fall apart in some other way, but from what I can tell, TypeScript 4.1's template literal types) and some trickery would allow a definition for includes method that would work pretty well specifically for the string enums use case.
interface ReadonlyArray<T> {
  includes<S, R extends `${Extract<S, string>}`>(
    this: ReadonlyArray<R>,
    searchElement: S,
    fromIndex?: number
  ): searchElement is R & S;
}

Playground example
1. Input is correctly refined to be one of the strings in the haystack array
declare let s: number | string

if ((['foo', 'bar'] as const).includes(s)) {
  // s is 'foo' | 'bar' here
  if (s === 'baz') {} // Error as expected, since this is would always be false
}

You do need the as const cast there, but IMO that's a pretty small price to pay. If you have already declared a list of accepted values like
declare let arr: ReadonlyArray<'foo' | 'bar'>
if (arr.includes(s)) {

then that works too.
2. It doesn't refine other than string literal types
The unsoundness @RyanCavanaugh mentioned above isn't here anymore, since this never refines R to be or not be string and only deals with specific string literal types. In the else-branch, type of s is still string | number.
if ((['foo', 'bar'] as const).includes(s)) {
} else {
    // s is string | number here
    s.toFixed(); // [ts] Property 'toFixed' does not exist on type 'string'
}

For this to work properly, we need the template literal in the generics constraint
extends `${ string }`

With just extends string readonly string arrays would fall back to unsound behaviour where they'd "refine" the input value to be a string even if it's not
declare var arr: ReadOnlyArray<string>
if (arr.includes(s)) {
} else {
    s.toFixed(); // We want error here!
}

With the template literal constraint, TS won't use our new overload of the method for normal ReadOnly<string>. Instead, it'll use the original library definition as it is currently defined, so things are as strict as they currently are for arrays of arbitrary strings.
3. Input values that can never even be strings are caught as errors
(['foo', 'bar'] as const).includes(0) // Error as expected, albeit more verbose one than we'd like.

This works thanks to the Extract<S, string> trick. When there is no string in the generic type S, the this-parameter will end up being ReadOnlyArray<never>, which won't match the input array.

Admittedly, this all overloading stuff comes with a pretty big caveat; The error messages for incorrect parameter usage become much worse
declare let arr: ReadonlyArray<number>
arr.includes('a')

No overload matches this call...

No overload matches this call.
  Overload 1 of 2, '(this: readonly `${string}`[], searchElement: string, fromIndex?: number | undefined): searchElement is `${string}` & string', gave the following error.
    The 'this' context of type 'readonly number[]' is not assignable to method's 'this' of type 'readonly `${string}`[]'.
      Type 'number' is not assignable to type '`${string}`'.
  Overload 2 of 2, '(searchElement: number, fromIndex?: number | undefined): boolean', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'number'.

Still, even if this will never land in TypeScript's builtin types, it may be worth a try in userland type declarations for people following this issue.

Please reopen the issue. I use .includes as a guard often and such narrow typing does not make sense for me. Instead make it possible to pass any type as an argument and warn if the types of the argument and array items don't overlap.

Locking due to discussion going in circles. Please read the thread before commenting..
Please see #14520 for upper-bounded generics, which would be one path forward
See #15048 for why we don't have the proposed type guard behavior.


running-coreos: align DO examples on stable channel

LGTM

Whoops, I just changed part of this without looking closely. Thanks for spotting this.


raspberrypiWirelessFirmware: init

Motivation for this change
The builtin wifi and bluetooth radios do not currently work in NixOS on the RaspberryPi 3 and Raspberry Pi Zero W, because some firmware files are missing.
Things done
This PR adds a package containing the missing wifi and bluetooth firmware and adds it to enableRedistributableFirmware. Some of the firmware files also exist in firmwareLinuxNonfree, but this package contains newer versions. Therefore, it must be placed later it the list to overwrite the files from firmwareLinuxNonfree.
I have not actually tested bluetooth, but wifi now works out of the box with this PR.

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

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

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

cc @dezgeg

I can confirm wifi works perfectly on my RPI 3 with this firmware.

Oops, I just realized that I made the change you requested a few weeks ago, but never pushed it.


Send Test File to Texas

James to reach out whether we need to send another one

James to reach out whether we need to send another one

Waiting on approval to send them files via SFTP

Multiple files have been sent to TX at this point.


The inferred return type of a function with a generic that spreads an import * as doesn't include some exports when they're exported seperately to the declaration

Bug Report

🔎 Search Terms

export, import as, generic, spread
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about this and none seem to relate to this behavior

⏯ Playground Link

Workbench Repro
💻 Code

// @filename: stuff.ts

// swapping the function declaration with these results in the same error
// class something {}
// const something = {x:true};

// making it a primitive doesn't create an error though
// const something = '';

function something() {}

export { something };

export function exportedDirectly() {}

// @filename: index.ts
import * as stuff from "./stuff";

// works
stuff.something;
stuff.exportedDirectly;

function getStuff<T>() {
  const thing = { ...stuff };
  // works
  thing.something;
  stuff.exportedDirectly;
  return thing;
}

// Property 'something' does not exist on type '{ exportedDirectly(): void; }'.
getStuff().something;
// works
getStuff().exportedDirectly;

🙁 Actual behavior

Declarations that are exported separately to the declaration aren't included in the inferred return type with the exception of primitives (though maybe there are others that work as well?). This is wrong since the property exists at runtime and exists if the generic isn't there.
🙂 Expected behavior

All the exports are included since that's what happens at runtime and what happens when there isn't a generic on the function.

Wild. I'm not sure if ES6 module object exports are enumerated by spread or not, but at minimum the function body and its return type should behave the same.

https://stackoverflow.com/a/38679368
The important part of the spec in this case is that when you do
import * as foo from 'foo';

The foo variable's value is created at section <IP_ADDRESS>.4 step 12.b which creates a Module Namespace Exotic Object, where properties are the named exports and all properties are enumerable so you are totally safe in using Object.keys(foo) to get the names of all of the named exports. The object is not iterable, so you will not be able to use an iterable spread, though you could use the proposed object spread syntax to copy the properties if you wanted. Object.getOwnPropertyNames should work fine too.

TLDR: They are enumerable.


LAI misunderstanding of the Preserve field property(?)

As indicated by LAI's own field test here:
        OperationRegion (IDXF, SystemIO, 0xC00, 0x2)
        Field (IDXF, ByteAcc, NoLock, Preserve) {
            IDX,   8,
            DAT,   8
        }

        IndexField (IDX, DAT, ByteAcc, NoLock, Preserve) {
            REGA,   8,
            REGB,   8,
            REGC,   8,
            REGD,   8,
            REGE,  16,
        }

        Method(_INI)
        {
            //! io-read: pio 8b 0xC00 = 0x0
            //! io-write: pio 8b 0xC00 = 0x2
            //! io-read: pio 8b 0xC01 = 0x0

            //! io-read: pio 8b 0xC00 = 0x0
            //! io-write: pio 8b 0xC00 = 0x2
            //! io-read: pio 8b 0xC01 = 0x0
            //! io-write: pio 8b 0xC01 = 0xAA
            REGC = 0xAA

            ...
        }

Preserve means that all bits outside of a field where field size is less than access size must be preserved. This implies that for field size == access size where field bit offset within byte is 0 no preservation of anything is needed. In the latter case, however, LAI still tries to read data only to discard it later.
I'm also not sure what's up with this top part here:
            //! io-read: pio 8b 0xC00 = 0x0
            //! io-write: pio 8b 0xC00 = 0x2
            //! io-read: pio 8b 0xC01 = 0x0

All in all write to REGC here should cause exactly 2 write accesses and 0 read accesses:
write 2 to IDX
write 0xAA to DAT

ACPICA seems to agree on this at least

This is caused by the following code unconditionally doing a read to get the original value. https://github.com/managarm/lai/blob/a228465314ee3a542f62d4bdefeb8fbe2b48da41/core/opregion.c#L484-L491
One solution would be checking that the write only affects a part of the word, and only doing the read if that is the case.
I'm unsure whether the extra unused read is actually a problem? I suppose it could potentially confuse some hardware that do things on register reads, and it's probably better to stick to what ACPICA does if we want to work on real hardware.

I'm unsure whether the extra unused read is actually a problem? I suppose it could potentially confuse some hardware that do things on register reads, and it's probably better to stick to what ACPICA does if we want to work on real hardware.

Yeah it's pretty much impossible to say, it might trip up some hardware, might not. There are probably some registers cleared by read? Another thing I thought of is if this was some other address space (aka not SystemMemory or SystemIO) but say SMBus. There a spurious read could cause more problems probably. At the very least it's extra wasted cycles or stalls for no reason.


VG-6412 and VG-6413, added quotes in placefinder query to force accurate matching,

also filters hidden if no results.

Codecov Report

Merging #168 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
+ Coverage   71.47%   71.48%   +<.01%
==========================================
  Files         247      247
  Lines       15873    15876       +3
  Branches     1710     1711       +1
==========================================
+ Hits        11346    11349       +3
  Misses       4527     4527

Impacted Files
Coverage Δ

app/src/suggest/suggest-query.js
100% <100%> (ø)
:arrow_up:

app/src/search/search-controller.js
74.5% <100%> (+0.15%)
:arrow_up:

Continue to review full report at Codecov.

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


Rails 5 issues

In a clean Rails 5.0.0.beta3 project, adding
gem 'activeuuid', '>= 0.5.0'

to the Gemfile causes the following failure to start the Rails server.
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from require at /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77)
/var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'activeuuid'. (Bundler::GemRequireError)
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
	from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
	from /home/simon/Projects/rails5-activeuuid-test/config/application.rb:7:in `<top (required)>'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `require'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `block in server'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `tap'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `server'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/command.rb:20:in `run'
	from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands.rb:18:in `<top (required)>'
	from /home/simon/Projects/rails5-activeuuid-test/bin/rails:9:in `require'
	from /home/simon/Projects/rails5-activeuuid-test/bin/rails:9:in `<top (required)>'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
	from /home/simon/.bundler/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
	from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
	from /home/simon/Projects/rails5-activeuuid-test/bin/spring:13:in `require'
	from /home/simon/Projects/rails5-activeuuid-test/bin/spring:13:in `<top (required)>'
	from bin/rails:3:in `load'
	from bin/rails:3:in `<main>'

Still an issue. @blackham's patch in #76 may fix this.

Rails 5 has built-in support for UUID primary keys, so ideally you should migrate away from this gem...

@tom-lord got a link on this? best I can find is https://stackoverflow.com/a/42950049 which seems to work

For mysql: this gem works fine: https://github.com/nedap/mysql-binuuid-rails

I deleted activeuuid in Rails 5.0.2. And it works.


Rearrange/Reorder - Widgets and Categories

Description
It would be useful to have some control to the ordering of Widgets and Categories.  At the moment the ordering in Homarr doesn't appear to follow any logical setup either user defined or alphabetical (A-Z).  (Maybe this was the order I added services but I can't recall?)
For example, my Dashboard now has the following categories in the below order:

Media
Security
Management
Home
Network
Your downloads

I'd prefer to have some control over the categories so that I can bring the important/commonly used elements to the top of the page.
The same is true for Widgets, currently the following order appears to be hard-coded or defined in someway with no option to customise:

Calendar
Weather
Download Speed
Date

I think I've noted other queries about Drag and Drop (i.e. between categories for services) so aware that I think this might be on some roadmap for eventual development but wanted to note a request.
Priority
Low (Nice-to-have)
Please tick the boxes

[X] You've read the docs
[X] You've checked for duplicate issues

Thanks for the issue! I think module apparition could be reordered but it might be really hard 😅
Categories reordering is based on the apparition of the category in your config file.
I don't know how to implement it but I will think about it. Main priorities are new integrations like Docker and Overseerr at the moment :)

Ah I see, so based on the order of first appearance in the JSON config file for the category type defines effectively the order in which they appear in Homaar.  I would therefore take a bet that it's effectively the order by which I created/defined the services originally since that would populate the config file.
Having that knowledge, I just edited the config.json manually and moved some of the service definitions and that's now allowed me to re-order the categories effectively.  Slightly hacky but achieved the outcome I was seeking.
Anyone reading this, please backup/download you config before manually editing if you do want to take the approach.

It would be really cool if I could drag and drop the categories... Just like the icons inside the categories. Or if I could just choose an option to have everything align in alphabetic mode.

It would be really cool if I could drag and drop the categories... Just like the icons inside the categories. Or if I could just choose an option to have everything align in alphabetic mode.

It would be really cool. Ideally you could put anything anywhere on the screen. But i have no idea how to do it technically

It would be really cool if I could drag and drop the categories... Just like the icons inside the categories. Or if I could just choose an option to have everything align in alphabetic mode.

It would be really cool. Ideally you could put anything anywhere on the screen. But i have no idea how to do it technically

What if you will have an array list of order [0-5]
the lower number will be the top and the higher will be the bottom, so the list of widgets will sync with it? Won't it work?

It would be really cool if I could drag and drop the categories... Just like the icons inside the categories. Or if I could just choose an option to have everything align in alphabetic mode.

It would be really cool. Ideally you could put anything anywhere on the screen. But i have no idea how to do it technically

What if you will have an array list of order [0-5] the lower number will be the top and the higher will be the bottom, so the list of widgets will sync with it? Won't it work?

If you look at the config file you can see how services are saved. I might do a new section in the config like arrangment and then split it into categories, with each item represented by their ID inside, but to achieve this I need to make a temporary migration script
config.json
"arrangment": {
  "social medias": ["id-social-stuff", "id-another-one"],
  "other": ["other-service", ".."]
}

What do you think about that ?

in terms of reordering categories, the cleanest solution would be to do it in the same way that you currently reorder individual cards, where you can do it directly from the home page. but if thats too technically difficult, you could also add an orderable list to the Settings panel like this:

I guess you would then have to add an arrangement section to store the order of category IDs to config.json, and tag each individual app with the category id

The problem is not making the actual categories boxes move, it's more of how to read / write the data but thanks for your input !

Thanks for the issue! I think module apparition could be reordered but it might be really hard 😅 Categories reordering is based on the apparition of the category in your config file. I don't know how to implement it but I will think about it. Main priorities are new integrations like Docker and Overseerr at the moment :)

Since you guys are using mantine - which i fell in love with - there's these neat example in the demos for drag and drop using react-beautiful-dnd.
First solution that comes to mind is to save an extra array in the configuration with the categories' names, use that to sort them out on the UI, and when you drag and drop simply save back the new order.
As you stated you could also use the same arrangement property to save both the categories order as well as the items inside, with something like {arrangements: [ [<category>,[<item-[id/name]>,...] ]} so it's even easy to iterate over consistently


Added Spanish strings translation

Are you aware that this project uses transifex to manage localisation, https://www.transifex.com/mumble/mumble-iphoneos/?

@binaryDNA--while1-program, I've just translated it into transifex.

If that is everything from this pull request then you should probably close it.


High-distance precision loss due to using 32-bit floats

Should probably switch to using 64-bit floats to avoid this. Examples shown via Albedo Torches
Center of world: normal behaviour

Beyond 2^23: snaps to corners

Beyond 2^24: very obvious squares

Some clearer examples with white light:

A further selection of fun examples (some with https://github.com/ThisTestUser/FarLandsMod/):
Just before 16777216 on both axes

Just before 33554432 on both axes

Before 16777216, only one axis

Before 33554432, only one axis

Before 67108864, only one axis

Examples of a torch placed at<PHONE_NUMBER> on both axes

536870912, one axis


Setup multi-tenant without custom policies ?

Is it possible to setup sign-in using the Azure AD multi-tenant endpoint without custom policies?
The title of this article mentions "using custom policies" even when we are in the "User Flow" section and nowhere we see how to configure custom policies. Nonetheless, I followed the steps and couldn’t successfully achieve a multi-tenant config.
I assume there is a mistake under "Configure Azure AD as an identity provider".
On point 5. it says that we should use
https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration
But I would assume to have
https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
Or
https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration
If I follow the steps as they are, I can only connect to a single tenant but when I try a user from another tenant, I get the following error:

AADSTS50020: User account 'USERNAME' from identity provider 'https://sts.windows.net/ANOTHER_TENANT/' does not exist in tenant 'TENANT_NAME' and cannot access the application 'CLIENT_ID'(DISPLAY_NAME) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.

I tried to use the "common" endpoint, but it is not allowed.
So, I tried to use "organizations" and I get to complete the configuration but when I test, I get the following error:

AADB2C90238: The provided token does not contain a valid issuer. Please provide another token and try again.

The only solution to that issue seems to configure the "ValidTokenIssuerPrefixes" key in a custom policy.
Am I missing something?

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

ID: f53d6e64-7bed-a987-c4bb-57fb1b116d48
Version Independent ID: fe33fd59-07ac-54d4-1926-f867aa6fc168
Content: Set up sign-in for multi-tenant Azure AD by custom policies - Azure AD B2C
Content Source: articles/active-directory-b2c/identity-provider-azure-ad-multi-tenant.md
Service: active-directory
Sub-service: b2c
GitHub Login: @msmimart
Microsoft Alias: mimart

@gsimardnet
Thanks for your feedback! We will investigate and update as appropriate.

@gsimardnet
Thank you for your time and patience throughout this issue!
Error Message:
User account 'USERNAME' from identity provider 'https://sts.windows.net/ANOTHER_TENANT/' does not exist in tenant 'TENANT_NAME' and cannot access the application 'CLIENT_ID'(DISPLAY_NAME) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.
Next Steps:
1.You'll have to sign into an account that is part of the tenant ("TENANT_NAME"), add the account you're trying to sign-in with<EMAIL_ADDRESS>account.
2.Once the account is added, you can retry logging-in with that user.
You can also refer to this tutorial for enabling multi-tenant log-ins.
If you're still having issues logging into your tenant and would like us to take a closer look into your environment, please let me know.
Thank you!

@gsimardnet
I just wanted to check in and see if you had any other questions or if you were able to resolve this issue? Since I haven't heard from you in a few days, I'll go ahead and close out this issue at the end of the day, pending any response from your end.
If you have any other questions or require additional support, please let me know.
Thank you for your time and patience throughout this issue.

@JamesTran-MSFT
Your previous answer was 23 hours ago. It is not a "few days".
In any case, I have reviewed your answer and basically, you ask me to add USERNAME (the external user) in my tenant ? I believe it is not multi-tenant then. If so, could you briefly explain the difference between "single tenant" and "multi tenant" ?
With your proposed solution, it makes no difference to configure my app to accept accounts "in this organizational directory only" or "in any organizational directory (Any Azure AD directory – Multitenant)".
I want a solution were users should not be added to my tenant.
Thank you

@gsimardnet
Thank you for the quick follow up! I tested this out in my own environment (using the User Flow tutorial) and will post my findings below.
Findings:
When it comes to the error message that you received, you'll have to add the account as an external user in the your tenant before that user can access your application.
One of the pre-requisites of this tutorial to mitigate the manual registration process, is you'll need to create a user flow that enables users to sign up and sign in to your application.

This is multi-tenant because your AzureAD application is created within your AzureAD tenant (not B2C). The AzureAD application is then authenticating users using your B2C tenant, specifically OpenID Connect.
Testing out the application:
I was able to sign-in using both my B2C and AzureAD user. Please keep in mind, I cut out some frames to save space/time.

If you have any other questions or would like us to take a closer look into your environment, please let me know.
Thank you again for your time and patience throughout this issue!

@JamesTran-MSFT,
I have successfully setup a User Flow with a social account button to sign in to a single tenant. Now I would like to setup a multi tenant login were it would be possible for any Azure AD user to login into my app without having to manually add them to my tenant before. That is my main objective. Is that possible ?
Also, I would like to mention that the single tenant article also ask to register my app in my AzureAD tenant (not B2C) which would also be considered "multi tenant" by your definition.

@gsimardnet
Thank you for the quick response! I've reached out to my team regarding your question and will update as soon as possible.
In regards to the Single Tenant tutorial, it's single tenant because it should only allow for users within your organizational directory to sign-in/use your application. As you can see below, from my testing I was only able to sign in using users from my B2C tenant and not my AzureAD tenant.
Single Tenant Flow - I tried signing-in with a user from my AzureAD tenant:
-Using both the social account and normal login option

With the Multi-Tenant Flow, it's multi-tenant because I'm able to sign in with users from both my AzureAD and B2C tenants.
Thank you for your time and patience throughout this issue.

@JamesTran-MSFT,
If I understand correctly your point, you mean that:

Single-tenant provides instructions to authenticate users only in the B2C tenant.
Multi-tenant (user flow) has instructions to authenticate user in two tenants: AzureAD and B2C

But then, if I look to Multi-tenant (custom policy), I see that authentication is done on the https://login.microsoftonline.com/common endpoint which provides true multi-tenant (not only two tenants).
Is that possible to authenticate users on https://login.microsoftonline.com/common or https://login.microsoftonline.com/organizations without having to setup a custom policy ?

@gsimardnet
Thank you for the detailed response!
Yes, based off of what I tested in my lab using the "User Flow" tutorial, I was only able to authenticate with what you stated above for both Single/Multi-tenant.
I also received confirmation from our engineering team that User flows do not support multi-tenant Azure AD identity providers, this can only be accomplished with custom policies. The only way to allow all Azure AD users to sign in to your application is by updating the value under ValidTokenIssuerPrefixes to "https://login.microsoftonline.com/"
For more info.
In regard to the /common and /organizations endpoints these are used as authentication protocols for AzureAD App registrations and not B2C App registrations, so you can use those endpoints but not with user flows or custom policies.
Lastly, if you're referring to the metadata URL within the custom policy as the /common endpoint, this URL is just setting up a multi-tenant AzureAD IDP (OpenID) and not signing in users.

If you have any other questions, please let me know.
Thank you again for your time and patience throughout this issue.

@gsimardnet
Happy New Year! I just wanted to check in and see if you had any other questions?
Thank you for your time and patience throughout this issue.

@gsimardnet
Happy New Year! I just wanted to check in and see if you had any other questions?
Thank you for your time and patience throughout this issue.

@JamesTran-MSFT,
I was able to configure multi-tenant AD access by using custom policies.
It is much more complex and time consuming so I hope you will enable that for user flow in the future.
Thanks for your help!

@JamesTran-MSFT,
I was able to configure multi-tenant AD access by using custom policies.
It is much more complex and time consuming so I hope you will enable that for user flow in the future.
Thanks for your help!

@gsimardnet
I'm glad that you were able to configure multi-tenant AD access using custom policies, and I apologize for the time consuming process. If you'd like to enable this for User Flows, please feel free to leverage our User Voice forums to suggest this feature be implemented.
Since your issue's resolved, I'll go ahead and close out this thread.
Thank you again for your time and patience throughout this whole process!

@gsimardnet
I'm glad that you were able to configure multi-tenant AD access using custom policies, and I apologize for the time consuming process. If you'd like to enable this for User Flows, please feel free to leverage our User Voice forums to suggest this feature be implemented.
Since your issue's resolved, I'll go ahead and close out this thread.
Thank you again for your time and patience throughout this whole process!

@JamesTran-MSFT Any idea if multi tenant ever going to be supported in user flow?


feat: Download sequence metadata table as CSV

Hi, I have made the following changes in this PR -

Allow users to download the sequence metadata table as a CSV file. Closes #50
Allow users to download the sequence metadata table and sequence fasta file without necessarily clicking the Add filters checkbox. Closes #45

Please look at the below screencast for reference -
Seq-Search-Download.webm

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

Comparison is base (d9e411e) 91.89% compared to head (651fc25) 91.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   91.89%   91.89%
=======================================
  Files           4        4
  Lines         148      148
=======================================
  Hits          136      136
  Misses         12       12

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


Implement program equality, closes #24

I'm going to open up another issue for more advanced equals method like in the discussion in #24

@stevenheidel Do we want some tests for this?

@ampolloreno the .out() method is already thoroughly tested so we'd just be testing the == method at that point


Feature request : option to allow building custom UI having app directory which gets bundled with executable

option to allow adding custom ui or frontend app directory which get bundled, allowing building complete application in one executable, just like we have admin http://localhost:8090/_/#/login  on embedding ui application we get  http://<IP_ADDRESS>:8090/app/

You can do that already with Go using the standard //go:embed directive (for an example you can check the ui/embed.go).

i need to update logic in api/base.go as well, to serve custom intex.html from  webapp.

@zeet2020 I'm not sure that I understand what do you mean but for serving static files you can check https://pocketbase.io/docs/go-routing/#serving-static-files (replace os.DirFS with your embedded directory).


fix confetti animation on android

#140  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


Adjustments: When Adjustment is selected and a non-vaccine commodity is selected for adjustments, the "Returned to LGA" should not display as an option for "reason". "Returned to LGA" should only be an option for reason when a vaccine commodity is selected

@chai-lmis, I think we already have an alert just above the edittext when we try to choose "Returned to LGA"  in non-vaccine commodity. So you want to just remove that option?

It gets confusing for the users as the do not read these errors most times. The option should be removed for non-vaccine commodities


How to add ImGui to LibGDX?

Hello
i want to add ImGui to LibGDX but there is a lots of problems.
how to do this?

You may try one of many immediate mode libraries/imgui bindings for Java, but none have direct support from libGDX.
Since this is a question and not an issue with libGDX, please use IRC/Discord/forums for further questions, we'll be happy to help you there. This issue can be closed.


In follow up query, convert genomic location to hgvsg or region based on whether region annotation is enabled

Fix: https://github.com/genome-nexus/genome-nexus/issues/550
If region annotation is enabled: convert genomic location to region.
If region annotation is not enabled: convert genomic location to hgvs.
Test query:
7,55242467,55242486,AATTAAGAGAAGCAACATCT,AGCAA

code tested on annotation deployment of genome-nexus


Quickstart needs to walk through adding engine

Maybe it's something that's incredibly obvious to other people, but the quickstart doesn't actually get us to a useful point.
Without an engine, you can't do anything useful.
I've tried adding http://<IP_ADDRESS>:2375 as an engine, but all I get is
Error
Get http://<IP_ADDRESS>:2375/_ping: dial tcp <IP_ADDRESS>:2375: connection refused

Having problem adding a host engine on CentOS. Quickstart is still missing the quickstart.

I'm also receiving the same as @kadishmal. I'm stuck. I'm running shipyard inside an OS X boot2docker. No clue what to do.

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart: http://shipyard-project.com/docs/quickstart/#toc_4

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart: http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Just finally got a chance to try your example. the -v flag is causing an Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.

On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

(btw - UI instructions worked perfectly… Just the cli was giving problems due to -v)

ryan.

On Sat, Jan 3, 2015 at 4:25 PM, ryan baldwin<EMAIL_ADDRESS>wrote:

Just finally got a chance to try your example. the -v flag is causing an Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.
On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

It's working for me -- what version of Docker and how are you running it?
On Sat, Jan 3, 2015 at 4:25 PM, ryanbaldwin<EMAIL_ADDRESS>wrote:

Just finally got a chance to try your example. the -v flag is causing an
Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.

On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68610188.

boot2docker 1.4.1.
https://github.com/boot2docker/osx-installer/releases/tag/v1.4.1

ryan.

On Sat, Jan 3, 2015 at 5:17 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

It's working for me -- what version of Docker and how are you running it?
On Sat, Jan 3, 2015 at 4:25 PM, ryanbaldwin<EMAIL_ADDRESS>wrote:

Just finally got a chance to try your example. the -v flag is causing an
Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.

On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68610188.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68611816

was running it exactly as described in your example.
ryanbaldwin$ docker run -it —rm shipyard/shipyard-cli
shipyard cli> shipyard add-engine —id b2d —add https://…. (etc.)

NAME:
add-engine - add shipyard engine
USAGE:
command add-engine [command options] [arguments...]
OPTIONS:
--id 					engine id
--addr 'http://<IP_ADDRESS>:2375'		engine address
--cpus '1.0'					engine cpus
--memory '1024'				engine memory
--label '--label option --label option'	engine labels
--ssl-cert 					path to ssl certificate
--ssl-key 					path to ssl key
--ca-cert 					path to ca certificate
Unless, of course, I have screen face right now and can’t see what i’m doing wrong (certainly wouldn’t be the first time)

ryan.

On Sat, Jan 3, 2015 at 5:17 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

It's working for me -- what version of Docker and how are you running it?
On Sat, Jan 3, 2015 at 4:25 PM, ryanbaldwin<EMAIL_ADDRESS>wrote:

Just finally got a chance to try your example. the -v flag is causing an
Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.

On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68610188.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68611816

Yes that was a typo.  Fixed and pushed to the quickstart.
On Sat, Jan 3, 2015 at 5:24 PM, ryanbaldwin<EMAIL_ADDRESS>wrote:

was running it exactly as described in your example.
ryanbaldwin$ docker run -it —rm shipyard/shipyard-cli
shipyard cli> shipyard add-engine —id b2d —add https://…. (etc.)

NAME:
add-engine - add shipyard engine
USAGE:
command add-engine [command options] [arguments...]
OPTIONS:
--id engine id
--addr 'http://<IP_ADDRESS>:2375' engine address
--cpus '1.0' engine cpus
--memory '1024' engine memory
--label '--label option --label option' engine labels
--ssl-cert path to ssl certificate
--ssl-key path to ssl key
--ca-cert path to ca certificate
Unless, of course, I have screen face right now and can’t see what i’m
doing wrong (certainly wouldn’t be the first time)

ryan.

On Sat, Jan 3, 2015 at 5:17 PM, Evan Hazlett<EMAIL_ADDRESS>wrote:

It's working for me -- what version of Docker and how are you running
it?
On Sat, Jan 3, 2015 at 4:25 PM, ryanbaldwin<EMAIL_ADDRESS>wrote:

Just finally got a chance to try your example. the -v flag is causing
an
Incorrect Usage error. I’m using shipyard-cli:latest.
Suggestions?

ryan.

On Fri, Jan 2, 2015 at 7:41 PM, Evan Hazlett<EMAIL_ADDRESS>

wrote:

ha awesome. thanks!
On Friday, January 2, 2015, ryanbaldwin<EMAIL_ADDRESS>wrote:

Incredible. You just made my day. Thanks dude!

ryan.

On Fri, Jan 2, 2015 at 6:06 PM, Evan Hazlett <
<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

@ryanbaldwin @kadishmal @gnoymmij @atonit @airtonix
Added b2d instructions in the quickstart:
http://shipyard-project.com/docs/quickstart/#toc_4
Reply to this email directly or view it on GitHub:

https://github.com/shipyard/shipyard/issues/369#issuecomment-68571412

—
Reply to this email directly or view it on GitHub
<
https://github.com/shipyard/shipyard/issues/369#issuecomment-68574951>.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68576478

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68610188.

Reply to this email directly or view it on GitHub:
https://github.com/shipyard/shipyard/issues/369#issuecomment-68611816

—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-68612035.

I'm also getting the connection refused error, though I'm using the actual IP of the docker host.  Centos 6.5, maybe that's one of the offending OS's w.r.t TCP?

Check your firewall rules.
On Mon, Feb 9, 2015 at 5:08 PM, Andrew Stewart<EMAIL_ADDRESS>wrote:

I'm also getting the connection refused error, though I'm using the actual
IP of the docker host. Centos 6.5, maybe that's one of the offending OS's
w.r.t TCP?
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-73600994.

@andrewcstewart I got the same situation, cannot add-engine by shipyard cli. I created another issue https://github.com/shipyard/shipyard/issues/437

I cannot add the engine even in UI. I did as the instruction and all I got was this error message Get http://<IP_ADDRESS>:2376/_ping: malformed HTTP response "\x15\x03\x01\x00\x02\x02"

It looks like you are trying to connect to a TLS instance?  Have you looked
at http://shipyard-project.com/docs/quickstart/#toc_4 ?
On Fri, May 22, 2015 at 11:50 AM, Kha<EMAIL_ADDRESS>wrote:

I cannot add the engine even in UI. I did as the instruction and all I got
was this error message Get http://<IP_ADDRESS>:2376/_ping: malformed
HTTP response "\x15\x03\x01\x00\x02\x02"
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-104696155.

It was my fault. I used https and it works now. Thanks!

On Sat, May 23, 2015 at 12:28 AM, Kha<EMAIL_ADDRESS>wrote:

It was my fault. I used https and it works now. Thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-104839152.

404 on http://shipyard-project.com/docs/quickstart/#toc_4
dang

The docs have been restructured.  This is no longer valid.
On Sun, Oct 4, 2015 at 2:49 AM, wildone<EMAIL_ADDRESS>wrote:

404 on http://shipyard-project.com/docs/quickstart/#toc_4
dang
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/369#issuecomment-145323025.

how does it work now ?


Set up client_credentials with passport laravel 5.4 error

Hi,
Sorry for my English not good. However, when I using client_credntials with passport and I get error:
[message] => The resource owner or authorization server denied the request.
[hint] => Missing "Authorization" header

Below is my project file that I've been set up.
My Kernel.php file:

protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
           // \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
        ],
        'api' => [
            'throttle:60,1',
            'bindings',
        ],
    ];

/**
 * The application's route middleware.
 *
 * These middleware may be assigned to groups or used individually.
 *
 * @var array
 */
protected $routeMiddleware = [
    //'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
    'can' => \Illuminate\Auth\Middleware\Authorize::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
    'scopes' => \Laravel\Passport\Http\Middleware\CheckScopes::class,
    'scope' => \Laravel\Passport\Http\Middleware\CheckForAnyScope::class,
    //'client_credentials' => \Laravel\Passport\Http\Middleware\CheckClientCredentials::class,
    'client_credentials' => \App\Http\Middleware\CheckClientCredentials::class,
];

My config\auth.php file:
`'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
        'api' => [
            'driver' => 'passport',
            'provider' => 'users',
        ],
        'admin' => [
            'driver' => 'session',
            'provider' => 'admin',
        ],
    ],`

My App\Providers\AuthServiceProvider file:
public function boot()
    {
        $this->registerPolicies();
        Passport::routes();
        Passport::tokensExpireIn(Carbon::now()->addDays(15));
        Passport::refreshTokensExpireIn(Carbon::now()->addDays(30));
        //Passport::enableImplicitGrant();
        Passport::tokensCan([
            'users' => 'Action with users',
            'bds' => 'Action with bds',
        ]);
        //
    }

My route:
Route::middleware('client_credentials')->get('/test', function () {
	return response()->json([ 'status' => 'ok' ], 200);
});
Route::any('/getToken', function(){
	$guzzle = new GuzzleHttp\Client;

	$response = $guzzle->post('http://localhost/oauth/token', [
		'form_params' => [
			'grant_type' => 'client_credentials',
			'client_id' => 'id',
			'client_secret' => 'secret',
			'scope' => 'users bds',
		],
	]);

	$obj = \GuzzleHttp\json_decode($response->getBody());
	$token = $obj->{'access_token'};

	echo $token;

	$guzzle = new GuzzleHttp\Client;
	$response = $guzzle->request('GET', 'http://localhost/test', [
		'headers' => [
			'Accept' => 'application/json',
			'Authorization' => 'Bearer '.$token,
			'Scope' => 'users bds',
		],
	]);
	echo $response->getStatusCode();
	var_dump($response->getHeader('content-type'));
	echo $response->getBody();
});

Anyone to help?

It doesn't look like you are using this library at all, so I don't know how we can help you.


2023 Intro to RNA-seq (20th - 24th February)

Wei is delivering a workshop on the 2023 Intro to RNA-seq (20th - 24th February) course. Needs to prep materials, work, etc.

[x] Prepped materials
[x] Practiced presentation
[x] Workshop materials delivered
[x] Workshop delivered

Good job Wei! Great feedback from trainers.


Create Synchronizing Project for the web tasks with Planner and To Do

This change is part of "Project Planner Integration" work. Roadmap id - https://www.microsoft.com/en-us/microsoft-365/roadmap?rtc=1&filters=Planner&searchterms=382207

I want to attach this image along with the text, couldnt find a way to do that

@jacktremper can you please review and merge this, I dont have the write access, hence the request.

@jenzamora and @mscharlo to review and sign off

My question is where do you want this to show up in the table of contents and are there any articles that we could link to at the bottom for a kind of "learn more" for users that you can think of? This article also needs some metadata added to the top so it can be properly in our system (I am new so learning what this needs to be, but just thought I would mention, I will suggest it in a second round of edits once I know what it is supposed to be).

@mscharlo The content has to show up between "Turn Project for the web or Roadmap on or off for users in your organization"  and "Project architecture overview"

@mscharlo I dont have the write access, can you please merge this PR and publish the content?

@jenzamora please tag for publishing

Closing this pr as I had @soursh re-submit a pr on the OfficeDocs-ProjectServer-pr repo instead. Thank you!

[like]  Sourabh Sharma reacted to your message:

From: Michelle Scharlock @.>
Sent: Friday, April 19, 2024 4:02:50 PM
To: MicrosoftDocs/OfficeDocs-ProjectServer @.>
Cc: Sourabh Sharma @.>; Mention @.>
Subject: Re: [MicrosoftDocs/OfficeDocs-ProjectServer] Create Synchronizing Project for the web tasks with Planner and To Do (PR #166)
Closed #166https://github.com/MicrosoftDocs/OfficeDocs-ProjectServer/pull/166.
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/OfficeDocs-ProjectServer/pull/166#event-12541612930, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVXVDULAEFJBRRIKPQFDXNLY6E52VAVCNFSM6AAAAABF76Z446VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGU2DCNRRGI4TGMA.
You are receiving this because you were mentioned.Message ID: @.***>


Iperf3 runner and the whole thing

This PR was supposed to just do the Iperf3 runner part, so we can easily programatically start the Iperf3 test, but once that part was done... the whole tying up part was also done and the feature was completed on this branch.
Could use a review and probably some more cleaning up but for now, it works, and seems stable.
Oh right - it's still lacking the whole "sending to the server" part, which can be done in a PR of it's own.

Summary by CodeRabbit

New Features

Introduced a speed monitoring feature in GPS monitoring, triggering tests based on speed thresholds.
Added a new method to initiate a default 15-second Iperf3 test.
Implemented a reusable TimerWrapper class for enhanced task scheduling.

Enhancements

Improved thread safety in parameter management and listener handling.
Enhanced logging and error handling in various components for better visibility.

Bug Fixes

Filtered out null entries in cell information lists to prevent UI issues.

Lifecycle Management

Added proper listener unregistration in LoggingSettingsFragment to prevent memory leaks.

@coderabbit review

Alright, LGTM, lets save the merge for tomorrow and then get on sending teh data to the server. And if everything checks out - making the demo app.


Definitively remove legacy projects

We will have to still wait a bit for this one as there is still people with legacy projects... Let's give them a bit more time...


Complete project - Full review

Project Description:

This is a mobile web app that uses live data from restCountries API and populates the homepage with a list of countries, their names, flag, population and capital city. It has a search feature where users can search for any country from the API and then get more details of the country on a new page when selected.

@KayLemba  Thank you


chore: Refer to latest Ruby 3.0 with 2 positions in CI matrix

The setup-ruby Action will read those two positions, and find the latest release it knows about, that matches. So, this change hopes to reduce the maintenance needed for this configuration file.
(YAML: The value is quoted, in order to have it be presented in "name" directives etc as "3.0", not as "3".)

Thanks for the fix. This is my first time using GitHub Actions and I just used the auto-generated one from bundle gem --ci=github. If you’re interested you might want to submit a PR to Bundler to fix the auto-gen yaml.

@BMorearty Thanks for the breadcrumb, I started https://github.com/rubygems/rubygems/pull/5089


feat: notify scrim players [CU-863fyx0gz]

Task linked: CU-863fyx0gz Notification to Scrim Players


custom Element slot insert error

Version
3.2.20
Reproduction link
https://playcode.io/828855/
Steps to reproduce
<my-button>
  Button
</my-button>

final render dom tree
<my-button>
  ShadowRoot

        <slot></slot>

  Button
</my-button>

What is expected?
<slot> is not inserted correctly.
What is actually happening?

should be:
 _createElementVNode(
        "div",
        { class: "my-button-content" },
         _renderSlot(_ctx.$slots, "default")) //here is an Object

slot content is an object no an Array

see
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots
https://mdn.github.io/web-components-examples/simple-template/


Filter AttValue with #any-of?

Did you check existing issues?

[X] I have read all the tree-sitter docs if it relates to using the parser
[X] I have searched the existing issues

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
tree-sitter 0.22.2
Describe the bug
Hey Devs 👋🏻 ,
This might be more of an understanding issue that a bug, because I'm new to the tree-sitter syntax :swe.
I'm using tree-sitter-xml 0.6.1 alongside tree-sitter 0.22.2 in a rust project.
In which I want parse a xml file like this:
   ...
    <import>
        <module name="module1" />
        <module name="module2" />
        <module name="module3" />
        <module name="module4" />
        ...
    </import>
   ...

My goal is to check if certain modules are listed which I try with this query:
(element
    (_
        (Name) @name
        (Attribute
            (AttValue) @module_name
        )
    )
    (#eq? @name "module")
    (#any-of? @module_name "module1" "module3" "module4")
)

Apparently this query produces no matches. Without the (#any-of? @module_name "module1" "module3" "module4") I get all modules.
I expected to Match against only the against "module1" "module3" and "module4".
thanks in advance 😄
Steps To Reproduce/Bad Parse Tree
see in the description
Expected Behavior/Parse Tree
see in the description
Repro
see in the description

It's because AttValue includes the quotes.
(element
  (_
    (Name) @name
    (Attribute
      (AttValue) @module_name))
  (#eq? @name "module")
  (#any-of? @module_name "\"module1\"" "\"module3\"" "\"module4\""))

Worked 😄 thanks for the quick answer 👍🏻


Secure three substations on saltern

About the PR

Substations on the saltern map are now all behind engineeringlocked doors.
Why / Balance

Saltern was made before this was a mapping convention.
Technical details

n/a
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Southwest substation (new vs old): Note that some disposal tubes and wiring were moved around here in order to lead those through doors and under catwalks instead of through walls.

Chapel substation (new vs old):

Southeast solars substation (new vs old):

Breaking changes

n/a
Changelog

n/a, see comments below

Please read our guidelines on change logs an fix your CL
https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog

idk if this needs a changelog, i typically dont do mapping changelogs unless its a large change

Changelog removed as per above, sorry for the bother!

pro substations in maints submissive and unanchorable

im gonna ban you off github so you have to use discord

i will ban you from xbox my dad owns michaelsoft :trollface:


Apply shadows under menus

What
It's a bit ugly that the shadow of one menu appears on top of the other imho, but that's not easily fixed in egui (and Mårten is okay with it). The alternative is a smaller blur radius.
After

Alternative
Here are the default shadows in egui:

Checklist

[x] I have read and agree to Contributor Guide and the Code of Conduct
[x] I've included a screenshot or gif (if applicable)
[x] I have tested the web demo (if applicable):

Using newly built examples: app.rerun.io
Using examples from latest main build: app.rerun.io
Using full set of examples from nightly build: app.rerun.io

[x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
[x] If applicable, add a new check to the release checklist!

[PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
[Docs preview](https://rerun.io/preview/{{ pr.commit }}/docs)
[Examples preview](https://rerun.io/preview/{{ pr.commit }}/examples)
Recent benchmark results
Wasm size tracking

If anyone wants to experiment, you can change the shadows while Rerun is running in the egui menu:


Added support for importing/export element index settings in Craft 2.5

Backwards compatible with Craft 2.4
WIP: unit tests

:shipit:


Add Crypto.com Wallet Extension

Add Crypto.com Wallet Extension to cosmos-kit

tested and installed the wallet, but while it showed up in the list, it didn't show up as installed. Looking into the code to get the extension

Osmosis support is not in the current production build yet. We are planning to release the new version with it next week, which should by then contains the window property of cdc_wallet.
(Below is a screenshot from our dev build)

Is it possible to merge this PR before our new version is publicly released? Or would you have to verify this with a working production build on chrome store before this could be merged? If it is of the latter case then please wait for our update next week and I should mark this PR as draft for now.

I understand it's working and in dev, makes sense it showed up as not installed. I published it so you can test:
 -<EMAIL_ADDRESS> -<EMAIL_ADDRESS>


#463: Add gateway.networking.k8s.io/policy annotation

Closes #463

Add the gateway.networking.k8s.io/policy annotation to policy CRDs
Verification

Run kustomize build config/crd
Verify that the output includes the annotation in the DNSPolicy and TLSPolicy CRDs

/lgtm


Feature request: Add Table is-dark

Add table is-dark class similar to the container.

Closing this because of #78 was merged.


feat: Support  multi-level directories

Support  multi-level directories such as /files/sample-pilet/1.0.0/static/js/0.c0dcd813.chunk.js

Version number has been updated!


LLVM.SetGC("shadow-stack") causes AccessViolationException

I've asked this on the LLVM mailing lists but have got no traction. I've even opened a bug:
https://llvm.org/bugs/show_bug.cgi?id=23095
I'm opening a bug here because it means LLVMSharp can't set gc information on a function

You need to link in shadow stack GC. The problem is that they are not exposed via C bindings.
I have a review out to LLVM folks: http://reviews.llvm.org/D8788

The code review is still pending, but I'm going to provide a fix for it as a wrapper on both Linux and Windows in the next release which is going to happen co-inciding with LLVM 3.6.1 (so about a week or so)

I have a fix for this as part of LLVM 3.7 release

This has been fixed in https://www.nuget.org/packages/LLVMSharp/3.7.0-rc4-final and beyond, the final release is due in a week.

Fixed with LLVM 3.7 release: https://www.nuget.org/packages/LLVMSharp/3.7.0


Add schema validation for service instance operation via ajv

Add a  middleware, which validates the parameters based on the schemas defined in the service plan.
TODO:

[ ] Add tests
[ ] Special handling for the update case: If the deployment is updates via the /admin api there are special service fabrik parameters. This should still be possible

As discussed before this is my current implementation state as a basis for the schema validation.

Pull Request Test Coverage Report for Build 3115

9 of 25 (36.0%)  changed or added relevant lines in 2 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 89.7%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

common/errors.js
1
2
50.0%

broker/lib/middleware.js
8
23
34.78%

Files with Coverage Reduction
New Missed Lines
%

data-access-layer/cf/TokenIssuer.js
1
98.57%

Totals

Change from base Build 3111:
-0.2%

Covered Lines:
9360

Relevant Lines:
10082

💛  - Coveralls

@steinri Can you please handle TODOs and Review comments so that this PR can be merged.

@steinri
Can you please fix eslint: https://travis-ci.org/cloudfoundry-incubator/service-fabrik-broker/jobs/583179633#L218
Rest of the PR looks great. Thanks.

Hi @steinri
I have fixed the eslint error, I hope that's alright.
Thanks again for the PR. merging...

@amitmalav thanks =)


Incorrect example Number field

The example for the NumberField seems to be incorrect, the correct structure that worked for me, was:
...NumberField(
  {
    name: "yield",
    label: "Yield",
    required: true,
  },
  {
    suffix: "%",
    decimalScale: 0,
    fixedDecimalScale: true,
  }
),

version: ^1.1.1

Thanks for reporting this, forgot to update the readme in the 1.0 update. Fixed now!


Example Schema

possible to have an example Schema

A skeleton schema is available here:
https://github.com/xRJx/skeleton-fundamentals
Although it may need a few updates @xRJx

thanks


Request for backporting to 3.0.0

This is a request for backporting the following PRs/commits:

https://github.com/zephyrproject-rtos/zephyr/pull/43309:

on main branch:
fd231e32e92a5b78a0d5d18450ef1384b52a70f8 arm64: Fix booting issue with FVP V8R >= 11.16.16
3c1f3197e2f02f24fd1d06aeab700096a97d639d cmake: armfvp: Add FVP min version check
3875a1e7870804c44c9ca03fb4ac6e2f4ec38de0 board: arm64: fvp_baser_aemv8r: Update the version requirement
a483828d46a37630f1819f62be689a3d7c5409a7 board: arm64: fvp_baser_aemv8r_smp: Increase CONFIG_MAX_THREAD_BYTES

https://github.com/zephyrproject-rtos/zephyr/pull/43576:

on main branch:
3122b9ed107d877444d34f34111331400d45bc58 arm64: smp: Fix broadcast_ipi issue
65d7e64e06b298b0ee86ae373c0d1f662e0ce0e7 board: arm64: fvp_baser_aemv8r: Fix misc SMP issues
48cce661d5d1085f1cb0fa121f866ecdaac400c0 board: arm64: qemu_cortex_a53: Increase CONFIG_MAX_THREAD_BYTES

https://github.com/zephyrproject-rtos/zephyr/pull/43845:

on main branch:
1a682680a72d0b6788ead6bffbc60cab27caa7f8 cmake: armfvp: Improve the FVP version check
a072a801e768ffca24a0710b20e84d9e7141edca cmake: armfvp: Remove the unnecessary parameters
7ea0591d30fac3c9880f1e16409ce351c59e0719 arm64: v8r: Enable AARCH64_IMAGE_HEADER by default
357aacab6b8a10d54e1fa4f180e3da212cc23d1d boards: fvp v8r: Fix the SRAM/FLASH to the right address

Generally, most of them fixed arm64 fvp v8r platform, one commit fixed qemu_cortex_a53 compile error

@povergoing There is no need to create an issue requesting backport, you can add the backport v3.0-branch label to a PR and a backport PR will be automatically created for you (if there is a merge conflict, you may need to manually create one).

@povergoing There is no need to create an issue requesting backport, you can add the backport v3.0-branch label to a PR and a backport PR will be automatically created for you (if there is a merge conflict, you may need to manually create one).

@stephanosio Thanks for reminding me. Sounds very convenient!

@dkalowsk @stephanosio  I have added the backport tag into the PRs that I need. So should I close this issue?

@povergoing linking the backport to this issue would help give a reason for why it was needed/done.

@povergoing linking the backport to this issue would help give a reason for why it was needed/done.

The followings are the backport link:
https://github.com/zephyrproject-rtos/zephyr/pull/45452
https://github.com/zephyrproject-rtos/zephyr/pull/45450 depends on #45452
https://github.com/zephyrproject-rtos/zephyr/issues/45451 also needs #45452, I will manually fix the auto backport failure when #45452 merged


"XAML parsing failed" - do you think this is a good description of the runtime error?

How developer should looks for an error by this message? Why you can't print error details - XAML fragment, line and error reason?

@RealTommyKlein and @fabiant3 FYI

Adding @alwu-msft (who owns the parser, but is OOF ) and @manodasanW from the CSWinRT team.  The Xaml framework does surface more detailed information, but it's getting lost when raising the exception.  It seems like CSWinRT's WinRT.Runtime.dll, which creates the Microsoft.UI.Xaml.Markup.XamlParseException exception (the "XAML parsing failed" error) doesn't include the more detailed information contained in the restricted error info (e.g. "Cannot create instance of type 'Reunion10ExpCSharp.UserControl1' [Line: 12 Position: 10]").  Ideally the main exception message would include that additional information, since it's only accessible by looking at the debug spew from the Output window:

@manodasanW, can the XamlParseException here also use the restrictedError string in its exception message to surface this information to developers more easily?  Thanks!

I have been looking into propagating the restricted error description as part of the exceptions we create from Marshal.GetExceptionForHR.  As part of that, I can also look at propagating it for XamlParseException.
https://github.com/microsoft/CsWinRT/issues/430

When such Xaml Parse Error occurs, how shall we figure where exactly ? This is one of older code, which worked with a former WinUI DLL. Xaml ought to be okay.

Closing as this morphed in #7033.