Missing directory slashes when completion chosen

Checklist

[X] I have read through the manual page (man fzf)
[X] I have searched through the existing issues
[ ] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version
0.53.0 (c4a9ccd)
OS

[ ] Linux
[ ] macOS
[X] Windows
[ ] Etc.

Shell

[ ] bash
[X] zsh
[ ] fish

Problem / Steps to reproduce
Thanks for the fab tool.
For a new windows install I'm working on I am getting the backslashes that separate directories all go missing when I hit enter to choose an entry which then means the path is corrupted.
I have done a load of searching and can't find any mention of this being an issue anywhere or what it might be. I don't know enough about how fzf works to guess further so any ideas welcome.
Begin a completion with file **<tab>:

Hit enter to choose an item in a subfolder and all the slashes are missing:

Curiously if I call fzf directly and then search it works fine:

This is my dotmatrix config for the windows machine (windows branch) at time of writing https://github.com/timabell/dotmatrix/blob/0c0de5b7107de4a43c22f1f6c727b2537ffc1056/.zshrc#L107

Is this WSL? Looks like you're running an fzf binary for Windows that uses backslash as the file separator. How did you install fzf?

You should be using Linux binary on WSL. It works for me fine.

Please comment if you still have the problem with a linux binary.

Hi, thanks for responding, this is not WSL, this is zsh installed directly on windows, being used in windows terminal.
Yes this is still an issue.
I am unable to use WSL because it's a Virtual Box windows image, and for some reason I can't get the nested virtualisation to work.

Oh, so does zsh transform the path separators on Windows so you can access paths in Unix style? If that is the case, the Window binary of fzf needs a way to use forward-slashes instead.

@charlievieth Hi, would it be possible to add path separator option to your fastwalk library for cases where you want forward slashes on Windows? I guess fzf can replace backslashes with slashes afterwards if that is not possible.

@charlievieth Hi, would it be possible to add path separator option to your fastwalk library for cases where you want forward slashes on Windows? I guess fzf can replace backslashes with slashes afterwards if that is not possible.

My first thought is that fastwalk is really only concerned about directory traversal and should provide its callback canonical paths so maybe an adapter like the one below would work (which if need be I could add to fastwalk as an adapter):
// ~120ns for a path like "C:\Users\username\go\src\github.com\charlievieth\fastwalk"
// no-op if the path separator is `/`
func ForwardSlashPaths(walkFn fs.WalkDirFunc) fs.WalkDirFunc {
	return func(path string, d fs.DirEntry, err error) error {
		return walkFn(filepath.ToSlash(path), d, err)
	}
}

That said, WSL is a funny thing (Linux, but Windows) and having to convert the path each time does incur some cost so if we think the cost of an adapter is too much then more than happy to add it as an option.

Following up on my last comment: an adapter on the fzf side is best way to immediately fix this issue; I think this should be supported in fastwalk the question is whether it's in an adapter (like the one below) or as a config option. I'll think about this and post a new release in the next few days.
func toSlash(path string) string {
	if os.PathSeparator == '/' {
		return path
	}
	i := strings.IndexByte(path, '\\')
	if i < 0 {
		return path
	}
	b := []byte(path)
	for ; i < len(b); i++ {
		if b[i] == '\\' {
			b[i] = '/'
		}
	}
	return unsafe.String(&b[0], len(b))
}

// ~50ns if the PathSeparator != `\`
func ToSlashPaths(walkFn fs.WalkDirFunc) fs.WalkDirFunc {
	return func(path string, d fs.DirEntry, err error) error {
		return walkFn(toSlash(path), d, err)
	}
}

Thanks for the quick response!

an adapter on the fzf side is best way to immediately fix this issue

So if I understood correctly, fzf can replace the separators itself if needed, and it doesn't require a code change in fastwalk. Something like this:
diff --git a/src/reader.go b/src/reader.go
index f39f47f..3a15ac4 100644
--- a/src/reader.go
+++ b/src/reader.go
@@ -8,6 +8,7 @@ import (
 	"os"
 	"os/exec"
 	"path/filepath"
+	"strings"
 	"sync"
 	"sync/atomic"
 	"time"
@@ -254,6 +255,7 @@ func (r *Reader) readFiles(root string, opts walkerOpts, ignores []string) bool
 					}
 				}
 			}
+			path = strings.ReplaceAll(path, `\`, "/")
 			if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher([]byte(path)) {
 				atomic.StoreInt32(&r.event, int32(EvtReadNew))
 			}

	b := []byte(path)

I thinkunsafe.StringData can help here.
https://github.com/junegunn/fzf/blob/a06745826a4cba4f578a69258f9def75c59530fc/src/functions.go#L29-L31

bf515a3d3251c54d04cd8e2e9f422cdd3f789fb8 implements --walker-path-sep.
Please let me know if it doesn't work as expected.

@junegunn I just cut v1.0.5 which includes https://github.com/charlievieth/fastwalk/pull/23 and adds an option for enforcing forward-slashes and adds the DefaultToSlash function which detects if we're a Windows executable running under WSL (and enforces forward-slashes if so). This should solve the issue here.
I cut a draft PR https://github.com/junegunn/fzf/pull/3907  that should address this issue. It probably needs to be updated since it's currently incompatible with the -walker-path-sep option (it only allows the option to force forward slashes, but does auto-detect when they're needed on WSL see: DefaultToSlash).

@charlievieth Thanks for looking into this. I'd also like to avoid adding an option and automatically print the right separator, but @timabell stated above that he was having the problem not on WSL but on zsh on Windows. I don't have experience with it so I'm not quite sure but it looks like zsh on Windows is doing some path conversion.

@timabell Can you tell us more about your setup? How did you install zsh on Windows? Is it msys?

Hi,
Sorry, I'm not 100% sure how I ended up with this zsh installed. It did quite possibly come with git extensions or msys git. It was a while ago that I set this VM up.
This is the windows terminal config for the zsh profile that I use to launch it:
            {
                "closeOnExit": "always",
                "commandline": "\"%PROGRAMFILES%\\Git\\usr\\bin\\zsh.exe\" --login -i",
                "guid": "{27ed4f8e-4ea3-4dae-b251-0a792cadd5cd}",
                "hidden": false,
                "name": "zsh",
                "startingDirectory": "C:\\dev\\"
            }

This is what the zsh says about itself
╭─User@WinDev2404Eval /c/dev/dotmatrix ‹windows›
╰─$ which zsh
/usr/bin/zsh
╭─User@WinDev2404Eval /c/dev/dotmatrix ‹windows›
╰─$ zsh --version
zsh 5.9 (x86_64-pc-msys)
╭─User@WinDev2404Eval /c/dev/dotmatrix ‹windows›
╰─$ file `which zsh`
/usr/bin/zsh: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows, 11 sections

So it's MSYS2.
I just tested these things both on bash and zsh on MSYS2, and realized that they work as expected on bash even though fzf is printing paths with backslashes, because the bash script properly escapes the selected entries.

vim <CTRL-T>
Select foo\bar\baz
vim foo\\bar\\baz. Yes.

However, the escaping part is missing on zsh version, and it becomes vim foobarbaz. So we can fix this by properly escaping backslashes on the zsh script.
Using read -r instead of read is a start.
diff --git a/shell/completion.zsh b/shell/completion.zsh
index 46103f9..dce74c6 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -171,7 +171,7 @@ __fzf_generic_path_completion() {
             rest=${FZF_COMPLETION_PATH_OPTS-}
           fi
           __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" --walker "$walker" --walker-root="$dir" ${(Q)${(Z+n+)rest}} < /dev/tty
-        fi | while read item; do
+        fi | while read -r item; do
           item="${item%$suffix}$suffix"
           echo -n "${(q)item} "
         done
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 1490595..8cb95cd 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -52,7 +52,7 @@ __fzf_select() {
   local item
   FZF_DEFAULT_COMMAND=${FZF_CTRL_T_COMMAND:-} \
   FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --walker=file,dir,follow,hidden --scheme=path" "${FZF_CTRL_T_OPTS-} -m") \
-  FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd) "$@" < /dev/tty | while read item; do
+  FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd) "$@" < /dev/tty | while read -r item; do
     echo -n "${(q)item} "
   done
   local ret=$?

Then it gives vim foo\bar\baz. It's an improvement but it's not quite there 😕

You can test this on non-Windows environment by setting
FZF_CTRL_T_COMMAND='echo "foo\bar\baz"; echo "hello\world"'

bash gives foo\\bar\\baz hello\\world
zsh gives foobarbaz helloworld

Having said that, things will be just simpler if fzf prints forward slashes.

You can test this on non-Windows environment by setting
FZF_CTRL_T_COMMAND='echo "foo\bar\baz"; echo "hello\world"'

bash gives foo\\bar\\baz hello\\world
zsh gives foobarbaz helloworld

@LangLangBart Your expertise in zsh will be really helpful here. Would it be possible to make zsh behave the same as bash in this case?


Round font sizes to the nearest tenth.

Summary:
Using random font sizes explodes memory use because processing.js
caches PFont instances using the the font name and size as the cache
key.  Because the size is random, none of the cached font instances
are reused because we keep caching them.  A better solution would be
to use a LRU (Least Recently Used) cache like jscache.  If this continues
to be a problem we can look into changing the cache system.
Test Plan:

open demos/simple/index.html in live-editor (in Firefox)  and type the following code:

    draw = function() {
        textSize(random(10,30));
    };

check memory use using top or Activity Monitor and very that it tops out around 2GB (as opposed to continually growing)

Auditors: pamela

The reason why this is a pull request is because the processing-js submodule in live-editor is still pointing to my repo.  I'll fix this after the merge.


[B] Record update based tests

Detect if records in a table change.
Specifically whether the following operations occurred

Insert
Update
Delete

No need to detect before and after


No way to listen to custom events exposed by custom elements

Tracking issue for the point, "Custom events" described in https://github.com/yewstack/yew/issues/1666
Problem

Yew should allow users to listen to custom events as well and pass CustomEvent to the callback.
There should be a way to deal with names like the ones used here. It can be a function on NodeRef or special syntax in html!, not 100% sure on the API.

from #1666
Questionnaire

[ ] I'm interested in fixing this myself but don't know where to start
[ ] I would like to fix and I have a solution
[x] I don't have time to fix this right now, but maybe later

I apologize it took me so long to create this issue after being requested here (https://github.com/yewstack/yew/issues/1666#issuecomment-765852652)

I created a discussion to discuss potential solutions: https://github.com/yewstack/yew/discussions/1779

For a NodeRef version I first though of something like this:
    pub fn attach_event_listener<S, E>(
        &self,
        event: S,
        callback: Callback<E>,
    ) -> Option<gloo::events::EventListener>
    where
        S: Into<std::borrow::Cow<'static, str>>,
        E: AsRef<web_sys::Event> + JsCast + 'static,
    {
        use gloo::events::*;
        let event_target: EventTarget = self.get()?.into();
        match &callback {
            Callback::Callback { passive, .. } => {
                let passive = passive.unwrap_or_default();
                let listener = EventListener::new_with_options(
                    &event_target,
                    event,
                    EventListenerOptions {
                        phase: EventListenerPhase::Bubble,
                        passive,
                    },
                    move |e| callback.emit(e.clone().unchecked_into()),
                );
                Some(listener)
            }
            Callback::CallbackOnce(_) => {
                let listener = EventListener::once(&event_target, event, move |e| {
                    callback.emit(e.clone().unchecked_into())
                });
                Some(listener)
            }
        }
    }

We'd probably avoid leaking the gloo::events::EventListener type in the actual impl but just makes this example bit easier to read :)
Then in the rendered function of a component you might do something like this:
fn rendered(&mut self, ctx: &Context<Self>) {
    match (self.node_ref.get(), self.click_listener.as_ref()) {
        (None, Some(_)) => {

            self.click_listener.take();
}

Sorry for the accidental closing 😢

Is there no workaround for this issue :cry: ? newbie here

@dfenerski Check the documentation here
I think that should work. But I'm also new to Yew and would really like to see this solved in an easier way...
@hamza1311 Has anything happened here after the discussion #1779 ?


Remove version: Stackers.Stack version 3.34.2

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://binaries.getstack.app/builds/prod/win/x64/Stack Setup 3.34.2-x64.exe
Response status code does not indicate success: 530 ().
(Automated message - build 896)


add 10xdev.cc

https://10xdev.cc/
Size: 374B (uncompressed)
https://gtmetrix.com/reports/10xdev.cc/aqYVAqEQ/

The submitted link does not seem to satisfy rule 5.


Support Outside Collaborators

Need to show these in Members, with something to indicate they're an outside collaborator.
Also show them in Teams.

Done (adc38d28c726e5c4efeebd73ac449cf3e6bf208f)


Laravel 11.x Compatibility

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 11.x.
Before merging, you need to:

Checkout the l11-compatibility branch
Review all comments for additional changes
Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^10.5. If you would like to also upgrade your tests, you may run the PHPUnit 10 Shift for free.

:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 11. However, you should review these changes to ensure the desired combination of versions are built for your package.

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-multiplex.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:
{
    "require": {
        "kolossal-io/laravel-multiplex": "dev-l11-compatibility",
    }
}

Finally, run: composer update

Any news on this?

Will deliver tommorow. :)

@marijoo any news ?

Sorry, very busy these days. Planning to release next week 🤞🏻

Laravel 11 support rolled in with v1.3.0.


Add DataSF logo

Need to add the "logo" for DataSF.

did we decide to replace the CfA logo with DataSF, or add DataSF?

Do we have the logo for this? I wasn't able to find anything with a quick search.

cc @jeanwalshie @jasonlally

I can add it.

@jasonlally @hackajesse a related idea: someone suggested that we include information about how this was developed and how people can do something similar in their own city. the logos go to our agency pages, where one could potentially piece it all together, but there's nothing about this particular app and how it came to be. thoughts?

Good idea! I think that is out of scope of this issue though, I'll create a separate one to discuss it.

Bump @jasonlally :)

@jasonlally now would be a good time to add that DataSF logo cuz we're gonna start promoting this app! :)

i see the logo is up. looks like we can close this? @jasonlally

Yep


Add IT that checks all views at least loads properly without errors

configure a GH action to run it on each PR

Currently this is half done. Now there is one smoke test with Playwright that checks the about view loads properly. Should modify that so that:

List all add-on views
Navigate to each of them
Ensure somehow that they load in at least somewhat sane way


Graph Mode Doesnt Work

I have OHM setup with the port open correctly on the latest release 1.1.1. I can get text and dial readings no problem, but when selecting graph, nothing changes, it just stays stuck on either text or dial, and no graph shows, and the number doesn't update.
I would just like to be able to use the graph mode as that is what I am used to viewing on my stream deck.

I think I should add a solid graph mode instead of line because for some, it may be hard to see that there is any line there.

Implemented as feature #6


Bad mapping of select query after migration

Hi, I had this model in database version 1
CREATE TABLE agents (
    _id INTEGER PRIMARY KEY NOT NULL,
    name TEXT,
    query_text TEXT,
    section_id TEXT,
    category_id TEXT,
    category TEXT,
    price_from INTEGER as Integer,
    price_to INTEGER as Integer,
    locality TEXT,
    distance INTEGER as Integer,
    real_estate TEXT,
    domain TEXT NOT NULL,
    enabled INTEGER as Boolean NOT NULL DEFAULT 0,
    new_data INTEGER as Boolean NOT NULL DEFAULT 0,
    create_date INTEGER as Date NOT NULL,
    last_seen TEXT,
    zip_code TEXT
);

then I changed DB version to 2 and updated model with the new column section:
CREATE TABLE agents (
    _id INTEGER PRIMARY KEY NOT NULL,
    name TEXT,
    query_text TEXT,
    section_id TEXT,
    section TEXT,
    category_id TEXT,
    category TEXT,
    price_from INTEGER as Integer,
    price_to INTEGER as Integer,
    locality TEXT,
    distance INTEGER as Integer,
    real_estate TEXT,
    domain TEXT NOT NULL,
    enabled INTEGER as Boolean NOT NULL DEFAULT 0,
    new_data INTEGER as Boolean NOT NULL DEFAULT 0,
    create_date INTEGER as Date NOT NULL,
    last_seen TEXT,
    zip_code TEXT
);

I've created alter table statement:
ALTER TABLE agents ADD section TEXT;
But now my app crashes due to wrong mapping from columns to Kotlin properties, it seems shifted. This is generated mapper class (I insert image because there are parameter name hints)

But if I place breakpoint inside mapper and get index of my new "section" column its 17 instead of 4

It seems that its because I specified column section in CREATE TABLE statement in fourth position but ALTER TABLE inserts it at the end. I suppose its intended behavior but I think it would be better to not depend on indexes from CREATE TABLE but instead call cursor.getColumnIndex(columnName)

once we start checking migrations we'll just fail this situation since the schema's are different. If we rely on getColumnIndex that means you have to name every column as well. You also wouldn't be able to have two columns in the result set with the same name. Neither of those are restrictions on SQLite so I'd rather not enforce those restrictions in SQLDelight

Ok, so what is the correct way to handle that? Place new columns to the end? Or do not use * in SELECT queries?

either place new columns at the end or recreate the table with the order you want instead of using ALTER TABLE
I think long term after we start verifying migrations we'll also have intentions in the IDE for doing this kind of "simple" migration for you (like adding a column) which should also help with this problem

Ok, thanks :)


WIP: move AKS diagnostics commands to their own folder

@FumingZhang - we discussed shuffling some code around to make it more amenable to unit testing, using the draft folder structure as an example.
Opening this as a draft so you can tell me if it's roughly what you were thinking, before I spend more time adding tests for it.
Suggestions about where to place test file would be most welcome!
cc: @zhoxing-ms

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

AKS

Personally, I suggest that make a separate file aks_diagnostics.py be placed in folder src/aks-preview/azext_aks_preview/ to store the customized methods of diagnostics, instead of creating a separate directory.
@FumingZhang What do you think of it?

Personally, I suggest that make a separate file aks_diagnostics.py be placed in folder src/aks-preview/azext_aks_preview/ to store the customized methods of diagnostics, instead of creating a separate directory. @FumingZhang What do you think of it?

Changed as discussed. How's it looking now @zhoxing-ms and @FumingZhang?


run --tmpfs broken in 0.8.5-1.gitdc5a711.fc28

podman run --tmpfs /run alpine date
container create failed: container_linux.go:336: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:57: mounting \\\"tmpfs\\\" to rootfs \\\"/var/lib/containers/storage/overlay/1a5d80f6c51d35b22372b1fa0b8debb568fd02b3aa5c9002be44cbf3e0a81d25/merged\\\" at \\\"/tmp/runctmpdir276283260\\\" caused \\\"tmpcopyup: failed to move mount /tmp/runctmpdir276283260 to /var/lib/containers/storage/overlay/1a5d80f6c51d35b22372b1fa0b8debb568fd02b3aa5c9002be44cbf3e0a81d25/merged/run: invalid argument\\\"\""
: internal libpod error

podman-0.8.5-1.gitdc5a711.fc28. Runs fine on 0.8.4-2.git9f9b8cf.fc28.

Could you update the runc version that is in updates-testing and see if this fixes it

It does:
Upgrading        : runc-2:1.0.0-51.dev.gitfdd8055.fc28.x86_64
Cleanup          : runc-2:1.0.0-46.dev.gitb4e2ecb.fc28.x86_64
....
# podman run --tmpfs /run alpine date
Sat Sep  1 17:16:04 UTC 2018

Thanks, Dan. I wonder if the podman RPM should be rebuilt to add this dependency on runc?

Yes I think that would be a good idea.

Yes 0.8.5-5 has the correct fix.


Biometric template decryption

Do you have any idea how biometric template can be decrypted?

No I don't. You can refer to this link: https://forum.lowyat.net/topic/3050752


Case(2): Add a changed line

Adds a changed line

Successfully created backport PR #84 for case2-backport-target.


Issue #SB-9002 & #8496 feat: Card redesign and RTL

This PR includes -

[x]  Card Redesign
[x]  Blue theming
[x]  Basic RTL support
[x]  Font support for multilingual
[x]  Body alignment with the header
[x]  Code cleanup as much as possible.

@bvinayakumar - Pls merge this pr.

Cannot merge this PR due to following reasons:
a) Conflict needs to be resolved
b) Before and after screenshots are not provided


tsv auto folder detection for pr pipeline run

I was thinking of a slightly different approach:

Script should be a standalone ps1 file, so it can be used on dev machines as well.  For example, sometimes I want to run tsp compile . on every spec in the repo on my dev machine.

Inputs:

string path to repo root
boolean specifying "all specs" or "only changed in git diff"

Output:

List of string paths to folders containing tspconfig.yaml files (not all folders containing *.tsp files)

Verify script can be used on a dev machine.  Command in bash (run from repo root) would be something like this:

for folder in `pwsh list-typespec-folders.ps1 .`; do npx --no tsv "$folder"; done

Update eng/pipelines/typespec-ci.yml to use script to validate all spec folders in a single step, using "all specs" by default, and "only changed in git diff" in PRs.
Delete eng/pipelines/templates/steps/typspec-ci.yml


EXPERIENCE DUPE

I found a duplication bug with exp trading
When you trade exp, levels are stacked other levels,
if players1 trades 20 levels to player2, and player2 already has 10 levels, his balance becomes of 30 levels, in this way you can dupe levels because 20 levels from 0 are different from 20 levels from 10
Example:
Player1 has 10 levels, player2 has 10 levels, if player1 trades with player2 10 levels, player2 experience is stacked to 20.
But the 10 levels of player1 wanst from 10 to 20 but from 0 to 10.
You must use experience orbs and not levels..
Sorry for bad english

Unfortunately, I cannot solve this since it just allows to trade levels. Switching to exp points solves this.

I can't remove because /ts layout is broken on the latest update too..

i sent you a video on discord

Unfortunately, I cannot solve this since it just allows to trade levels. Switching to exp points solves this.

Actually, you can. Calculate the amount of exp in the amount of levels to exp points by using:
(level)^2 + 6*(Level) (at levels 0-16)
2.5*(level)^2 - 40.5*(level) + 360 (at levels 17-31)
4.5*(level)^2 - 162.5*(level) + 2220 (at level 32+)
Then, get the amount of exp the target player currently has and sum this up. Remove the amount of exp from the source player. This will prevent the dupe and would make trades a lot easier by selecting the amount of levels to its equivalent amount of exp.
(Source: Official Minecraft Wiki)

Unfortunately, I cannot solve this since it just allows to trade levels. Switching to exp points solves this.

Actually, you can. Calculate the amount of exp in the amount of levels to exp points by using:
(level)^2 + 6*(Level) (at levels 0-16)
2.5*(level)^2 - 40.5*(level) + 360 (at levels 17-31)
4.5*(level)^2 - 162.5*(level) + 2220 (at level 32+)
Then, get the amount of exp the target player currently has and sum this up. Remove the amount of exp from the source player. This will prevent the dupe and would make trades a lot easier by selecting the amount of levels to its equivalent amount of exp.
(Source: Official Minecraft Wiki)

Unfortunately, I know a few people who customize this. So I cannot really use this equation...

would be great if this could get fixed.


Updates to accessions.tsv (15281 new, seqs downloaded 2021-04-09)

NCBI Datasets/Virus downloads started updating normally again and now there are 15281 new mappings.  :)  Happy weekend!

Thanks Angie, as always! Will get these processed and into the pipeline now! :D


WIP: clippy cleanup

Clippy has quite a lot to say about the code base.
This intended to be a gradual cleanup.
Feel free to reject if there are other ideas or policies on clippy, or pickup up commits incrementally if deemed useful.
I'll be adding more work here as time permits.

@imp thanks for the PR! I still had a branch with some clippy-suggested fixes sitting in my local clone, so I've pushed that out to #104 to prevent duplicate work.

Also, I have run clippy on the code base a few times and cleaned stuff up. However, in doing so I've mostly ignored clippy::cast_lossless for now, as I'm not quite convinced of the cost/benefit there. I also feel clippy::needless_pass_by_value often has false positives in the sense that we sometimes want to pass by value conceptually even if the callee doesn't technically need ownership. too_many_arguments and cyclomatic_complexity I've ignored for now as we work out better APIs and merge/split functions to improve the internal design. option_option does need work, but definitely needs @Ralith's input for better-defined enums.
I think that covers everything I know about but have not fixed (or postponed) so far.

Quite agree with your points. Let me see if I can come up with anything simple and non-controversial.

Perhaps we should also add local allow() for the needless_pass_by_value, that would be a good addition IMO.

However, in doing so I've mostly ignored clippy::cast_lossless for now, as I'm not quite convinced of the cost/benefit there.

I personally stopped using as conversion in my own code in favor of uXX::from().
The latter is essentially the former:
impl From<u8> for u64 {
    #[inline]
    fn from(smalr: u8) -> u64 {
        small as u64
    }
}

However, it is a matter of policy. If as conversion if preferred though, I'd suggest setting
#![allow(clippy::cast_lossless)] at the top level.
Thoughts?

Can you fix up my formatting bug in the initial commit? That way CI will pass.

Can you fix up my formatting bug in the initial commit? That way CI will pass.

Rebased on latest master, which eliminated the offending code.

Commits ed66828 and 6817993 are not clippy-related.
First a style cleanup, which is admittedly a matter of personal preferences. If this is acceptable I suggest conversion throughout the code base.
Second is a usability improvement, prompted by the follow-up commit.

I'm not convinced about adding is_client() and is_server(). It is slightly more concise, but at the expense of adding boilerplatey functions to the enum's impl block.
Collapsing the if can be done even without the is_client() and is_server() change, I assume.

@djc Correct, collapsing if does not require is_client() change.
I'd personally prefer concise over the slim impl block, but that's ultimately your call.

@Ralith do you have an opinion either way on is_client()/is_server()?

I'm okay with it; I'm generally on board with going to small amounts of extra effort to make downstream code read better.


correct header guards and add missing headers and declarations

Description
This PR is a superset of the previously opened PR https://github.com/intel/qpl/pull/38
The code changes in this PR were generated automatically by the Permanence AI Coder and reviewed by myself. The goal of this PR is to fix several buggy header files and improve compatibility with C++. The changes in this bugfix PR include:

updates several header files to add include guards which were previously missing
update two files to fix include guards which were incorrect.
adds explicit declarations for implicitly extern functions in .c sources which did not previously have declarations in headers
add header files as needed to support the new declarations

on-behalf-of: @permanence-ai<EMAIL_ADDRESS>Checklist

No new tests as this is purely a build-time correctness update
Software path test results had only expected failures (per latest release notes) following the changes:

[----------] Global test environment tear-down
[==========] 385 tests from 125 test suites ran. (444798 ms total)
[  PASSED  ] 334 tests.
[  SKIPPED ] 45 tests, listed below:
. . .
[  FAILED  ] 6 tests, listed below:
[  FAILED  ] ta_c_api_deflate_stateful.dynamic_default_verify
[  FAILED  ] ta_c_api_deflate_stateful.dynamic_high_verify
[  FAILED  ] ta_c_api_deflate_stateful.fixed_default_verify
[  FAILED  ] ta_c_api_deflate_stateful.fixed_high_verify
[  FAILED  ] ta_c_api_deflate_stateful.static_default_verify
[  FAILED  ] ta_c_api_deflate_stateful.static_high_verify

 6 FAILED TESTS
  YOU HAVE 22 DISABLED TESTS

@mzhukova This branch has been regenerated with adjustments to the header guard style, and reducing the number of headers created just to those which are needed for additional declarations. Note the limit here is that it does not attempt to create new extern declarations for functions that use a macro to define the signature.

I think this one require rework and rebase, so will be moving to draft state meanwhile.


not able to install this package from the atom Package menu. constantly shows install waiting icon for long duration

I am getting this error while trying to install
`Installing<EMAIL_ADDRESS>failed.Hide output…
events.js:160
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '/Users/sumit/.atom/packages/node-requirer/node_modules/es6-symbol/.lint'
at Error (native)`


docs: Fix a few typos

There are small typos in:

CONTRIBUTING.rst
README.rst
docs/custom_usage.rst
docs/reference/backends.rst
docs/usage.rst

Fixes:

Should read satisfied rather than satisifed.
Should read responsible rather than responsbile.
Should read relevant rather than releveant.
Should read precedes rather than preceds.
Should read against rather than agains.

Semi-automated pull request generated by
https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

Thank you! These kinds of changes may seem small but in aggregate they make a difference.


Fix overflow error

Fixes https://github.com/qweeze/rstream/issues/153

@DanielePalaia should we add a test for that?

ref protocol https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_stream/docs/PROTOCOL.adoc#publish
ublish => Key Version PublisherId PublishedMessages
  Key => uint16 // 0x0002
  Version => uint16
  PublisherId => uint8


Vertical divider

Fixes #20826

If this was originally spawned from another PR that had been tagged with "needs love", please link to the original PR in the commit message to provide proper attribution.

/cc @Hixie
what was the motivation for getting away from the axis property in favor if a separate VerticalDivider class?

See my comment above - if we added the axis based config we would have to deal with resolving width vs height in the constructor and allowing users to potentially create a bunch of invalid states. "I provided a width and a height why isnt the divider a rectangle". We could handle that with asserts but it feels bad.

Aha - in that comment, I read "suggested" as "suggest", which was very confusing since it looked like @jslavitz had already done that 😄


Why does my non-nullable navigation property have a nullable backing field?

I created the following class:
class Post
{
    public Blog Blog { get; set; }
}

but the backing field in the database is BlogId (FK, int, null) instead of not null. I have enabled nullable reference type in my project. Is there anything else I should configure?
Thank you.

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

ID: 93c3721a-da23-d9ea-a054-9d786d2ff4d2
Version Independent ID: 6d3b0f96-6642-75e5-93c8-02c23f142ac4
Content: Working with nullable reference types - EF Core
Content Source: entity-framework/core/miscellaneous/nullable-reference-types.md
Product: entity-framework
Technology: entity-framework-core
GitHub Login: @roji
Microsoft Alias: avickers

Note for triage: I am able to reproduce this.
#nullable enable

public class Blog
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public class Post
{
    public int Id { get; set; }
    public string Content { get; set; }

    public Blog Blog { get; set; }
}

public class SomeDbContext : DbContext
{
    private static ILoggerFactory ContextLoggerFactory
        => LoggerFactory.Create(b => b.AddConsole().SetMinimumLevel(LogLevel.Information));

    public DbSet<Blog> Blogs { get; set; }
    public DbSet<Post> Posts { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        => optionsBuilder
            .UseSqlServer(Your.ConnectionString)
            .UseLoggerFactory(ContextLoggerFactory)
            .EnableSensitiveDataLogging();
}

public class Program
{
    public static void Main()
    {
        using (var context = new SomeDbContext())
        {
            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
        }
    }
}

      CREATE TABLE [Blogs] (
          [Id] int NOT NULL IDENTITY,
          [Name] nvarchar(max) NOT NULL,
          CONSTRAINT [PK_Blogs] PRIMARY KEY ([Id])
      );

      CREATE TABLE [Posts] (
          [Id] int NOT NULL IDENTITY,
          [Content] nvarchar(max) NOT NULL,
          [BlogId] int NULL,
          CONSTRAINT [PK_Posts] PRIMARY KEY ([Id]),
          CONSTRAINT [FK_Posts_Blogs_BlogId] FOREIGN KEY ([BlogId]) REFERENCES [Blogs] ([Id]) ON DELETE NO ACTION
      );


Some projects/collections 404

Which area(s) are affected? (leave empty if unsure)
Frontend
To Reproduce
Examples:

https://www.opensource.observer/collections/filecoin-builders
https://www.opensource.observer/projects/pinatacloud

Describe the Bug

Expected Behavior
A project/collection page should load

This is actually behaving as intended from the perspective of the frontend ---  if you do this SQL query in Clickhouse
SELECT * FROM projects_v1 WHERE project_name = 'pinatacloud';

Yields no results.
Are these new to oss-directory?
If so, I suspect that we've imported to BigQuery already (which populates Algolia), but we haven't copied the marts to Clickhouse.

Gonna try copying projects_v1 and collections_v1 from BQ to Clickhouse here
dagster.opensource.observer/runs/4420f2ca-0693-4361-a3fa-22380346be5a

We fixed the bq2clickhouse factory yesterday. I think this just involves running those jobs again

We manually copied a bunch of tables last week. Closing this as @ravenac95 is working on getting the end to end pipeline running again


Remove bad ;

This example broke for me as a result of the ;

Good catch. Thanks for contributing!


Update ol peer dependency

This MR updates the ol peerDependency to >= version 9 as version 9 is already included in the devDependencies.
@terrestris/devs please review

Since this is a major update of OpenLayers I prefer to declare this as a braking change. Could you please change the commit message accordingly  @mholthausen ?


As an end user I want to see a overview of all sites

Acceptance criteria

End user should, when having clicked the menu point "all sites", be navigated to a overview of all sites

In order to ensure good quality we should (Keep the ones we need for this US)

[ ] Perform integration testing
[ ] Perform functional testing
[ ] Extra focus on usability
[ ] Test for accessibility
[ ] Perform user testing

related to #748


Fix V2Typing send multiple times

With multiple pollers for the same user or different users with the same room, it may happen that SetTyping is called concurrently or in such short sequence that the map holding the hashes hasn't been updated yet.
This can result in unneeded published notifications.

Yep. This PR mainly fixes the race condition, so I'd be totally fine to remove the "sorting" changes and only fix the race condition first. (which in turn hopefully reduces the amount of notifications we send)


Support storing, querying on arbitrary properties for Survey

An applications may contain more than one survey, or multiple versions of the same survey. Such applications may need to select surveys based on or report about surveys taken using more information than is allowed for in the Survey model. Some examples for NCS instruments include the version of the instrument definition on which the survey is based or the source instrument's type code.
Such applications have the option of defining additional attributes on the Survey model. Then they face another question: how to populate these additional attributes? If they are related to how the survey is defined (as with the NCS examples), it would make sense to keep them with the corresponding survey. Unfortunately the survey DSL is not extensible, so this is not an option.
While making the survey DSL extensible might be a good idea later, for now I propose adding a set of arbitrary properties to the Survey model. These could be defined in the DSL:
survey 'INS_BIO_Sample' do
  property :instrument_version, '2.0'
  property :instrument_type_code, '7'

  section 'Start' do
    # ...
  end
end

Then you could read them from a survey instance:
s = Survey.first
s.properties[:instrument_version] # => "2.0"

Or query for matching surveys:
Survey.find_by_property(:instrument_version, '2.0').collect(&:title) # => ['INS_BIO_Sample']

Then you could read them from a survey instance:

Or, perhaps easier to implement:
s = Survey.first
s.property(:instrument_version) # => "2.0"
s.properties # => { :instrument_version => "2.0", :instrument_type_code => '7' }; read-only

Sounds great to me, although I don't think rails would support Survey.find_by_property by default.
I'm sure we could write methods, though, that would work around this. Here's one solution, although it uses serialized text in a single field rather than a to_many model
https://github.com/moiristo/dynamic_attributes (serialized)

I don't think rails would support Survey.find_by_property by default.

Yeah, I'm sure it wouldn't. I just wanted to sketch out what a desirable API would be for discussion purposes.

Here's one solution [...]

I'd be inclined to do an associated model (the relational term for this would be an entity-attribute-value table, or EAV) since we would want to be able to support efficient querying. I only found one EAV library and it doesn't seem to be actively maintained, but it's also not something that's hard to do by hand with AR.

Great. I had trouble finding a good EAV library as well.


Use CompletionService in IntellisenseService

At the moment, the CompletionService is only used for keywords, everything else is coming from Recommender.
This PR introduces relying on CompletionService for all completions.
The symbols are still processed the same way as before, so none of the existing features are broken, but extra features available via  CompletionService also show up in intellisense now (as we process all of its providers).
This will close a lot of open bugs via a relatively risk-free change.
I will push some tests into this soon but here are some of the examples of new features that are introduced via this PR:
Attribute completion without Attribute

Cref completion

Object initializer members completion

Named parameters completion

Override support
Note: because of this Regex in omnisharp-vscode, where brackets are removed, it appears a little broken. This change would need to be done in omnisharp-vscode.

thanks, I agree that in order to properly benefit from all the power of CompletionService we'll need a brand new endpoint.
What I tried to do here was to improve the current behavior as much as possible, with relatively small change to the current way the server operates, to solve a few annoyances 😃

The failures on *Nix look real.

The failures on *Nix look real.

Yes it was actually caused by this https://github.com/dotnet/corefx/issues/15825#issuecomment-277722247 "bug" ("behavior"?) of CoreFX - default US culture-based sort behavior is different on Windows and *nix. It should be fine now.

Note: because of this Regex in omnisharp-vscode, where brackets are removed, it appears a little broken. This change would need to be done in omnisharp-vscode.

FWIW, I've never noticed that regex. It existed before I was on the project, so it's presence is a mystery.

All right. Merging... :smile:

awesome! 🐣☀

Hello - sorry to bother but a cluster of issues all point to this. I don't get intellisense for C# object initializers in VSCode and it seems this has been a feature for years, right? I'm fully up to date, I think; I don't know how to check the version of OmniSharp.
My question is: where do I go for help on this?

I have to +1 @lukepuplett as it seems I'm experiencing the same thing. Trying to get intellisense for class properties in its initializer is sending me straight to the Process namespace (halfway through the full .NET namespace list) instead of sending me to the top of the list (where the properties are).
I opened a bug report in VSCode here but maybe it's related to this instead? https://github.com/microsoft/vscode/issues/128963


Remove compiler/parser subtree, use libdash pip module

Work in progress.

What is the status of this? Is it getting close to mergeable?


qownnotes: 22.7.1 -> 22.7.6

Description of changes
Update QOwnNotes from 22.7.1 to 22.7.6
Remove @dtzWill as maintainer of QOwnNotes as discussed in PR #181219

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@Mindavi Please review and merge the removal of @dtzWill as a maintainer of QOwnNotes, as you've suggested in our discussion on PR #181219.

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

1 package built:

qownnotes


Hide Component Statuses from Container Provider Summary

The Component Statuses reappeared after OpenShift fixed the permissions to access them. Previously we were logging the error:
[----] E, [2016-04-07T22:24:43.573511 #6941:f1796c] ERROR -- : Unexpected Exception during refresh: HTTP status code 403, User "system:serviceaccount:management-infra:management-admin" cannot list all componentstatuses in the cluster

and the Component Statuses were not appearing (because of the collection failure).
Now that we can collect them the broken information is displayed:

Related issue https://github.com/openshift/origin/issues/3667
For the time being as the output is confusing we should hide the table.

@miq-bot add_label providers/containers

@miq-bot add_label bug

@simon3z given that componentstatuses are still broken in openshift (always give errors, openshift/origin#3667), @bazulay is asking why do we still collect and store them?
It's cheap, but takes some maintenance effort...
(eg. I've now spent several hours doing vcr cassette archaeology on them...)


Error when using tab delimiter on file path

When using get-content -Path ./Downloads/ and then pressing Tab, I am warned that there were 409 options to show and whether or not to show them (y or n) when I typed n the list started to populate then received an errors as listed below:
WhirlLast 48 Keys:ved_questions.xml                                                   g e t - c o n e Backspace t e n t Enterdpoint Manager (BigFix) -unsigned.xml    Ctrl+C UpArrow Spacebar - f i Tab Tab Tab Tab Backspace Backspace p Tab Tab Tab a Tab Spacebar . / D o w n l o a d s Tab Tab Tab y                                           windows-patch_5.10.xml                                            Exception:                                     windows-vuln_5.10.xml            System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.                  Parameter name: top              Windows10Compatibility.xml                     Actual value was -144.                                            Within Critica   at System.Console.SetCursorPosition(Int32 left, Int32 top)                      at Microsoft.PowerShell.Internal.TTYConsole.SetCursorPosition(Int32 left, Int32 top)                                             zabbix_appliance_3.0.3.iso     at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor(Int32 x, Int32& y)        at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor()                         at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()                        at Microsoft.PowerShell.PSConsoleReadLine.Render()                  ZBSTAN02.   at Microsoft.PowerShell.PSConsoleReadLine.PossibleCompletionsImpl(CommandCompletion completions, Boolean menuSelect)                                            at Microsoft.PowerShell.PSConsoleReadLine.CompleteImpl(Nullable1 key, Object arg, Boolean menuSelect)    at Microsoft.PowerShell.PSConsoleReadLine.Complete(Nullable1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

The stack trace is different, but #503 is very likely the same thing. At any rate, the code has been rewritten significantly and likely is fixed.


Error handling is not working

When I try to do something as simple as this but the object in question has a invalid field :
this.cliente.save().subscribe(result => this.navCtrl.pop());
Response http error code:
PUT http://api.xx.com/client/3 422 (Unprocessable Entity)
Response body error message:
{"email":["maritte@sosa is not a correct email address"]}
I got this error log message javascript issue:
ERROR TypeError: Object(...) is not a function
    at CatchSubscriber.selector (ngx-restangular.js:173)
    at CatchSubscriber.error (catchError.js:104)
    at MapSubscriber.Subscriber._error (Subscriber.js:132)
    at MapSubscriber.Subscriber.error (Subscriber.js:106)
    at MapSubscriber.Subscriber._error (Subscriber.js:132)
    at MapSubscriber.Subscriber.error (Subscriber.js:106)
    at FilterSubscriber.Subscriber._error (Subscriber.js:132)
    at FilterSubscriber.Subscriber.error (Subscriber.js:106)
    at XMLHttpRequest.onLoad (http.js:2281)
    at t.invokeTask (polyfills.js:3)

When I should get some error message like "is not a correct email address" from the server that I could process in the error function from the subscriber like:
this.cliente.save().subscribe(result => this.navCtrl.pop(), error => console.log(error.responseStatus))
But I can't because the javacript error on ngx-restangular the error function is not working properly; this call work fine is I send a valid field.
It seems like the error catch is not working properly in ngx-restangular; and instead is throwing this "ERROR TypeError: Object(...) is not a function"
I am using angular 5.2.11 with ngx-restangula 4.0.1 and core-js 2.6.1

the issue was that I was using angular 5 with RxJS 5 instead of the RXjs 6


Unexpected results from websockets + wait_for timeout

HI!
I have this script, the intent is to measure the time it takes to raise a connection timeout. With aiohttp's ws implementation, the timeout works as expected – stopping at the specified time (5 seconds), precisely. With websockets the timeout is always 2x or 3x longer, regardless of which particular timeout setting i specify. For the testing purposes I'm running it against a dummy ws server @ localhost that just hangs all connections forever in the upgrade state, forcing clients to timeout.
from asyncio import get_event_loop, wait_for
from datetime import datetime
from websockets.client import connect
import aiohttp

def iso():
    return datetime.now().replace(microsecond=0).isoformat()

async def test():

    timeout = 5.0  # seconds

    print('------------------------------------------------------------------')

    session = aiohttp.ClientSession()
    print(iso(), 'aiohttp started')
    try:
        await wait_for(session.ws_connect('ws://<IP_ADDRESS>:8080'), timeout=timeout)
    except Exception as e:
        print(iso(), 'aiohttp', str(e))
    print(iso(),'aiohttp done')
    await session.close()

    print('------------------------------------------------------------------')

    print(iso(), 'websockets started')
    try:
        await wait_for(connect('ws://<IP_ADDRESS>:8080'), timeout=timeout)
    except Exception as e:
        print(iso(), 'websockets', str(e))
    print(iso(),'websockets done')

    print('------------------------------------------------------------------')

get_event_loop().run_until_complete(test())

Here's my results with websockets 7.0:
mbp:ccxt.pro igorkroitor$ uname -a
Darwin mbp.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
mbp:ccxt.pro igorkroitor$ python3 --version
Python 3.7.2
mbp:ccxt.pro igorkroitor$ pip3 list | grep websockets
websockets        7.0
mbp:ccxt.pro igorkroitor$ pip3 list | grep aiohttp
aiohttp           3.6.2
mbp:ccxt.pro igorkroitor$ python3 websockets_vs_aiohttp.py
------------------------------------------------------------------
2019-12-12T23:02:41 aiohttp started
2019-12-12T23:02:46 aiohttp
2019-12-12T23:02:46 aiohttp done
------------------------------------------------------------------
2019-12-12T23:02:46 websockets started
2019-12-12T23:03:01 websockets
2019-12-12T23:03:01 websockets done
------------------------------------------------------------------

↑ With websockets 7.0 the time is always 2x or 3x longer than with aiohttp, all the rest being equal. And my main question is why?
Also, it's worth noting that something has been broken in between websockets 7.0 and websockets 8.1 in that regard, so in 8.1 the exception seems to break the code somewhere inside the websockets implementation:
mbp:ccxt.pro igorkroitor$ pip3 list | grep websockets
websockets        8.1
mbp:ccxt.pro igorkroitor$ python3 websockets_vs_aiohttp.py
------------------------------------------------------------------
2019-12-12T23:08:35 aiohttp started
2019-12-12T23:08:40 aiohttp
2019-12-12T23:08:40 aiohttp done
------------------------------------------------------------------
2019-12-12T23:08:40 websockets started
2019-12-12T23:08:55 websockets
Task exception was never retrieved
future: <Task finished coro=<_wrap_awaitable() done, defined at /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py:596> exception=InvalidMessage('did not receive a valid HTTP response')>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/client.py", line 101, in read_http_response
    status_code, reason, headers = await read_response(self.reader)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/http.py", line 139, in read_response
    status_line = await read_line(stream)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/http.py", line 213, in read_line
    line = await stream.readline()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/streams.py", line 496, in readline
    line = await self.readuntil(sep)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/streams.py", line 588, in readuntil
    await self._wait_for_data('readuntil')
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/streams.py", line 473, in _wait_for_data
    await self._waiter
concurrent.futures._base.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py", line 603, in _wrap_awaitable
    return (yield from awaitable.__await__())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/client.py", line 547, in __await_impl__
    extra_headers=protocol.extra_headers,
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/client.py", line 290, in handshake
    status_code, response_headers = await self.read_http_response()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/websockets/client.py", line 103, in read_http_response
    raise InvalidMessage("did not receive a valid HTTP response") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
2019-12-12T23:08:55 websockets done
------------------------------------------------------------------

Can anyone shed some light on the above?
Mainly, why is the timeout always longer than expected (always 2x or 3x specifically)?
How to handle the task exception deep inside the websockets' code ?

Can anyone shed some light on the above?

Indeed, there's a series of timeouts happening in sequence. Per the docs:

The close_timeout parameter defines a maximum wait time in seconds for completing the closing handshake and terminating the TCP connection. close() completes in at most 4 * close_timeout on the server side and 5 * close_timeout on the client side.

Mainly, why is the timeout always longer than expected (always 2x or 3x specifically)?

Shutdown can hang at several layers / steps. Unlike aiohttp, websockets doesn't return until the connection is actually closed.
I could divide the timeout value you provide by 4 or 5 respectively; then you'd ask why the connection times out in 50% or 60% of the value you provided respectively.
This isn't a big issue for most people because no one really cares about the exact shutdown delay, as long as nothing hangs or leaks.

How to handle the task exception deep inside the websockets' code ?

Probably websockets should take take care of this for you. Let's look at this.

Thx for your answer @aaugustin !

I could divide the timeout value you provide by 4 or 5 respectively; then you'd ask why the connection times out in 50% or 60% of the value you provided respectively.

As far as I understand, dividing or multiplying the specified timestamp isn't the best approach for a "timeout-while-connecting" case. Instead, it is expected to timeout at the exact specified time if the handshake is not done by that time. And if the handshake isn't over yet, then expecting a graceful shutdown sequence is most likely meaningless. At least, this is what the caller of wait_for would expect when a timeout is specified from any generic awaitable thing – because in the async-sense wait_for should raise an exception when the time is out, not too early, but also not too late (regardless of how many internals layers or steps are involved). In my mind, the connection timeout should limit the entire attempt, including the closing sequence. But I do understand the decisions behind the current design, though, thx for clarifying this!

This isn't a big issue for most people because no one really cares about the exact shutdown delay, as long as nothing hangs or leaks.

On one hand yes – when everything works smoothly, the bug goes unnoticed. However, i'm trying to implement a robust logic that will not crash in real life when something does not go right. In my case the user can have a set up of 20-40 simultaneous connections that aren't always stable since they work "in the wild", if you know what I mean (bad connectivity, abrupt disconnects, etc). Say, I'm implementing a reconnect-on-timeout logic and I want a swift reconnection, if a previous connection could not be established within a limited time. But if the previous attempt does not raise at specified time – then the code has to wait and potentially lose (whatever it is). I can probably  work around this issue by wrapping it in a userland class that will race([ timeout, connect ]) and will spawn a new connection while the previous one is still shutting down in the background if the timeout fires first. Having a wrapper class is much less convenient from the user's perspective, though. But anyways, thx again!

Perhaps one day websockets will have a trio implementation, then we can have nice timeouts.
It believe #574 covers any action that may result from this discussion so I'm going to close it!
PS - I reviewed the stack trace above and it makes sense: wait_for times out and cancels the coroutine, which results in CancelledError,  which websockets translates into InvalidMessage with a fairly clear error.


Fix "-1" array accesses in CommentsParser.

Similar to the fixes in https://github.com/babel/babel/pull/6580 and
https://github.com/babel/babel/pull/6581, accesses of the form
stack[stack.length - 1];

when stack can be an empty array are pretty bad for performance.
In this case it also breaks the type safety, since the function
last<T> is declared to only return values of type T, but
occasionally also returns undefined now, since the stack parameters
passed to it never contain a property "-1" and neither do the
Object.prototype or the Array.prototype.
This is a non-breaking performance fix, which adds proper checking
to ensure that last is only invoked on non-empty arrays.

Nice, thanks @bmeurer! (and turning off comments in the parser saves a lot as well 😂)


Extender Service Source Code

In several of the slides that I've read online there is mention of an Extender Service. I was wondering if the source code for this was available anywhere?

Hey, there's a extendModel method that should work for you - https://github.com/mgonto/restangular#creating-new-restangular-methods

@grabbou Cheers, I was able to cobble together code that worked for me using the extendModel.
angular.module('RankingsApp')
    .factory('Result', function( Restangular) {

        function Result(model) {

            angular.extend(this, model);
        };

        Result.prototype = {

            CalculatePoints: function() {
               return 10;
            }

        };

        return Result;
    });

And then in the extend model I used the following code
Restangular.extendModel('results', function(model) {
            var result = new Result(model);
            return result;
        });

Hope this helps other people looking to do something similar :)

Nice representative example of how to use extend model :) I am pretty sure this issue will be linked many times in the future.


Update the Get started/Designing page

As a Cupcake website designer

I need to: update the "Get the kit" and "Start designing" section content on the Designing page page

so that: our adopters can find the correct information about "Get the kit" and "Start designing".

Additional information

The current cupcake Get started/Designing page can be viewed here.

We need to update the folder naming and path to the "Get the kit" and "Start designing".

Acceptance criteria

[x] Updated content provided by @oliviaflory
[ ] Content and design updated with markdowns.
[ ] Content and design reviewed with Olivia and Wonil.

Box note with copy updates started here

Ready for you to review the content @wonilsuhibm Jenny and Jacob will be updating this page in markdown so there is no design mock up.
Updates have been made to:
File names, folder names and team names throughout the entire page based on our discussion last week
Added a section for explaining that our kits are for Sponsor adopters only right now, but to reach out to Linda if you'd like early access. Guessing you might have the most feedback on this section @wonilsuhibm
A few smaller updates to content under the Anatomy sections.
Preview the current page here
Box link to the updated copy here

Thank you, @oliviaflory.
@wonilsuhibm Let me know when I have your "good to go".

@oliviaflory I checked with Wonil and I think we are good to go.
Question:
"If you are not a Sponsor Adopter and would like access to the kits to preview the components before they are officially released, please request access through Github."
For the Github link, is the "Design Kit access request" Git template created? I can link it to our Git repo issue template page for now if it's not ready but you might want to create a task issue for it.

@JennySanchez  I just finished updating the copy, we ran our design kit name by Carbon team and ended up needing to make some changes.
The orange type indicates when the text should be set in the inline code snippet style.
I updated a few links
Let me know if you have any questions!
Link to boxnote

Question:
"If you are not a Sponsor Adopter and would like access to the kits to preview the components before they are officially released, please request access through Github."
For the Github link, is the "Design Kit access request" Git template created? I can link it to our Git repo issue template page for now if it's not ready but you might want to create a task issue for it.

I just created the template to request access, and just need Wonil and Linda to review it, I will send you the link as soon as they can take a look!

Sounds good, @oliviaflory !

@oliviaflory Perfect. Thanks for all the help. I'll start adding this content to the page.

Olivia to provide links for the following:

[ ] Request access to design kit Github link
[ ] Link to White design kit
[ ] Link to Gray design 90 kit
[ ] Link to IBM.com library kit

All updates have been made to the designing page. Just needs a few updates on links coming soon.
Live link: https://deploy-preview-193--carbon-for-ibmdotcom.netlify.com/getting-started/designing
cc. @JennySanchez @oliviaflory

Let's hold on these updates for now, posting here so I can remember them all and update when we finalize some of the naming
Found a few things I missed! Updated in the Boxnote, but also here:

Link for Github

Copy update for section 4, links in Boxnote:
The full IBM color pallet lives in the IBM Design Language library. The IBM icons live in the IBM Icons (16px, 20px)  library and IBM Icons (24, 32px) library.

Should the icons be the Sketch logo instead of the Bee because they are Sketch libraries?

Copy update: change "Carbon" to "IBM.com" anywhere I accidentally left Carbon under structure
Note we may end up needing to update these names throughout the site once the Carbon for IBM.com vs IBM.com Library | Carbon debate is settled with Wonil, Mike and Matt.**

This should be a list, similar to the typography structure section.

If the Gatsby template won't let you make it a list, remove the "–" dashes.

Support section
Update "IBM.com components kits" to "IBM.com Library kits"

ok @jacobottesen-dgc and @JennySanchez based on the naming decision from today (Dec 17) to name our website and respective products IBM.com Library  I've updated the Get started designing Box Note to reflect all naming changes and link updates.
I also caught a few things I missed in the first round of writing.
All updates are in PURPLE 💜
Let me know if you have any questions

@wonilsuhibm on this page we refer to our team as "Carbon for IBM.com team" we should decide if we want to update the name or leave it.

@jacobottesen-dgc one more update, the folder has been renamed to: IBM.com Library Design kit
It will need to be updated on the website, marked it in Red within the Boxnote

@oliviaflory I am getting broken links for the theme cards on the designing page. Do you have an updated link?
Designing page live: https://deploy-preview-213--ibm-dotcom-library.netlify.com/getting-started/designing

@oliviaflory These links on the Get started designing page don't work. Do you know where we can get the correct links?

cc. @JennySanchez

Reached out to @jeffchew and @wonilsuhibm yesterday via Slack to find the links as well.

This is the Box link: https://ibm.box.com/s/fdoqr1qb4agyoys5j8wo19eab60m4ek1

Links updated and task completed.  All other Dev. related fix are recorded in the dev fix issue #63.


Limit impact on k8s apiserver in large clusters

What I would like to be able to do
I mentioned this briefly at the community meeting earlier today.
As a general best practice, DaemonSets should avoid watching a resource cluster-wide, such as watching all pods, all replicasets, all services, etc. Doing this can limit the maximum possible number of nodes in a cluster.  It is acceptable to watch pods assigned to the same node as the DaemonSet pod.  That actually generates less load on the kube-apiserver than a deployment with multiple replicas watching all pods, since the traffic is roughly O(pods * replicas) for the deployment. Ideally, I would like to be able to run Beyla with the following architecture:

The Beyla DaemonSet watches pods assigned to the same node as itself, and telemetry includes pod information.
A horizontally scaled deployment (e.g. the OpenTelemetry Collector) enriches telemetry with information about other k8s resources.

To do that, it would be nice to have more control over which k8s resources beyla watches.  This would typically be done using field selectors, similar to the prometheus server's selectors config in kubernetes_sd_configs.
Alternatives considered
The above will work well for single-application metrics, like HTTP golden signal metrics for a pod, since all relevant pod information is about pods running on the node.  However, if I want to make a service graph, the above approach won't work, as I would also need pod information about pods running on other nodes, which defeats the purpose of the improvement.  I had considered doing all IP -> Pod mapping in a deployment to enable that use-case.
The issue I ran into is filtering.  At least on GKE, there is a bunch of traffic to things I don't really care about (e.g. kubelet health checks).  I would like to be able to filter out things that aren't a pod, and only collect telemetry for pods, but I couldn't figure out how to do that (and couldn't think of a good way to implement it, either).

To expand on this - Kubernetes metadata decorator adds considerable load to Kubernetes API servers. Here's a graph of master nodes memory usage before and after disabling the decorator (yellow annotation on the graph).

I believe this issue was fixed on #997. Please reopen this issues if that's not the case, thanks!

Being tracked here #1198


Fix URL escaping for lock artifacts.

Fixes #2348

Sorry for the noise. There is some sloppy here I'd like to clean up. I'll convert to draft and ping you tomorrow when it's solid.

Alright, this is ready for review now. The 1st two commits fix CI bitrot and are off for review in #2351. This review is just of cd4db97 (the meat), and b70b6ab (which fell out cleanly).


kubernetes: Add missing pod delete RBAC permissions

Fixes:
level=error msg="pods \"cilium-etcd-r2kk6rfd5c\" is forbidden: User \"system:serviceaccount:kube-system:cilium-etcd-operator\" cannot delete resource \"pods\" in API group \"\" in the namespace \"kube-system\""

This change is

test-me-please


[help] How to set timeouts?

Hi,
Is there a way to pass the initialize_timeout_sec and disconnect_timeout_sec options (https://github.com/mfussenegger/nvim-dap/blob/61643680dcb771a29073cd432894e2f81a7c2ae3/doc/dap.txt#L134) to the Go debugger?
Thank you! 🙂

Hi @bravoecho!
You can configure nvim-dap independently from nvim-dap-go. All nvim-dap configurations will be honored by the time the debugger starts.


Create a console-only Token box

I think that we need a console-only token box. A grantee is struggling with getting his own environment up and running because he needs to:

Copy the token to his project,
generate noir types for the token,
generate typescript types for the token,
import it all and successfully deploy the token.

Is this something that is still needed or have the process changed so this have become easy? Essentially is this something we need to prioritize? @rahul-kothari might have some input here?

I don't totally grasp what's "console only" box. Usage using the CLI is quite well documented. Do they mean "node only" box?
If that's the case, then let's loop back on this once #4498 is finished @benesjan . The blank box should be absurdly barebones so I'm confident it would cover this situation

No UI.
Just run via scripts like we run e2e.

@signorecello maybe we can create a token-test box?

Not planned


fix pointer truncation caused by bad cast of 'LPVOID' to 'int'

Fix is needed for x64 shellcodes

yeah I'll take a look and get it merged


JWT auth added for users authentication

🛠 Fixes Issue

Closes #127
👨💻 Changes proposed

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

@KaizenGirl1111


feat(horaemeta): impl compaction nodes management service

Rationale
The subtask to support compaction offloading. See #1545
It is highly related to the this pr.
Detailed Changes

Horaemeta: Introduce CompactionNodeManager in ClusterMetadata

support register compaction nodes
support fetch compaction node with round-robin schedule strategy
horaemeta.

Add unit tests.

Test Plan
CI test & new unit tests

We can support this feature in future, just close now and can reopen when we decide to push it forward.


How do you calculate the patch affinity?

First, thanks for your exciting work. But I still feel a little confused about the construction of patch affinity for DINO. To my acknowledge, the value embeddings in the last attention layers are organized in form of multi-head structure, how do you deal with the multi-head value embeddings for calculating the similarity? Flattening the heads? Or calculating the similarities per head and averaging them? Hope for your answering.

Hi, thank you for your interest in our work! That's a very good point. We indeed flatten the heads, therefore one per-patch DINO embedding is a concatenation of the per-patch values from all the heads. I hope it makes it clearer.

That is clear. Thanks for answering!


Make votes app work with Python backend

Corrected realm name to 'votesapp' in Python votes backend.
Made wsuri calculation work under Firefox 37.0.2.
Fixes #12.

The URI fix is fine! The realm however should probably stay at realm1, as for historic reasons, this is used with many examples.
All the votes demo variants should use the same realm of course (realm1), which means https://github.com/crossbario/crossbarexamples/blob/master/votes/browser/.crossbar/config.json#L10 is in error.


40.add photo to mood event

Description
Can add a photo to a mood event. It will be stored in the Firebase Storage system under the "reasons" folder.
Closes #40
Proof of Concept
Checklist

[x] Follows style guidelines and is properly commented
[x] Code changes generate no new warnings
[x] Explained Testing Strategy

@raysarinas and @EPostill did not check to see if viewing vibe details was updated to include the photo reason 👎


Add generics to Promise?

"Is such a thing even possible?" CC @joshualitt

Honestly, we need to sit down and discuss this. Pre-inline classes, we can't do this. Post inline-classes we can, but should we? Type arguments for inline classes will be checked statically, but they won't be checked at runtime. On the one hand, then we get some documentation, but on the other hand it may lead users into a false sense of security.
So we need to decide, is it better to have type arguments that aren't reified, and to force users to write casts that are basically noops, or is it better to not have type arguments at all and to nudge users toward instanceof / typeof?
To be totally honest, I'm a bit on the fence, and I see both arguments. If I had to choose, I lean weakly towards not having type argument because I think they are deceiving, and may lead users to think they can rely on Dart type checking, vs. instanceof / typeof. I'd rather we completely disallow is and as on static interop types, and in the error messages we can point users towards typeof / instanceof. That will ensure users are guided towards best practices.
Thoughts?
@sigmundch @srujzs

I also lean towards not having the type-parameters. Every use of type parameters in JSInterop until now has been for documentation purposes, but also deceptive.
That said, I suggest we first create a few scenarios and evaluate once we have examples in front of us.

At a minimum, we could add a /// doc comment telling folks what type to expect.

Yes, I think we should document the generics, including Promise, JSArray, and any other generic objects.
Along that line of thinking, a big part of this is educating users on JS types(including static interop types). JS types don't really exist at runtime. Thus, rather than learning to rely on the Dart type system, which will just give them a false sense of security, they should treat JS types and static interop APIs like the actual JS types and JS functions they represent. That is, the types are just for documentation. If they are just passing the type back to JS, they may not care. If they do care about the type, then they need to use typeof and instanceof operators to ensure they have the type they expect, and then they can dispatch accordingly.
The nice thing here about this approach is it will always be consistent and exactly what a JS developer writing JS would have to do. Furthermore, we can include lints / static errors to ensure our users stay on the rails. That said, the vast majority of JS types just flow to and from JS, so most of the time users won't even have to think about these things.

I'm assuming Promise is implemented as an inline class. IIRC, one of the reasons we disliked type parameters on regular JS interop classes is because there is a runtime type associated with it, and therefore that introduces potential for confusion between the JS type and the written Dart type. With inline classes, this isn't the case, so type parameters on inline classes are only statically checked, regardless if they're interop inline classes or not. So using type parameters in this case is idiomatic.
That being said, I think it's fair to say that that behavior is confusing, especially since inline classes is a new concept for many users. Furthermore, inline classes allow users to introduce their own version of Promise with a type parameter anyways, so it's just a matter of ergonomics if we want to expose Promise with a type parameter.

...Having the generic in Promise makes SO MANY things easier.

So does dynamic ;-)
This is a very nuanced topic, and there is no right answer. I don't think anyone in this thread has strong feelings for or against this. I'm definitely open to being persuaded here, but for an MVP, it probably makes sense to do the restrictive thing first and then relax it later, vs. the alternative.
The crux of the problem is that the type argument when it is used on an external function is just a fancy comment, but users may be led to believe otherwise.
In general, we're moving away from pretending that the Dart type system is the source of truth for JS. This is because it leads users into a false sense of security. It is better for everyone if users program JS interop 'defensively', as opposed to assuming the guarantees of the Dart type system extend to JS interop.
With JS interop, we give the appearance of many types, but in reality every JS type is just a view on the only static JS type that there is, JSAny. If a user actually cares about the type of a JS object, then they need to use instanceof / typeof, not Dart's type checking operations. In fact, I'm hoping we disallow is / as checks on JS interop types entirely, and instead provide users checked and unchecked methods for performing these functions safely. Why provide unchecked variants? Simply so that users have to stop and think before they use is / as on JS types, thus introducing subtle bugs into their code. We can always have a flag to flip unchecked variants into checked variants, thus giving users a quick way to sanity check their code. I digress...
So returning to type arguments. Before inline classes, we have no choice here, we can't because type arguments on classes have a specific semantics we can't match. After inline classes, we can support this but should we? Is it really worse than just writing an explicit type?
I truly honestly don't know. The reason it might be worse than just writing an explicit type, is because now we have a non-local type to reason about.
For example, here is a regular inline class:
inline class Foo<T> {
  ...
  T doStuff() => methodReturnsT();
}

In this case, T is checked statically by the CFE and all is good and safe and sound.
What about this case:
inline class JSInteropFoo<T> {
  ...
  external T doOtherStuff();
  T doStuff() => methodReturnsT();
}

Now the T is checked in some cases and not others, some uses of the T are sound, some are not. A user may try to use a non-JS type, and now we have to check for that too. But of course, the type argument may only be used on non-external functions, and in that case a non-JS type is okay, so now we have to reason about that. These are just the complications I can think about from 2 minutes of thinking about this.
TLDR: Type arguments are really complicated, and they are tied inexorably to the Dart type system. Allowing them on JS interop types is not as clear cut as it seems. We may very well allow this at some point, but we really need to think through and ask ourselves if we are overpromising, or can we fully meet the guarantees for the Dart language w.r.t. type arguments on inline classes. If we can, then great, let's go for it, but if we can't then it could be a dangerous road to go down, for us and for our users.

For some flavor here, when I re-wrote the setup-dart action using the new static interop, the Promise class felt like using a very old version of Dart; not being any to annotate the js version of the future with the type that would come out of it was a little frustrating.
I gather that we don't want to make it seem like the type is something that can be relied on? Perhaps if we do have good docs that every JS type is really a JSAny, then having promise be Promise<T extends JSAny?> would be a good balance of things? It could serve as docs for what the promise was intending to return, but not over-promise in terms of the type that would come out?

Promise without the underlying type seems to be a huge step back.

On the one hand, then we get some documentation, but on the other hand it may lead users into a false sense of security.

As the author of js_bindings and an avid user of JS interop, I've never had this kind of problem.
I wonder if not having generics is a design decision based on the exception rather than the rule?

Interesting discussion! I think it would be useful to keep several different perspectives in mind when the topic is in the area of 'deceptive types'.
(Warning: Long rant ahead, perhaps not useful, but I'm trying to promote a couple of concepts that seem relevant to this discussion. I think the considerations about inline classes are relevant even in the case where you might plan to model a JS promise using a class JSPromise at the same level as JSObject -- the discussion above doesn't reveal that particular distinction, as far as I can see.)
Three ways to be unsafe
First, any inline type is somewhat deceptive in the sense that we can cast it away. This means that we can obtain an added discipline when accessing a specific object by giving it an inline type, but we can always eliminate that protection by casting the expression to the underlying representation type.
Let's call this phenomenon cast-out unsafety.
Otherwise, if we "just say no" to casting (and take care at upcasts to top types) then we can help ourselves maintaining that extra discipline in the use of the object. A standard example could be IdNumber where we wish to use an int object to model an ID number of sorts. In particular, arithmetic operations like + and - are always a bug on an ID number, so we use an inline class to prohibit those operations. For example:
inline class IdNumber {
  final int rep;
  IdNumber(this.rep);
}

void main() {
  // Make sure we don't use `+` on some ID numbers:
  // Access them using the type `IdNumber`.
  var x = IdNumber(2), y = IdNumber(3);

  // We're now protected against additions.
  // x + y; // Compile-time error.
  // x + 1; // Compile-time error.
  // 1 + y; // Compile-time error.

  // But `IdNumber` is not safe!
  print((x as dynamic) + y); // Prints '5', no complaints.
}

The perspective here is that we're protecting ourselves against using a part of the behavior of the representation object which is inherently meaningless/buggy for the role played by that object. The same setup can be used to protect the representation object against operations which are technically supported by the given representation object, but they just happen to be inherently wrong for the given object, in the given application context. For instance, we might want to ensure that a given List doesn't get modified, using an inline class where mutating methods are omitted and other List methods are available.
So far, there is no type system mismatch, we're only working on regular Dart objects, and we only need to worry about cast-away unsafety.
One step further, we could manage a JSON value via a set of inline classes, and use that to ensure that we're only inserting null, a bool, a String, ..., a List<Object?> or a Map<String, Object?>. The inline classes could also facilitate navigation in that kind of structure, based on the assumption that we will never encounter any other type of object. This basically means that we're modeling a recursive type:
// Pretend that we have recursive type aliases.
typedef Json = Null | bool | num | String | List<Json> | Map<String, Json>;

However, we don't have this kind of type, and it would introduce a lot of new complexity into the type system if we were to support things like List<Json> <: List<List<Json>> <: List<List<List<Json>>> <: ... in their full generality.
Union types provides a minimal example of a type system feature that Dart doesn't have, and inline classes could arguably be used to model:
inline class Union2<X1, X2> {
  final Object? value;

  Union2._(this.value);

  bool get isValid => value is X1 || value is X2;

  R? split<R>({
    R Function(X1)? on1,
    R Function(X2)? on2,
    R Function(Object?)? onOther,
    R Function(Object?)? onInvalid,
  }) {
    var v = value;
    if (v is X1) return (on1 ?? onOther)?.call(v);
    if (v is X2) return (on2 ?? onOther)?.call(v);
    if (onInvalid != null) return onInvalid(v);
    throw "Invalid Union2<$X1, $X2> value: $value";
  }

  static Union2<X1, Never> in1<X1>(X1 value) => Union2<X1, Never>._(value);
  static Union2<Never, X2> in2<X2>(X2 value) => Union2<Never, X2>._(value);
}

int f(Union2<int, String> u) => u.split(
      on1: (i) => i,
      on2: (s) => s.length,
    )!;

void main() {
  // We can obtain union typed objects, pass them, and use them.
  var u1 = Union2.in1(1);
  var u2 = Union2.in2('Hello!');
  print(f(u1) + f(u2));

  // But we can easily violate the invariant.
  var badUnion = true as Union2<int, String>; // Cast don't care.
  print(badUnion.isValid); // 'false'.
  print(f(badUnion)); // Throws.
}

This introduces a new kind of unsafety; we could call it cast-in unsafety. The point is that we may strive to maintain a certain discipline (during constructor invocations, using members like isValid, etc) which involves invariants that the Dart type system can't express. The unsafety arises because we can simply skip the constructor invocations and other validation code in various ways, with a direct cast to the inline type as a prime example.
For JS interop, we have a third kind of unsafety; we could call it untypability unsafety. It is caused by the fundamental mismatch between the JavaScript semantics and the Dart type system: It is not necessarily possible to come up with a Dart type that describes the behavior of any given JavaScript object in a way that is both safe and useful. For example, the Dart type system has no way to model the situation where the prototype of a JavaScript object is mutated such that it gets a new method or changes the parameter list shape of an existing method, and so on.
In this case the problem is not that somebody put together a wrong pair of inline type and representation type, the problem is that there are no Dart types
Promises and type parameters
An object obtained from a JavaScript computation could be handled as a JSObject, or via an inline class MyJsThing ..., or via a generic inline class MyJsThing<X1, ... Xk> .... It's all about choosing a useful level of precision in the description that we're associating with the given JavaScript object during program execution.
Now return to the actual topic of this issue, promises with or without a type parameter:
I get the impression that cast-out unsafety is a secondary concern, we always just need to be aware of that.
Cast-in unsafety may be the biggie, that is, the main worries could be that there will be too many situations where a given promise is considered to have a given type argument T, but it will actually resolve to an object whose type is not T. Also, this situation could arise because objects are handled using general types like JSObject rather than consistently accessing them using an inline type, and then we just don't know what the type argument should be, if we are even aware that a given JSObject is a promise at all. The problem could also arise already when the promise is received for the first time, and there might never be a location in code where a "correct" type argument can be chosen for that promise because we never know which type to choose.
The third kind, untypability unsafety, would arise if we simply can't trust a promise to resolve to an object of any particular non-top type, because they just do things that are too complex for a Dart type to capture. However, I wouldn't expect that.
If this analysis is reasonable then it might make sense to have a type argument on promises and document that it is an expression of the Dart-side expectation about the type of object that it resolves to, not a language-supported guarantee.
I can understand if you prefer to avoid the type argument, exactly because it takes a whole sentence to even begin explaining the meaning of a typing property which is a static expectation with no firm connection to run time. However, every static type given to a JSObject will have this issue, more or less.

I am trying out new JS interop and I ran into this issue pretty quickly. It feels unsafe to be casting the Future's return type:
    // Decode the audio file
    audioBufferSource.buffer = await _audioContext!
        .decodeAudioData(jsArrayBuffer)
        .toDart as web.AudioBuffer;

Are generic types aren't supported? I would also like JSPromiseToFuture to have a generic type:
extension JSPromiseToFuture on JSPromise<T> {
  external Future<T> get toDart;
}

@eernstg Sorry I missed your comment before - it's fantastic and captures a lot of the uncertainty around generics with interop inline types.
Cast-out unsafety always comes up when we're dealing with interop, so you're right that there isn't anything special here.
Cast-in unsafety is the recurring issue when it comes to generics and interop (JSArray has similar issues). When you return a JSPromise<T> from some external function, that T may be unsound, and you don't realize if it is until later (usually through a conversion to Future<T> followed by an await). If we converted to a Future and the converted Future catches type errors when awaited on, then the temporary unsoundness is reasonable. List.cast does something very similar.
Another complication here is that the JS backends and dart2wasm have different runtime type systems. In dart2wasm, Dart types are on a different heap than JS types, and dart:js_interop types themselves may not be discernible from one another at runtime as they're all essentially boxed external pointers. If we wrote JSPromise<double> and that double is actually a JS number, then that will eventually lead to a type error on dart2wasm. That's unlike external functions that return double, where we can convert a JS number to a Dart double at the boundary. We may be able to do something like that with JSPromise, but I think nested generics complicate that.
One option is to bound the type parameter as T extends JSAny?. You do mostly get soundness if you assume all Promises will return a JS value. That's a safe assumption but not always true, however - when we expose futureToPromise, you can create a Promise that returns a Dart type.
I agree that generics (imperfect for interop as they are) offer value, and they seem to be popular enough that I'm okay with adding them. It's definitely useful in the above case re: decodeAudioData, because as a user, you're not sure how the API expects you to use the result of a Future/Promise as. There are wrinkles, though, and I don't think we're going to get a single solution that gives us a clean way of addressing all those wrinkles.

JSArray and JSPromise are now generic extension types whose singular type parameter is bound to JSAny?. Since we've moved package:web to emit extension types instead, we've also added support for generics for those two types in package:web in https://github.com/dart-lang/web/commit/5b026ab7ca26fc6a28b1594f8f4c11aed2ec1b0c. Closing as completed.


Refactor typescript code

Summary

Merged duplicate type definitions into implementation code
Added explicit children props (fixes #1755, #1745)
Added CI job to validate types

Test Plan
New CI job should pass.
Compatibility
No functional changes.
Checklist

[ ] I have tested this on a device and a simulator
[ ] I added documentation in README.md
[X] I updated the typed files (typescript)
[ ] I added a test for the API in the __tests__ folder

@WoLewicki looks like quite an issue/PR backlog has piled up. would you like help maintaining this library?

I think this should be indeed merged in

This is the only typescript issue we've got with React Native 0.69 upgrade. +1

Closing since #1806 has been merged. Thanks for your contribution @codebutler !


Add numpy to system import tests

Installing and importing numpy tests for two cases:

The python architecture and the package architecture don't match (https://github.com/astral-sh/uv/issues/2326)
The libc of python and that of the package don't match on linux (musllinux vs manylinux, picking a compatible manylinux version)

All pylint deps are py3-none-any, so they don't catch those cases.

Not sure what the Pyenv failure is, but the Windows-Python 3.13 failure looks like we need a larger stack size (these are debug builds).

Added stack size overrides to the windows tests

The two CI failures look like bugs


Bump Java Version to Latest LTS Release

Currently the build target for Java is set to version 15. Since we don't get updates for this version any longer (support ended in March '21 for the OpenJDK implementation) we should switch to the latest LTS release which is Java 17.

Has been addressed as part of #79


[ISSUE-#6763] Make refreshInvoker synchronized

What is the purpose of the change
For-#6763
Make refreshInvoker synchronized, to avoid config-center change and registry-center change concurrency.

@AlbumenJ This pr also fix concurency bug, PTAL.

@AlbumenJ This pr also fix concurency bug, PTAL.

Codecov Report

Merging #7082 (8b45128) into master (70b6fb3) will decrease coverage by 0.39%.
The diff coverage is n/a.

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

Codecov Report

Merging #7082 (8b45128) into master (70b6fb3) will decrease coverage by 0.39%.
The diff coverage is n/a.

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


tls: config seems to be ignored

Describe the bug
I have my config set to
web:
  port: 443
  tls:
    certificate-file: /config/certificate.crt
    private-key-file: /config/certificate.key

and would expect that going to https://gatus.example.com would work as expected. However, I have to go to http://gatus.example.com
What do you see?
Log file contains
2023/04/25 00:47:15 [controller][Handle] Listening on <IP_ADDRESS>:443

which, when looking at the code, seems to be the non-TLS log message.
Also tried commenting out the private-key-file entry in the tls: section and no error was reported.
What do you expect to see?
I would expect tls to be supported according to the documentation.
List the steps that must be taken to reproduce this issue

start the application with a valid certificate and tls: configuration
navigate to the appropriate address with https://
expect it to work

Version
ghcr.io/twin/gatus:v5.3.2
Additional information
No response

It kind of looks like tls server isn't something that is in the current release and is coming soon - very interested in trying this out

#322 (followed by #457) has been merged 3 days ago and has not been released yet.
If you'd like to use it, you'll have to use the latest image (or wait for the next release)

latest works for tls! I'll watch for any other issues


MySQL Support

Implement MySQL target support.

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

Coverage decreased (-4.0%) to 18.46% when pulling 94e0b59a9d8f55c59f082b163d20e993b6213066 on unstackinc:mysql-support into 528b2ac97dc6d9215476067233aaaa75b2f8d627 on snowplow:master.

Coverage decreased (-4.0%) to 18.46% when pulling 94e0b59a9d8f55c59f082b163d20e993b6213066 on unstackinc:mysql-support into 528b2ac97dc6d9215476067233aaaa75b2f8d627 on snowplow:master.

Wrong repo (sorry)

Wrong repo (sorry)

NP @eric-cc-su
Looks like you're doing some cool stuff - hadn't heard of people loading from Snowplow to MySQL before. :)

NP @eric-cc-su
Looks like you're doing some cool stuff - hadn't heard of people loading from Snowplow to MySQL before. :)