mise removes $VIRTUAL_ENV in zsh/bash

Describe the bug
When I am using zsh and 'initialize' mise (eval "$(mise activate zsh)") whenever I cd in or out of a folder with a .mise.toml or .tools-version file my $VIRTUAL_ENV varible is removed. It happens even on the 'eval' command as well.
I tried it with bash too, seems to do the same.
To Reproduce
my config files:
.mise.toml
[tools]
python = ['3.9', '3.10', '3.11']

~/.config/mise/config.toml
[tools]
python = ["3.10", "3.9", "3.11", "3.12"]
poetry = "1.6.1"
spark = "3.3.3"
java = "adoptopenjdk-11.0.16+8"
nodej = "20.6.0"
pipx = "1.6.0"

source any virtualenvironment
source path/to/venv/bin/activate
echo $VIRTUAL_ENV

path/to/venv

either have mise activated and be in a folder with the given .mise.toml:
cd ..
echo $VIRTUAL_ENV

``

or run:
eval "$(mise activate zsh)"
echo $VIRTUAL_ENV

``

while when I do
cd ..  - now I am in a folder without .mise.toml
source path/to/venv/bin/activate
echo $VIRTUAL_ENV

path/to/venv

cd .. - again a folder without .mise.toml
echo $VIRTUAL_ENV

path/to/venv

A more detailed dump of me exploring is on the bottom.
Expected behavior
If not configured to automatically 'activate' or 'deactivate' virtual environments in 'python' to not touch the environment variable.
I guess $PATH modification in both cases is to be expected, as this is what 'mise' does when not using 'shims', maybe though, the modification should take into account if $VIRTUAL_ENV is set? (But I guess that would be more a feature request than this bug report?).
Maybe this is also intended behaviour, to not confuse having $VIRTUAL_ENV set, but pointing with $PATH to another python-interpreter?
The current behaviour definitely avoids somewhat problems for this case and if a the prompt shows the current virtual env by using the variable, at least one sees it immediately.
I would expect to still keep my sourced virtual env active, when traversing the file system.
mise doctor output
version: 2024.9.2 linux-x64 (2024-09-11)
activated: yes
shims_on_path: no

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS
  Built: Wed, 11 Sep 2024 23:13:29 +0000
  Rust Version: rustc 1.81.0 (eeb90cda1 2024-09-04) (Homebrew)
  Profile: release

shell:
  /usr/bin/zsh
  zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

dirs:
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files:
  ~/.config/mise/config.toml
  ~/path/to/****/libraries/my-project/.mise.toml

backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  poetry  https://github.com/mise-plugins/mise-poetry.git#431c335
  usage   https://github.com/jdx/mise-usage.git#fe3888a

toolset:
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>         (missing)
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>        (missing)
<EMAIL_ADDRESS>          (missing)

env_vars:
  MISE_SHELL=zsh

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf = true
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_hints = []
  disable_tools = []
  experimental = false
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  pipx_uvx = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "~/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  use_versions_host = true
  verbose = false
  vfox = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found

Additional context
I tried it with an older version, there was the same behavior, then I updated mise and the behavior was still the same.
For comparison I started a bash to see if things are different there, and they are.
I tried with both .tools-versions and .mise.toml as config files locally.
Here a dump from my environment, with some censoring
mise was not initialized in this shell, to show it better:
# no mise initialized
❯ echo $PATH
/home/*****/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-romkatv-SLASH-zsh-bench:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/linuxbrew/.linuxbrew/bin:/home/*****/.local/share/go/bin:/home/*****/.local/share/cargo/bin:/usr/local:/home/*****/.poetry/bin:/home/*****/.local/bin:/home/*****/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/*****/.rye/shims:/home/*****/.cargo/bin:/home/*****/.local/bin:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/bin:/home/*****/.fzf/bin

❯ which python
/home/*****/.rye/shims/python
# here I have ryes python version

❯ z html
# I jump into my project

~/path/to/****/libraries/my-project ****-***
❯ ls .mise.toml
.mise.toml

~/path/to/****/libraries/my-project ****-***
❯ source /home/*****/.local/share/virtualenvs/my-project/bin/activate

~/path/to/****/libraries/my-project ****-***
❯ which python
/home/*****/.local/share/virtualenvs/my-project/bin/python
# Now we have my venvs python

~/path/to/****/libraries/my-project ****-***
❯ echo $PATH
/home/*****/.local/share/virtualenvs/my-project/bin:/home/*****/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-romkatv-SLASH-zsh-bench:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/linuxbrew/.linuxbrew/bin:/home/*****/.local/share/go/bin:/home/*****/.local/share/cargo/bin:/usr/local:/home/*****/.poetry/bin:/home/*****/.local/bin:/home/*****/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/*****/.rye/shims:/home/*****/.cargo/bin:/home/*****/.local/bin:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/bin:/home/*****/.fzf/bin

~/path/to/****/libraries/my-project ****-***
❯ echo $VIRTUAL_ENV
/home/*****/.local/share/virtualenvs/my-project
# The venv works

~/path/to/****/libraries/my-project ****-***
❯ cd ..

~/path/to/****/libraries
❯ ls .mise.toml
ls: cannot access '.mise.toml': No such file or directory

~/path/to/****/libraries
❯ echo $VIRTUAL_ENV
/home/*****/.local/share/virtualenvs/my-project
# Nothing changed by changing dir

~/path/to/****/libraries
❯ eval "$(mise activate zsh)"
# Mise is activated

~/path/to/****/libraries
❯ echo $VIRTUAL_ENV

# My venv is deleted

~/path/to/****/libraries
❯ echo $PATH
/home/*****/.local/share/mise/installs/python/3.10/bin:/home/*****/.local/share/mise/installs/python/3.9/bin:/home/*****/.local/share/mise/installs/python/3.11/bin:/home/*****/.local/share/mise/installs/python/3.12/bin:/home/*****/.local/share/mise/installs/poetry/1.6.1/bin:/home/*****/.local/share/mise/installs/java/adoptopenjdk-11.0.16+8/bin:/home/*****/.local/share/virtualenvs/my-project/bin:/home/*****/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-romkatv-SLASH-zsh-bench:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/linuxbrew/.linuxbrew/bin:/home/*****/.local/share/go/bin:/home/*****/.local/share/cargo/bin:/usr/local:/home/*****/.poetry/bin:/home/*****/.local/bin:/home/*****/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/*****/.rye/shims:/home/*****/.cargo/bin:/home/*****/.local/bin:/home/*****/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/bin:/home/*****/.fzf/bin
# My path is changed

~/path/to/****/libraries
❯ source /home/*****/.local/share/virtualenvs/my-project/bin/activate
# I activate my venv again

~/path/to/****/libraries
❯ echo $VIRTUAL_ENV
/home/*****/.local/share/virtualenvs/my-project

~/path/to/****/libraries
❯ cd -
~/path/to/****/libraries/my-project

~/path/to/****/libraries/my-project ****-***
❯ echo $VIRTUAL_ENV

# After changing dir, my virtual env is modified

~/path/to/****/libraries/my-project ****-***
❮ cd ..

~/path/to/****/libraries
❯ ls .mise.toml
ls: cannot access '.mise.toml': No such file or directory

# now I am in a folder with no mise config file
~/path/to/****/libraries
❯ source /home/*****/.local/share/virtualenvs/my-project/bin/activate

~/path/to/****/libraries
❯ echo $VIRTUAL_ENV
/home/*****/.local/share/virtualenvs/my-project

~/path/to/****/libraries
❮ cd ..

~/path/to/****
❯ ls .mise.toml
ls: cannot access '.mise.toml': No such file or directory

~/path/to/****
❯ echo $VIRTUAL_ENV
/home/*****/.local/share/virtualenvs/my-project

# Traversing the filesystem in between folders with no mise config file does not break venv

Confirmed! Mise is doing the same here. I'm having a hard time working with mise and virtual envs. This is a critical bug, @jdx. Please fix it as soon as possible. Thank you!

@teaVeloper Have you found a solution?

@HWiese1980 Ugly (I mean ugly) hack until fixed:  Use direnv until resolved.  In the sub-folder:
.envrc:
source ../.venv/bin/activate

I have tried that and wasn't successful. I found some very erratic behavior with mise and direnv that resulted in randomly switching on and off the virtual environment. I could simply press enter multiple times in the terminal without giving any command and it would activate and deactivate the venv completely at random.
I have added
[env]
_.python.venv = ".venv"

to my .mise.toml. That has helped. But it's nothing I would want everywhere. I need to be able to turn on and off the venv on demand, not always, randomly or never.

it seems this is a bug with mise-poetry


Cannot access offset of type string on string

Line 189 in TelescopeGuzzleRecorder.php (if ($data['contents'] instanceof File) {) is throwing the below error for us in some instances.
Cannot access offset of type string on string
@huzaifaarain do we need to add a check to see if $data['contents'] isset? Or any other ideas how to best fix this?

Hi @pajkho
thanks for identifying the issue i'll look into it later today, seems like an issue with multipart requests.

Hi @pajkho
thanks for identifying the issue i'll look into it later today, seems like an issue with multipart requests.

Thanks, much appreciated!

Hi @pajkho
thanks for identifying the issue i'll look into it later today, seems like an issue with multipart requests.

Hi @huzaifaarain !
Just wanted to check if you've had a chance to check this yet? Any solution coming soon? 😊
I totally understand if you have other priorities. Just wanted to check the status.

Hi @huzaifaarain
What do you think about wrapping the whole recordRequest() with a try catch? This way if anything fails it wont affect the rest of the application. I think most cases in production its much better with the recorder silently failing rather than having the whole request fail.
I can make a PR for this if you want, or if you prefer to do it yourself.

Hi @pajkho
I wasn't comfortable with just try catch, the package had no support for multipart requests but now it does, install the latest version and let me know if you face any issue.
Regards


Update script to compute statistics and generate figure

After https://github.com/sct-pipeline/gm-challenge/pull/45

This has now been fixed


Publish White Paper

The white paper is actually ready for a while -
I was holding off a bit - because I was hoping to have something concrete to send people to from the paper - maybe a ready datamart, or something like that. Optimistically I imagined some queries to show off what is possible.
Deploying is taking a while, so maybe we just publish as is?

No rush, there's a Dutch saying 'wat in het vat zit verzuurt niet'. Let's take are time and pick a good moment which is in line with our activities at Wielinq and possibly our grant application

Published here

Published here


Back to work V3

An update to my recent 'Back to work' pull request. This fixes some deficiencies in the firmware sharing code that was causing the service to fail and the cube-desktop from auto running.
The original 2 parts of this pull request remain as described in the commit headers and V1 of this PR.
Fixup the local.conf sample to remove the NO_RECOMMENDATIONS.
Allow firmware to be shared between -Dom0 and -essential
V3

Added a README to describe the shared firmware and its use.

Looks good. It worked on my boot test, so I've merged this.
When  a machine that actually needs the firmware is tested, we'll see how it goes :D


Filter out high frequency command events

Just type for now but going to keep an eye on these to make sure we're not sending up a huge amount of requests.

Is ['type'] a high frequency event for typing? If yes, then we should maintain a constant list of all high frequency events in the file

@kburtram Basically. It doesn't get sent for every keypress but it fires off every half a second or so if you're typing in the editor.
@abist I don't understand your comment. ['type'] is the list, it just has a single item in it right now because I don't know of any other commands that are fired off enough to warrant exclusion here.

@Charles-Gagnon I would suggest having a const list called "highFrequencyEvents" and then use that const for the registerCommand so we don't have to edit that list in place every time.

What benefits does that bring? You would still have to modify the list at some point if you wanted to add more. I don't see this list being used anywhere outside of this one check so making a separate var for it doesn't seem to bring any value.

That's the point of a constant, you change it at the top of the file instead of looking for "type" or other known high frequency events in the file every time you want to change the list or use it elsewhere.


implementation on c++?

hi! i was trying also this project, is someone trying or implementing this on c/c++?
greeetz!

Hi I would love to do it as a project if you are up for it ?


ProjectFolderSource is not generated properly for serialization in dotnet

For some reason, ProjectFolderSource class is generated without a construction with JsonConstructorAttribute, which is used for serialization.
Here is an example for what should be:

I guess we need to look into the different in between two OpenAPI or Pydantic objs

I believe this has been resolved already. @MingboPeng, feel free to reopen the issue otherwise.


Initial positions not applied to robot

Greetings.
When I try to set the URs initial position using initial_positions.yaml  (#154) it is not changed from the default position. This is done in the context of a Gazebo simulation.
I am using the foxy branch but with the description of the galactic branch. Please don't condemn me, I just wanted your implementation of the different sim environments (Gazebo, Ignition) for Foxy without much additional work and also be able to use it on a real robot.
The initial_positions.yaml is:
shoulder_pan_joint: 0.0 shoulder_lift_joint: 0.0 elbow_joint: 0.0 wrist_1_joint: -1.57 wrist_2_joint: 0.0 wrist_3_joint: 0.0
The snipped of the resulting URDF is:
    <hardware>
      <plugin>gazebo_ros2_control/GazeboSystem</plugin>
      <plugin>fake_components/GenericSystem</plugin>
      <param name="fake_sensor_commands">False</param>
      <param name="state_following_offset">0.0</param>
    </hardware>
    <joint name="shoulder_pan_joint">
      <command_interface name="position">
        <param name="min">{-2*pi}</param>
        <param name="max">{2*pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.15</param>
        <param name="max">3.15</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">0.0</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
    <joint name="shoulder_lift_joint">
      <command_interface name="position">
        <param name="min">{-2*pi}</param>
        <param name="max">{2*pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.15</param>
        <param name="max">3.15</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">0.0</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
    <joint name="elbow_joint">
      <command_interface name="position">
        <param name="min">{-pi}</param>
        <param name="max">{pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.15</param>
        <param name="max">3.15</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">0.0</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
    <joint name="wrist_1_joint">
      <command_interface name="position">
        <param name="min">{-2*pi}</param>
        <param name="max">{2*pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.2</param>
        <param name="max">3.2</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">-1.57</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
    <joint name="wrist_2_joint">
      <command_interface name="position">
        <param name="min">{-2*pi}</param>
        <param name="max">{2*pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.2</param>
        <param name="max">3.2</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">0.0</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
    <joint name="wrist_3_joint">
      <command_interface name="position">
        <param name="min">{-2*pi}</param>
        <param name="max">{2*pi}</param>
      </command_interface>
      <command_interface name="velocity">
        <param name="min">-3.2</param>
        <param name="max">3.2</param>
      </command_interface>
      <state_interface name="position">
        <!-- initial position for the FakeSystem and simulation -->
        <param name="initial_value">0.0</param>
      </state_interface>
      <state_interface name="velocity"/>
      <state_interface name="effort"/>
    </joint>
  </ros2_control>

I would assume the robot in the simulation spawning with it's upper_arm_link vertically positioned aka the shoulder_lift_joint at 0 rad.

I don't think the support for initial positions has never been added to foxy's gazebo_ros2_control package. Thus I'm going to mark this invalid. Sorry, that we can't help you further here, but that seems to be out of scope for our driver repo. I suggest switching to humble if possible. A lot has changed and improved since foxy and now that galactic is EOL, humble would be the closest thing. I know, this is easier said than done, but sticking with foxy would probably add more headaches along the way.


4 typos in /services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po

There are 4 typos in the translation file https://github.com/owncloud/ocis/blob/4c3ad07bf8c2fc151c486bb961c2fd712a383bea/services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po#L88
{ShareShare} instead of {ShareSharer} (lines 88 and 93) and {SpaceShare} instead of {SpaceSharer} (lines 107, 119).
As Russian translations look abandoned in transifex and blocked for editing, nothing can be done there to fix the issue.

@dragotin Can you clarify.

Translations are wrong - fixed them.
@dutty5 what is your account handle on transifex and I can promote you to get the russian translation back in shape


Add status checks for when ES cluster is red.

If the Elasticsearch cluster has a status of red, we execute blindly and break in some cases. We should be checking early on in the job if the cluster is red, and throw an exception. We should also make sure that we can at least handle running over a red cluster, even if there is loss of data fidelity, allowing users to acknowledge that clusters are red and read them anyway with a setting might be wise as well.

@jbaiera Thanks!

This is released in version 5.4.0


k8s Jobs - Enqueue to k8s

Nautobot Jobs sent to a K8s Job Queue, are executed as a k8s Job (terminal state containers)
K8s Jobs execute inside of a normal nautobot container image using the run_job --local management command

For k8s job specifics:

For celery timeout, k8s supports .spec.activeDeadlineSeconds but I think we will only be able to support the hard time limit and not the soft, so we will just need to document that.


Got kicked out of Keybase airdrop !

Dear keybase !
I had join airdrop ok . But i dont know why . I Got kicked out of Keybase airdrop . Please , help me. Thank you very much .

The airdrop just lie. The story of hackernews github hacked was old they use that reason to stop airdrop

Yeah. Me too. That's just laughable. I bet that no "hack" occurred or anything. Just come on.


Create decoder for a ReplyMarkup.

Due to an name wrapper ReplyMarkup in the request, the custom keyboard did not appear.

Thanks for the contribution!


Version of TUF referenced as dependency is out of date

There's a roughly 15k line diff between the pinning_dirty_writes branch and current master. Is there a reason that this specific version of TUF is being used? Additionally, is there a plan to remove this pinning and just use the stable tuf pypi package?

Primarily, this is because Uptane needed some functionality that was not yet in TUF and which we expected to be added to TUF. TAP 4 is the primary addition. Uptane's fork of TUF includes an early implementation of TAP 4, as well as TAP 3, which came along with the TAP 4 implementation it (though Uptane does not strictly need it). TAP 4 provides mapping of portions of the targets namespace to different repositories or roots (used to be called "pinning"). There is additionally a series of changes that were necessary to make TUF compatible with simultaneous management of multiple repositories, for the Director (who hosts distinct metadata for every vehicle). On top of this, there were some minor issues fixed in Uptane's fork that were recently fixed in TUF and had to be made in a parallel manner (the dirty writes being one). During this, TUF development continued.
Yes, we expect to reconcile the forks soon. I believe that the main TUF repository almost has TAP 4 ready, if it wasn't already polished off last week, and that was the primary limitation. It's a major priority to reconcile the forks. I haven't looked at the size of the diff - 15k seems heavy; I would expect that primarily includes changes to test data. Still, it'll several thousand lines, yes.

See also #11. Since this issue is more detailed and from an outside source, I'll close the older issue.


SMART Drive Status: Won't scroll back up

When you access the SMART Drive Status module in webmin it will automatically scroll to the bottom of the page as the hard disks go through their SMART diagnostic checks just as it always did. In this latest version of the theme once the last drive finishes it is not possible to scroll back up on the page. If you try to use the mouse wheel or the scroll bar the screen jiggles and returns to the bottom. This is the same way with all 3 of my servers
Servers
Operating System: Ubuntu 14.04.1 LTS 64-bit
Webmin: 1.820
Authentic Theme: 18.10
Status SMART Drive Module Version: 1.820
Client
Windows 10 Professional x64 w. Anniversary update
Firefox 49.0.1
Internet Explorer 11.187.14393.0

Does it happen in Firefox as well? IE 11 doesn't have full support.
Maybe you could post a screenshot, because I'm not sure how to reproduce an issue.

I see now when this issue is happening. In options you checked Display mode to Show All. It will be fixed in 18.20.
Thanks for reporting.

Version 18.20 is out, please upgrade.


[Bug]: Dependently-Typed Functions Return Invalid Types when Assigned to an Error

Description
When a dependently typed function is called and assigned to a union of an invalid type and an error, the function does not return an error. Instead, it assigns the value to the variable, and when type-guard is used the error throws.
Steps to Reproduce
Consider the following code:
import ballerina/io;
import ballerina/jballerina.java;

public class Foo {
    private final map<any> attributes = {};

    public function set(string 'key, any value) {
        self.attributes.put('key, value);
    }

    function get(typedesc returnType = <>) returns returnType = @java:Method {
        'class: "io.ballerina.Sample"
    } external;
}

public function main() returns error? {
    Foo foo = new;
    foo.set("String", "Ballerina"); // Setting a string value in the map.

    int|error value = foo.get("String"); // Retrieving the value as a string. This does not return an error

    if value is int {
        io:println("Value is int"); // This prints.
        int i = value + 1; // Error throws here.
    }
    return value;
}

Following is the native method:
package io.ballerina;

public class Sample {
    public static Object get(BObject object, BString key, BTypedesc returnType) {
        BMap<BString, Object> attributes = (BMap<BString, Object>) context.getMapValue(StringUtils.fromString("attributes"));
        if (attributes.containsKey(key)) {
            return attributes.get(key);
        }
        return ErrorUtils.createError(StringUtils.fromString("Key not found"));
    }
}

Affected Version(s)
2201.9.0
OS, DB, other environment details and versions
No response
Related area
-> Runtime
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

This happens due to an unchecked cast in the generated code.
The BIR of the above code is as follows,
 bb2 {
        %19 = ConstLoad String;
        %21 = newType int|error;
        %26 = get(%1, %19, %21) -> bb3;
    }
    bb3 {
        %17 = <int|error> %26; // Compiler added type cast expression
        %27 = %17 is int;
        %27? bb4 : bb6;
    }

This is generated as an unchecked cast due to the checkTypes boolean is set to false at compilation. Therefore, it fails at the next line (int i = value + 1;).
Seems like we need to handle the union-type conversions separately when adding type-conversion.

@chiranSachintha, @HindujaB, if this isn't dependently-typed, does it result in an error at
int|error value = foo.get("String");

Anyway, IIRC, at least with dependently-typed functions, we expect the developer to ensure they return the value belonging to the expected type. For example, the following is valid code, and a cast (even if added) won't/can't identify the issue here.
typedesc<anydata> td = int;
anydata x = foo.get("String", td);

public class Foo {
    private final map<any> attributes = {};

    public function set(string 'key, any value) {
        self.attributes['key] = value;
    }

    function get(string str, typedesc returnType = <>) returns returnType = @java:Method {
        'class: "io.ballerina.Sample"
    } external;
}

Foo foo = new;
foo.set("String", "Ballerina"); // Setting a string value in the map.

The issue only happens for dependently typed functions, because if it is a function with a specific type the check cast is called at the return of that function.
    function get(string key) returns int|error = @java:Method {
        'class: "org.ballerinalang.nativeimpl.jvm.runtime.api.tests.Async"
    } external;

I agree that we expect the user to provide a value with the expected type for dependently typed functions.
In both cases, it has to fail with a runtime type checking error. But, we need to discuss in which statement it should fail.
IMO, we have to fail at the int|error assignment for the first case as the returned RHS value is not that type.
To identify such cases at code generation, currently, we use the 'checkTypes` boolean. @chiranSachintha is there any way to identify these cases?
int|error value = foo.get("String");

For anydata that is not the case since int is a subtype ofanydata.

Note : Apart from this, the is check of int does not fail because we optimize the type checking a value with union of error  to a non error check.

int|error x = ...;
if (x is int) {
// refactored into if !(x is error)

}


SAK-42613: Edu-services > ExternalAssessmentService > add api to retrieve internal id

https://jira.sakaiproject.org/browse/SAK-42613
When working with the GradebookExternalAssessmentService, you use the external ID of the gradebook item in question to interact with the service. If the external service does not provide some functionality you require, you need to also utilize the (internal) GradebookService.
The GradebookService operates primarily on the (internal) ID of the gradebook item in question, rather than the external ID. This is not so problematic if you either know the internal ID already, or if the "name" of the gradebook item corresponds directly with something you already know (for instance in the case of Assignments, the assignment name typically corresponds to the gradebook item name).
However, there could be situations where you only have the external assessment ID, and you know that there's a possibility that the entity's name may not correspond exactly to it's gradebook item's name. In this type of situation, there's no good way to get the gradebook item (or related functionality) you need through the (internal) GradebookService by way of the external ID, apart from getting all the gradebook items for the site, iterating over them and doing some brittle comparison routine.
In these cases, it would be a lot easier and a lot more intuitive to just provide a method in the external service to retrieve the internal ID of the gradebook item, for subsequent use with the (internal) GradebookService.

 Here is an overview of what got changed by this pull request:
Complexity increasing per file
==============================
- edu-services/gradebook-service/impl/src/java/org/sakaiproject/component/gradebook/GradebookExternalAssessmentServiceImpl.java  15

See the complete overview on Codacy

Complexity increasing... say what?? You crazy, Codacy!

@ottenhoff, @ern, @adrianfish, if anyone could take another look at this that'd be nice. I'm hoping to merge this by the end of the work day today.


[WIP] Mechanic Draw Loop for FPS throttling

This explores the possibilities of adding FPS throttling by introducing a drawLoop util as part of Mechanic core.
What this does

Adds new frameRate setting to design functions

frameRate is used to by the WebM exporter
frameRate is used to build drawLoop function that is exposed to the function's engine

Wraps rendering in engines in drawLoop

drawLoop calls handler over and over again
current frameCount is passed to the handler
animation stops as soon as done is called from within the handler
in this initial setup it is up to the developer to build the logic for when an animation should stop within their functions

Adds examples canvas-fps, react-fps, svg-fps and p5-fps

examples are really just for the deploy preview and will be deleted in the future

Observations

In the current set up the drawLoop forces the Canvas Engine to rebuild a new canvas on every frame

this could be solved if the canvas is handed to the user by the engine as suggested in #146

This changes the mental model of design functions a bit, as this now makes them pure functions of the current frameCount (this is in line with the React mental model, but opposes the p5 mental model)

There could be shared state by defining variables outside of the handler
However there currently is no solution for shared state that depends on an input

This could be achieved by bringing memoization helpers to mechanic...
... or maybe also by enforcing a bit more structure in the functions, splitting them into something resembling p5's setup and draw functions

I guess the p5 engine is the "odd one out" here, as p5 brings it's own drawLoop and frameRate utils. In this approach I just made sure to pass the correct frameRate to p5 and left the rest to p5

Todo

[ ] discuss the approach
[ ] remove example functions
[ ] refactor DSI logo maker functions
[ ] update cli template functions
[ ] update changelogs

@fdoflorenzano I think this is a great observation and something we should discuss on Monday. A good example is p5.js vs. React. I personally think it makes sense to make this change for React, since it's a big mess to make your own draw loop, but for p5.js that already has its own setup and draw it makes less sense. Perhaps it's something that's up to each engine? I can see a scenario where the default setting for the react engine is that it works like in this PR, but can be disabled with a setting. I'm in favor of making it really simple to code animations, but giving users the ability to do custom fps handling if needed.

I think it's more than the difference between p5 and react. Fernando is right, this change would enforce the frame based way of animating. Which is also something I'm concerned (or at least unsure) about.
With this change each frame of an animation is a function of the current frame count. There is no shared state between frames and every calculation has to be made based on frame number if you need it to be deterministic.
While this approach feels natural to me (it's similar to how video editing software works) it isn't the only approach to think about animation. You can also think of them time based (seconds instead of frames) or event based (after x turns of the circle stop the animation). Especially the event approach might feel more natural to people coming to mechanic from a web development background.
In another exploration of the fps throttling I exposed the draw loop to the design function (instead of the frame count) and made it the user's job to use it in their function. I discarded this idea because at the time it felt like just a different way of having useDrawLoop in your function.
But now I'm thinking that maybe we should reconsider this approach as this would allow to also work with time and event based animation mental models as a user can decide what should be setup code and what should be run on every frame iteration.
Looking forward to discussing this on Monday 😊

My main concern with this new feature is to provide a simple API that users can easily pick up. My experience making libraries tell me that the makers of libraries are often concerned about flexibility while users just want ease of use. But maybe this thing of exposing the draw loop is a good one if we can do it in a simple way. Yes, let's discuss on Monday.

Sorry for the delay in reviewing this. I did a pass on Monday and wanted to do another fresh one to make sure I was understanding everything, and with other projects of course that got pushed a bit.
I like how the general structure for the design functions and look like in now (the register of callbacks specially). One little detail that I wanted to mention is that I don't love the return for every frame aspect for design functions, I generally prefer a more explicit API for setting up frames and everything. That and other ideas that I've seen tossed around lately make me feel that design functions will start looking more and more like react components, which to me is to make the API too opinionated.
Where I think there's room for improvement, is with the general design and naming of functions for the main flow of execution in Mechanic core. Part of why I've struggled to make a review is because I'm having a hard time understanding the current structure and which part calls what and so on. There's so many callbacks and functions and not great names (maybe) for some of them that it's easy to get lost. I would be happy to propose or work with you in a more streamlined flow, but I would need a bit of time to think and do it.
I hope all this makes sense. We can talk about it tomorrow!

Thanks for taking the time to review this explorative implementation. I know the names are a bit off and there probably is one or two callbacks too many. So I'd love your help to turn this into clear and understandable code.
Having spent a lot of time exploring this approach and also refactoring parts of DSI-Logo-Maker to this new setup I must say I fully share your concerns. Working with return values instead of explicitly calling frame or done looks very cool at first and works very nicely in the simple examples I initially created to implement this new animation API.
The tricky parts
Refactoring DSI-Logo-Maker however showed the shortcomings of this approach: You don't just force people into a more React-like mindset as Fernando pointed out, you also lose a lot of flexibility and make things harder. This is not just true for the return based approach, but also for the idea of having the drawloop inside mechanic core. A few examples:
Return based approach – the tricky parts

Using returns makes it very hard to handle design functions that perform async loading of fonts or images first

A good example is textAndImageCanvas in DSI-Logo-Maker that even has two output options, based on if an image was loaded or not
The same is true for React based function's the in some cases return a null'ish value when the component is still loading things and really only want to register a frame when the component has updated

Controlled DrawLoop – the tricky parts

Treating the entire design function as "pure" seems like a good idea too, but thinking about it, they almost always have side effects (like loading fonts, generating random numbers and so on) that they most likely never will be pure

It feels like a lot of potential performance overhead to re-run the entire function for every frame and not have shared state between frame-iterations
Random values are hard using this approach, because a new random value is generated on every function run, so I had to bring in the memo feature from another PR to essentially cache random values

Summary: Simple API -> less flexibility
It could be that these issues arose because DSI-Logo-Maker wasn't build with frame-based animation in mind. Nonetheless, the above mentioned are issues of the approach we explored and end-users could very well encounter them, unless we go the fully opinionated route and somehow force everyone into a frame-based stateless approach—which I would disagree with for the same reasons Fernando mentioned.
What struck me the most is, how much flexibility is potentially lost by trying to make the API a bit more comfortable, because a lot of assumptions have to be made, to make the API changes work. And to be honest, explaining to someone they now have to memoize random values feels more confusing then telling them: "Hey, use frame when you want to add a frame to your animation and done when you're ready to export.".
The good parts
But I don't dislike everything I've explored. Moving the drawLoop away from a custom implementation and into something that is provided to each function as another method on the mechanic object (in animation-custom) mode felt really great and like a great simplification of things.
Also knowing that this is fully preconfigured with the correct frameRate and other settings helped reduce and simplify the code in a lot of DSI-Logo-Maker dramatically. The result is a very clear design function, that is clearly separated into the part that does the initial setup and the part that is running in every frame. Now it's up to the user if they want to treat the "every frame" part a s pure function, that only does operations based on the frameCount argument it gets (which is how I'd do it, when starting from scratch) or if they follow a different mindset of animation and manipulate variables in the global scopes within their frame callback. This feels flexible, because both approaches are possible and you can bring much more of what you already know about coding and put it to good use in your design function.
A compromise?
So I think doing this exploration and trying to understand the pros and cons of the different approaches to animation was very valuable. I increasingly get the feeling that the mechanic callbacks (or dare we call them hooks?) like frame and done aren't inconvenient at all, but rather at a level of expressiveness to your code that allows you great levels of flexibility.
After having explored how to remove things from the user's code and make the settings and mechanic core very smart I'd now say: Let's put some code back into the user's code and make mechanic core very simple. I'm proposing we add a third hook to the mechanic object exposed to a function called drawLoop. It takes a function that runs on every frame. If a function calls the drawLoop mechanic-core can know it's animated. If it doesn't mechanic-core will know it's a static function (so this could potentially even remove the animated or mode setting).
// Animated Example (Canvas/SVG)
export const handler = async ({ inputs, mechanic }) => {
  const { canvas, ctx } = mechanic.getCanvas(inputs.width, inputs.height);

  let someVariable = 0;

  mechanic.drawLoop((frameCount) => {
    // Either implement your drawing code as a pure function here
    // or manipulate the parent scope's state if that feels more natural to you
    someVariable += 1;

    // Exit condition is 100% up to the user, so frame-based or event-based exit
    // conditions are equally possible
    if (someVariable >= 100) {
      mechanic.done(canvas);
    } else {
      mechanic.frame(canvas);
    }
  })
};

// Static Example (Canvas/SVG)
export const handler = async ({ inputs, mechanic }) => {
  const { canvas, ctx } = mechanic.getCanvas(inputs.width, inputs.height);

  const someVariable = 0;

  ctx.clear();

  // Do some drawing using the value of someVariable here
  mechanic.done(canvas);
};

// Animated Example (React)
export const handler = async ({ inputs, mechanic }) => {
  // Instead of forcing the custom useEffect setup a predefined hook
  // could wrap all of that and just execute on every frame
  mechanic.useDrawLoop((frameCount) => {
    // Do whatever state updates you want to do on every frame here
    if (frameCount >= 100) {
      mechanic.done();
    } else {
      mechanic.frame();
    }
  });

  return <svg></svg>;
};

// Static Example (React)
export const handler = async ({ inputs, mechanic }) => {
  useEffect(() => {
    mechanic.done();
  }, []);

  return <svg></svg>;
};

Closing this in favor of a new, clean PR that implements that changes we've agreed upon after using this to explore potential solutions.


Program retention in Redbear Nano 2

I created a custom PCB for a project recently, it works fine when the code is uploaded. It has a switch with which I can turn the battery connection on and off for the MB-N2. But when it switched off, it somehow resets the uploaded code.
We're using XTAL_32768_SYNTH instead of XTAL_32768 as we don't have the latter in our PCB due to space constraints.
Is the code retention problem somehow related to the clock that we're using or due to any other known reason?
Thanks in advance!

Hello kartik. Could you please provide a bit more information here? How are you uploading the code? Depending on how you are doing this you have to "confirm" the image after it boots into the new image. If you do not, the previous image will get loaded. I suspect that this is what you are seeing.

I'm programming my modules using command line instructions for Mynewt OS.
For eg: newt load <name-of-module>
So apparently, when I re-upload the bootloader, the last program starts executing. I guess the program is stored in the flash correctly but the bootloader gets refreshed.
Any insights?

I am sorry; I am not following what you are saying. Why are you re-flashing the bootloader btw? You should only need to do that once. You should be able to verify that the code you have loaded is the image you are attempting to load. Are you saying that the device simply resets?

Yes! Whenever it is switched on, it resets.
On burning the bootloader again, the device starts running the last program that was flashed.

So this all sounds like normal operation to me. Re-flashing the bootloader will not erase the currently loaded image so I would expect it to boot the last image you loaded via newt load. Not sure what you mean by "...whenever it is switched on, it resets". Are you on the mynewt slack? I think it is better to have a chat session if you are still thinking something is wrong.

Hi, I think the problem is with DC-DC configuration. I had similar problems with mine, Firmware would only boot on first flash and wouldn't after restart. If your board doesn't have DC-DC available, switch it off from the BSP, and rebuild everything again.


Create a rule generator by using a micro-generator f/w

Using a micro-generator framework such as plop would make it easy for all contributors of this repository to create new rules with a level of uniformity, and also faster, by asking a set a questions and boilerplating the appropriate code.
Also because context switching is expensive :) and saving time is not the only benefit to automating workflows
What are your thoughts about this ? Also considering time versus ROI (https://xkcd.com/1205/) ?

Hamlet would know more if this is needed in this project, as there is already some generator available. I just wanted to say that idea of plop is very good!

I tried this a few weeks ago, but the command line node app was broken for Windows. It was something other than plop and Inquirer.js though. It looks like Inquirer.js does work in Windows and git-bash.
This is a good idea. I would just add Inquirer.js to the build and not use plop because we don't really need an entire templating engine when what we have already works. But if someone submits a PR that rewrites everything in Plop then that is OK too.


bugfix/edit-case

Description
The edit case functionality was not working when a user clicked on case details. When editing a case, the frontend was making a request to the endpoint in caseRouter.js below. I worked with folks on the frontend to make sure we were on the same page with request and response expectations.

The update() model function in caseModel.js is expecting two parameters: case_id and changes and originally only the request body was being passed to update. This caused the endpoint to respond with an error with status code 500 since the update() function was not able to execute properly. After getting the case id from req.params and passing it into the update() model function as a parameter, the function was able to execute successfully. However the query in the update() model function was just returning '1' to indicate the number of records updated. Based on the Knex.js docs, I updated the query to have it return the updated case info to then be sent to the frontend so they could use it to update the frontend.
Contributors: @schandrupatla @joshuascan @ZacharyCooremans @ctscofield
Corresponding frontend PR
Trello Card
Loom Video
Fixes status 500 error being sent to frontend when user edits a case
Type of change

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

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have removed unnecessary comments/console logs from my code
[] I have made corresponding changes to the documentation if necessary (optional)
[X] My changes generate no new warnings
[X] I have checked my code and corrected any misspellings
[X] No duplicate code left within changed files
[X] Size of pull request kept to a minimum
[X] Pull request description clearly describes changes made & motivations for said changes

I believe the failed check has to do with the ds_case table that is commented out. We were going to discuss if this table is needed anymore as a separate issue. Thanks for reminding me, I'll add a ticket to the Trello board so we don't forget!


Can't get permissions for Microsoft Graph API Drive integration on Outlook live accounts

Hi, we are using Microsoft Graph API for uploading files for business and personal accounts.
After the account logs in, we ask for some permissions, but we don't add the one needed for OneDrive. After the user explicitly requests to upload a file we send another request for an AccessToken including all scopes until now + files.readwrite.all. This was working perfectly until (maybe) May 2018. Now it works for business accounts, but not for personal accounts.
Steps that we do:
Redirect the user to login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=...&redirect_uri=https%3A%2F%2Fmywebsite.com%2Fsignin-microsoft&response_type=code id_token&scope=openid offline_access profile email mail.readwrite mail.send contacts.readwrite calendars.readwrite people.read user.read files.readwrite.all&response_mode=form_post&nonce=636656...&state=CfDJ8MLMcPchE...
The user selects their account (with which they are already signed in)
They get redirected to https://login.live.com/oauth20_authorize.srf with the following sreen:

The permissions are not added for our application and we don't get any error. Here is also the response from the error page:
Error Info
"/pp1600/oauth20_authorize.srf?client_id=9d3c...&scope=openid+offline_access+profile+email+mail.readwrite+mail.send+contacts.readwrite+calendars.readwrite+people.read+user.read+files.readwrite.all&redirect_uri=https%3a%2f%2fmywebsite.com%2fsignin-microsoft&response_type=code+id_token&state=CfD...&response_mode=form_post&nonce=636...&x-client-Ver=5.2.0&display=host&uaid=521...&msproxy=1&issuer=mso&tenant=common&ui_locales=en-US&username=pesho..."
loginserverprotocolhandler(846)
HR=0x80041018
Method string:GET
URL:"/pp1600/oauth20_authorize.srf"
Query string:"code=5"
Server protocol:HTTP/1.1

After a couple of tries i actually managed to grant access to one of my accounts for the OneDrive integration. Not really sure what changed. I was just logging in and out with different Outlook accounts in Outlook and in our app. After that, i tried the same process with a different account and it failed again. Every time I was trying this I was logged with the same account on both places.
One more thing that I noticed is that before the consent was for all permissions and now the consent screen showed request only for the files permission.

As part of a repository clean up effort we are closing older issues. If this issue remains, please: open a new issue, reference this issue, and provide any additional details that may help in resolution. Thank you for your understanding as we work to improve our responsiveness.


Problem running examples with ng-outlet

I am having problems with the 1.x examples. In the “hello” case, for example, it looks like you replaced “ng-viewport’ with “ng-outlet” last week (2015-04-22), however, in my browser, that directive is not getting updated with anything. I am using the angular version installed by npm (1.3.15). Am I missing something?

There are a number of issues right now that make the router not actually work.
See #292, #293

I scheduled myself to do a presentation on the new router in two days. Then I read this. Oops! Should be a fun one. ;-)

@tynman I'm in the same boat, except my presentation is in three weeks :)
Perhaps check out an earlier version? I'm not sure, but I think 0.4.x might work.

@tynman @nikaspran – I'm trying to follow up on issues quickly. Hoping to help your presentations go well. :)

No problem - if you need anything, I'm here to help :)
On Wed, Apr 29, 2015, 07:38 Brian Ford<EMAIL_ADDRESS>wrote:

@tynman https://github.com/tynman @nikaspran
https://github.com/nikaspran – I'm trying to follow up on issues
quickly. Hoping to help your presentations go well. :)
—
Reply to this email directly or view it on GitHub
https://github.com/angular/router/issues/291#issuecomment-97301983.

I see that both issues have now been merged. Any plans for a new release soon?

Just seems strange that the examples and documentation were changed to ng-outlet and released but the actual code in dist still uses ng-viewport.  Was this perhaps an oversight?  The code under src uses ng-outlet.

It's because there hasn't been a new release. They'll sync up in 0.5.4 or whatever the next tag is going to be.

Understood...any plans for a new release in the near future so the documentation matches the code?

+1 would like to see the code match the documentation match the sample apps.
I just gave a talk on this on Tuesday and was able to get one of the sample apps to work (the Monty Python one), but not my sample app.


WebDAV support

For a long time, I've been looking for a self-host replacement of Google Keep. The majority of the applications fail in their design or save the notes in a custom format, which are no goes for anyone looking for a replacement.
Your app doesn't fail in any of these points, your design is awesome, very similar to Google Keep, and saves the notes in markdown.
I know the objective of this app is to easily ingest notes to Obsidian on mobile phone using obsidian sync. But would you consider to add WebDAV support? This would work similar to local file sync.
Advantages:
People could save their notes in WebDAV servers (ex. Nextcloud). On the other hand, we would be able to use this app in a standalone way.

Is webdav done through an API call? If so, it may be supportable through the plugin system with the https://github.com/fleetingnotes/fleeting-notes-plugins/issues/7

Yes, it is a an API call. But if it is a one way sync, I wouldn't be able to synchronize multiple clients through a plugin, right?


Daily update

Automated changes by create-pull-request GitHub action

Build failed because of:
No cached entry, and Beijing University of Posts and Telecommunications (BUPT) has issues with logo: beijing_university_of_posts_and_telecommunications_bupt.svg, Error in parsing SVG: Unexpected close tag
Line: 15
Column: 9
Char: >
No cached entry, and Open Sourcing Mental Illness, LTD has issues with twitter: https://twitter.com/osmihelp, Request failed with status code 400
No cached entry, and Sollers College has issues with twitter: https://twitter.com/SollersEdu, Request failed with status code 400
No cached entry, and JVC KENWOOD Corporation has issues with twitter: https://twitter.com/JVCKENWOOD_SR, Request failed with status code 400
No cached entry, and Baumer Management Services AG has issues with twitter: https://twitter.com/baumergroup, Request failed with status code 400
No cached entry, and Cybeats has issues with twitter: https://twitter.com/cybeatstech, Request failed with status code 400
Item Beijing University of Posts and Telecommunications (BUPT) has no image_data


Poor user experience adding new paper sizes to printers

End users sometimes need to add new paper sizes to printers.
The de facto directions is in Stack Overflow post https://stackoverflow.com/questions/1028891/whats-the-easiest-way-to-add-custom-page-sizes-to-a-ppd/3112256
End users needing to sift through answers to find one which then involves adding four different entries to a 1000+ line .ppd files provides a poor user experience.
A CUPS web interface capability is needed for adding paper sizes, or at least a command-line tool.

Hi @fedorowp ,
thank you for the input.
However, CUPS main purpose is not to be a driver editor - usually nowadays (and it will be the only way in the near future) CUPS gets such information from a printer, other CUPS server or printer application via IPP protocol.
If there is an incorrect or a missing page size, please report it to your driver provider with a patch. Then the provider (manufacturer, community, distribution) can share the fixed drivers among everyone else.
The verified patch is usually a requirement (unless the driver provider is a printer manufacturer), because there is a huge chance that community or distro maintainer don't have your printer model, and if upstream is unresponsive, they don't have any other way how to verify the patch than via reporter.
If we actually decide to tackle this feature, IMO it might be in printer applications, or in their common library - PAPPL. @tillkamppeter @michaelrsweet thoughts?

Another approach would be that whenever a printer reports that it supports custom paper sizes (via IPP or the PPD file) the print dialog could not only allow the user to enter the size but to save sizes and give them names, so that he has his preferred extra sizes at hand. This would be a nice feature request for te print dialogs.


Documentation with issue (or not?)

Hi,
On your example you have:
server.people.query( 'indexName' )
        .bound( 'answer', 30, 50 )
        .execute()
        .done( function ( results ) {
            //do something with the results
        } );

Shouldn't be :
server.people.query( 'answer' )
        .bound(  30, 50 )
        .execute()
        .done( function ( results ) {
            //do something with the results
        } );

?

I've fixed this in PR #134

With the PR #134 now being merged, I think this issue can be closed.


Circos trainining karyotype configuration file problem

When using the file hg18_karyotype_bands.tsv as karyotipe configuration, it generates the following error:
Traceback (most recent call last):
  File "/data/share/staging/14508696/tool_files/karyotype-colors.py", line 9, in <module>
    idx=idx, pos=int(float(idx) / highest * 360)
ZeroDivisionError: float division by zero

I checked the file format, and it seems right according to the circos documentation.

So you've used a bands file I think as input to the karyotype field. This is fine, if and only if, there are also the karyotype definitions. The tool does not support stand-alone bands files currently.

So you've used a bands file I think as input to the karyotype field. This is fine, if and only if, there are also the karyotype definitions. The tool does not support stand-alone bands files currently.

Nice, concatenating hg18_karyotype.txt and hg18_karyotype_bands.tsv solved the problem.

Nice, concatenating hg18_karyotype.txt and hg18_karyotype_bands.tsv solved the problem.


I wanna disable changes if post request

I already have a db.js file which works well.
But i have several calls which are posts and post 1 big object with several stuff.
And it returns a other object.
So it is sending a object with several lists.
And the api returns a data object with totals.
Is there a way to disable the changes in memory? My js file is not touched now, when it was json it was changed. But in memory the call is changed now.

Dead? Bump :)

Hi @masaanli,
Currently, it's not supported (maybe later, I'm focusing on husky for the moment).
That said, I would create a reference file like db-master.json and create a copy of it db.json to pass to JSON Server.
This way even if db.json is modified, you can easily get back to your previous state.
Alternatively, you could take advantage of db.js not being touched and do something like:
// db.js
const db = require('./db.json')
module.exports = () => db

Hope this helps :)

Hi @typicode  yeah i did what you suggested, but during the first post request it will have totally different data in the post request and then the Front-End fails because it expects something else :(

The post request still modifies the post request in memory, it is not changing the file but. Still not working this way. Also in memory must not change.
Other problems:

/user/update-culture?culture=en-Gb is not working (our real api is a GET with parameter)
This is not firing the /user/update-culture tag, can I fix this by adding a route or something?
When .js file, and you change it JSON server watch is not working

Any solution here 🤔


VueJS

Hello!
Anybody planning to make a vueJS implementation?
Thanks, amazing library!

Hi @hvitis ! Thanks for trying out Pts.
A Vue implementation would be awesome. I'm not aware of any Vue implementation yet. Would you like to start one? 😉
My Vue knowledge is rather dated. We have a React component for Pts if it's helpful as reference: https://github.com/williamngan/react-pts-canvas
I'm tinkering with Svelte but nothing concrete yet :)

Thank you! I will try for sure. I was just inquiring before in case there has been something done already.
Do you have any clues as per making it? Did you make the react one? Are there some requirements I have to follow?

Yes, I made the React version and @tibotiber made a lot of improvements. @tibotiber -- any advice or tips on this?
I think it's fairly straightforward and there might be Vue specific features that can make it better than the React one too.
Happy to send feedbacks and PRs to your repo. Thanks for initiating this Vue project!

Hi @hvitis and @williamngan, I like the idea of a Vue wrapper around pts. I wouldn't be able to help on the code itself as I'm not a Vue developer myself though. I guess it would look somewhat like the react wrapper. I had a quick look through the dependents of this repo and didn't spot anything Vue related so I think it's fair to consider it "up for grab" ;).

Thanks guys. How do I create a repo on PTS? Can I even do it without enough  permissions?

Hey @hvitis - if you don't have any specific concerns, I would suggest starting a Vue repo from your own account.
Pts is under a permissive open-source Apache license so you don't really need my approval to start a new project with it 😉  I'll be happy to give you feedbacks if you need them. What do you think?

Perfect! I'll do that then. Thanks guys for all the answers

I'm tinkering with Svelte but nothing concrete yet :)

Svelte supports Vanilla JS natively, so like all JS libs, PTS works great in Svelte out of the box.
PT.svelte
<script>
	import { CanvasSpace, Pt, Create, Rectangle, Color } from 'pts';
	import { onMount } from 'svelte';

	let canvas, pts, follower, space, form;

	function PT() {
		pts = [];
		follower = new Pt();
		space = new CanvasSpace(canvas);
		form = space.getForm();

		...stuff
	}

	onMount(() => PT())
</script>

<canvas bind:this={canvas} />

Anywhere.svelte
<script>
	import PT from 'PT.svelte'
</script>

<PT />


[docking] Window is movable even if the mouse is not directly on top of the window

I fat-fingered and hit submit issue without filling in the issue details, sorry for that!
In the docking branch, the window is moveable even if the mouse is not directly on top of the window:

I think this is probably because of the imgui window is still receiving mouse input events even if the window is not in focus:

@garyng Windows 10 maintains some sort of focus even if the window isn't in focus, that's why you can scroll up and down on windows that aren't in focus. I'm not sure if or how this effects ImGui.

@AyphixLLC I think that only applies to scrolling right?
The original imgui doesn't have this problem though.

Is this because of the use of SDL_GetGlobalMouseState? The docs says

This can be useful if you need to track the mouse outside of a specific window

@mellinoe Any idea?

ImGui.NET: the window still get "hovered" event even if the viewport (?) is not focused

Original imgui:

It would be nice to know what's causing this and it would be nice to know a satisfying solution.
I noticed that the XNA sample project (which comes with this repo) still has this bug.
But the Veldrid sample (also from this repo) works like it's meant to be.
This is not directly a bug with the docking branch, but rather a general one.
I just tested it with the current master branch.

Okay, I think that I found a solution to the problem and I created this gist here, which fixes the ImGuiRenderer.cs:
https://gist.github.com/sqrMin1/7449ffb818f790678c979c6085540b94
I simply subscribed to the Activated & Deactivated events from the MonoGame Game class and setting an _inputPossible boolean field correspondingly.
In the UpdateInput prototype I check for the _inputPossible condition.
This happens right before ImGui.NewFrame() as the official ImGui FAQ recommends.
This FAQ also says: "Important: you should always pass your mouse/keyboard inputs to Dear ImGui[...]", which my solution kinda prevents. But this is eaxactly what I want in certain situations, despite that the FAQ states: "This is because e.g. we need to detect that you clicked in the void to unfocus its own windows, and other reasons."
My tests doesn't give bad results so far.
However, if you work with WindowsForms (without a game class) and ImGui.NET, you need to implement the above mentioned steps in every form (subscribe to Activated and Deactivated events).
This is BTW also how the official MonoGame.Framework handles this:

Activated & Deactivated event subscription
Handle Input correspondingly

You just need to close the gap between the ImGuiRenderer and MonoGame or rather creating the bridge.
If there is a better solution I will be happy to hear it.
Cheers

@sqrMin1 The original issue here is about the multi-viewport Veldrid renderer. Are you seeing a similar problem in the MonoGame sample? I can't see any issue there, but I can repro the original one.

I thought it could be a general problem, because I also got this bug in the MonoGame sample. Sorry for confusion.
I'm getting mouse-over effects on overlapping windows, but I couldn't directly click through with the current master.

However it was possible for me to reach "ImGui.IsItemHovered()" breakpoints:

This is why I initially came to the conclusion that this could be connected with this issue. But it could be also a bug for it's own, so I opened #238.

The simple solution is to just check the game's active flag in the ImGuiRenderer.UpdateInput method:
protected virtual void UpdateInput()
{
    if (!_game.IsActive) return;


add orderhash to orderdetails

Adds orderHash to OrderDetails and switches most instances where we use context.executionState.orderHashes[i] to bytes32 orderHash = context.executionState .orderDetails[i] .orderHash to make sure it's working properly.

Codecov Report
Patch coverage has no change and project coverage change: -0.05 :warning:

Comparison is base (d54e2d3) 100.00% compared to head (1bac1ec) 99.95%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1213      +/-   ##
===========================================
- Coverage   100.00%   99.95%   -0.05%
===========================================
  Files           46       47       +1
  Lines         2652     2415     -237
  Branches       396      354      -42
===========================================
- Hits          2652     2414     -238
- Misses           0        1       +1

Flag
Coverage Δ

foundry
?

production
99.91% <ø> (-0.09%)
:arrow_down:

reference
100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 30 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Feature request: ZenDesk support

Could we get ZenDesk support in AlertManager? Our support staff is completely hooked into ZenDesk, it would be great if we could embed (customer) alerts in their workflow.
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket

Hi, as per #2420 (comment) new integrations are not being considered and the advice is to integrate via a webhook.


Update website to GOV.UK Frontend 3.0.0 stable

We have been running the pre-release to make it easier to deploy.

You can preview this change here:
Built with commit 6ce9abd6270802bf564284f3c10c7f7a219014e8
https://deploy-preview-999--govuk-design-system-preview.netlify.com


Android: Fix default notification light & sound for oreo and above

#222
#275
#123
Hi. Is there any progress on this issue?

@hemantbeast
I think NotificationChannel.SetSound() should be executed in DefaultPushNotificationHandler.OnReceived()


ff

Before submitting your bug report

[X] I believe this is a bug. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that reports the same bug
[ ] I've seen the troubleshooting guide on the Continue Docs

Relevant environment info
- OS:
- Continue:
- IDE:
- Model:
- config.json:

Description
No response
To reproduce
No response
Log output
No response

Press F to pay respect.

Closing the issue for obvious reasons : ) But please feel free to re-open with more details!


Possibility of a New Authentication Method?

I noticed in the latest Tesla Android app under Settings that there is an option to "Pair Phone to Powerwall" which requires a toggle of the PW switch.
Has anyone been able to exploit this option to pair a local controller (e.g. Raspberry Pi) to the TEG via a LAN connection?
I am especially wondering if the Powerwall mode (backup, self powered) could once again be controlled locally without using the owner-api.teslamotors.com endpoint.  This local control capability had been essentially removed when the PW firmware was updated from 1.49 to 1.50.

Also keen to hear more about this!  Just tried implementing a POST to /api/operation in tesla_powerwall python library repository, and it wasn't till I ran an integration test that I happened upon an access denied error, e.g.:
tesla_powerwall.error.AccessDeniedError: Access denied for resource /api/operation: Unable to POST to resource: User does not have adequate access rights

Would be fantastic to modify backup percentage via api 🙏

Also keen to hear more about this!  Just tried implementing a POST to /api/operation in tesla_powerwall python library repository, and it wasn't till I ran an integration test that I happened upon an access denied error, e.g.:
tesla_powerwall.error.AccessDeniedError: Access denied for resource /api/operation: Unable to POST to resource: User does not have adequate access rights

Would be fantastic to modify backup percentage via api 🙏

Agree. This does sound very interesting.  I'll leave this issue open until we can find a solution.

I was able to make API calls to my gateway by grabbing the bearer token after logging in to the local web app (as "customer").  It only lasts for a few hours but it allows me to make calls to the /vitals endpoint.

I was able to make API calls to my gateway by grabbing the bearer token after logging in to the local web app (as "customer"). It only lasts for a few hours but it allows me to make calls to the /vitals endpoint.

@patniemeyer Just double checking if you're still able to replicate this? I tested using a bearer token and am still seeing a 404 for /api/devices/vitals.

Maybe we can implement a Authentication to the Code?
Greetings


[Event Request] codeunit 99000832 "Sales Line-Reserve" - OnTransferSaleLineToSalesLineOnAfterSetReservationStatus

Please add a new event OnTransferSaleLineToSalesLineOnAfterSetReservationStatus in procedure TransferSaleLineToSalesLine in codeunit 99000832 "Sales Line-Reserve"
    procedure TransferSaleLineToSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; TransferQty: Decimal)
    var
        ...
    begin
        ...

        for ReservStatus := ReservStatus::Reservation to ReservStatus::Prospect do begin
            if TransferQty = 0 then
                exit;
            OldReservEntry.SetRange("Reservation Status", ReservStatus);
            if OldReservEntry.FindSet then
                repeat
                    OldReservEntry.TestItemFields(OldSalesLine."No.", OldSalesLine."Variant Code", OldSalesLine."Location Code");
                    if (OldReservEntry."Reservation Status" = OldReservEntry."Reservation Status"::Prospect) and
                       (OldSalesLine."Document Type" in [OldSalesLine."Document Type"::Quote,
                                                         OldSalesLine."Document Type"::"Blanket Order"])
                    then
                        OldReservEntry."Reservation Status" := OldReservEntry."Reservation Status"::Surplus;

                    OnTransferSaleLineToSalesLineOnAfterSetReservationStatus(NewSalesLine, OldReservEntry); // <-- NEW EVENT

                    ...

                until (OldReservEntry.Next() = 0) or (TransferQty = 0);
        end;
    end;

    [IntegrationEvent(false, false)]
    local procedure OnTransferSaleLineToSalesLineOnAfterSetReservationStatus(var NewSalesLine: Record "Sales Line"; var OldReservationEntry: Record "Reservation Entry")
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


TableTransformations should be a stack

Please describe the use case that requires this feature.
Currently we only support one column transform per column. However, this e.g. excludes adding units and using FixedPointTransform
which would be e.g. useful for peak_time.
Describe the solution you'd like
Transformations should be a stack per column.

Note: that's kind of reinventing (or reusing) a lot of fits conventions for the HDF tables


Switch fallthrough fails in DDC

Using SDK version 2.2.0 and DDC, the following test program will generate a SyntaxError due to the use of the switch fallthrough continue syntax described at https://www.dartlang.org/guides/language/language-tour#switch-and-case:
void main() {
  String startsWith = 'HI';
  switch (startsWith) {
    case 'HI':
      print('H');
      continue i;
    i:
    case 'I':
      print('I');
      break;
  }
}

I can't reconstruct this: Trying this with dart and dart2js version 2.1.1-dev.3.2 as well as a fresh one from commit b7a5e478bbdd3d439db2726578585bc6346eaa2f, I get no compile-time errors, plus it prints both H and I. I see the same behavior with an ancient dart 1.10.1.
Could your installation of the Dart tools and system be out of order?

@eernstg It works as expected with dart2js, but it does not work when compiled with DDC.
DDC:
pub run build_runner serve web:8080

// Console output:
H
require.js:143 Uncaught SyntaxError: Undefined label 'i'
    at main.dart.bootstrap.js:237
    at Object.execCb (require.js:1696)
    at Module.check (require.js:878)
    at Module.<anonymous> (require.js:1139)
    at require.js:134
    at require.js:1189
    at each (require.js:59)
    at Module.emit (require.js:1188)
    at Module.check (require.js:938)
    at Module.<anonymous> (require.js:1139)
    at require.js:134
    at require.js:1189
    at each (require.js:59)
    at Module.emit (require.js:1188)
    at Module.check (require.js:938)
    at Module.enable (require.js:1176)
    at Module.init (require.js:788)
    at callGetModule (require.js:1203)
    at Object.completeLoad (require.js:1590)
    at HTMLScriptElement.onScriptLoad (require.js:1717)

dart2js:
pub run build_runner serve web:8080 -r

// Console output:
H
I

This appears to be fixed in 2.3.1 (both ddc-analyzer and ddc-kernel).


[fix][txn] Allow producer enable send timeout in transaction

Motivation
In the actual scenario, because the transaction will timeout, the transaction cannot block sending messages all the time. So we send messages with txn need to throw TimeoutException
Modifications
send messages with txn don't need set producer config .sendTimeout(0, TimeUnit.SECONDS)
Verifying this change
add send messages with txn throw TimeoutException test
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

Documentation

Does this pull request introduces a new feature? (yes)

If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

If a feature is not applicable for documentation, explain why?

If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation

[x] doc-not-needed

I found the reason, it's related to the test itself. Will send a fix soon


脱-Shapefile (de-Shapefile) Task Force!

As an outcome of #317, we may want to:

take advantage of the 脱-Shapefile (de-shapefile) movement led by @mapconcierge
to collect the use cases of geospatial open data
so that we can positively think about alternatives that meet each major use cases.

Candidate alternatives might be:

GeoJSON
FlatGeobuf
PMTiles
GeoParquet

Possible use cases might be:

providing modern interface to desktop GIS
implement more geo-enabled web

@hfu thinks that "geo-enabled web" can be another way of describing "Smart Maps" :-)

[ ] We will be creating a Discord channel for that, by @albertkun.

Let's icebox this!


Allow merging-fucntionality on object union

Is your feature request related to a problem? Please describe.
In order to practice modular design, we often have the need to merge nested objects (as each part of the object is decomposed) in a recursive fashion.
For example, we decompose our Azure Databricks module into the following components (in separate yml-files):

Base module:

sku:
  name: Premium

SCC/NPIP capability:

properties:
  parameters:
    enableNoPublicIp:
      value: true # Enable Secure Cluster Connectivity (NPIP)

VNet injection capability:

properties:
  managedResourceGroupId: subscriptionResourceId('Microsoft.Resources/resourceGroups', <managedRg>)
  parameters:
    customPrivateSubnetName:
      value: private-subnet
    customPublicSubnetName:
      value: public-subnet

Private-link capability:

properties:
  parameters:
    publicNetworkAccess: 'Disabled' # Disable public access to the control plane (only private link)
    requiredNsgRules: 'NoAzureDatabricksRules' # Omit NSG egress rule for Azure Databricks service tag (i.e. control plane public IP)

This way, our end-user can (in theory) pick the capabilities they need by merging the capabilities they need:
var base = loadYamlContent('adb-workspace.base.yml')
var scc = loadYamlContent('adb-workspace.scc.yml')
var vnet = loadYamlContent('adb-workspace.vnet.yml')
var plink = loadYamlContent('adb-workspace.pling.yml')

var config = union(base, scc, vnet, plink) // This is currently not supported and requested in this feature request

resource adbWorkspace 'Microsoft.Databricks/workspaces@2023-02-01' = {
  name: name
  location: resourceGroup().location
  sku: config.sku
  properties: config.properties
}

However, the union function currently (rightfully) replaces values for existing keys, even if its corresponding values represent mergeable types, like objects (or arrays).
Describe the solution you'd like
It would be very helpful to provide an additional parameter to union that (recursively) allows for these merges to take place. I assume the bicep function just wraps the ARM function, so this functionality should be implemented there.
Since bicep/ARM is a declarative IaC tool, manipulating declarative structures (like nested objects) in flexible ways would allow for better support for code quality and software design best-practices.

This would be a nice feature. Current issue is siteConfig and appsettings for app services.
param siteConfig object = {
  appsettings: [{
    CONNECTION_STRING: 'MY-SECRET-SQL-STRING'
}]}

var siteConfigConsts = {
  appsettings: [{
    WEBSITES_PORT: '8080'
}]}

output siteConfig object union(siteConfig, siteConfigConsts)

but the output is only siteConfig: {appsettings: [{WEBSITES_PORT: '8080'}]} the CONNECTION_STRING is swallowed since siteConfigConst is overrideing the appsettings field completely.
output test object = union({test: ['test']}, {test: ['temp']})

Expected output test: ['test', 'temp'] but no :(


These instructions are either incomplete or incorrect.

The instructions regarding setting up a solution with working WebAssemblyPrerendered are too difficult to follow. I have spent several hours trying to follow along and I just cannot get it to work.
Step 4 says:
Add _Host.cshtml and _Layout.cshtml files to the Server project's Pages folder. You can obtain the files from a project created from the Blazor Server template using Visual Studio or using the .NET CLI with the dotnet new blazorserver -o BlazorServer command in a command shell (the -o BlazorServer option creates a folder for the project). After placing the files into the Server project's Pages folder, make the following changes to the files.
That template does not contain a _Layout.cshtml file.
I encountered numerous error messages and I couldn't find any information on how to resolve them. I'm going to switch to a Blazor Server solution instead.
I think that there should be two dotnet new templates for a blazor wasm hosted with prerendering enabled. One with auth and one without auth. Then I could at least do a diff on my solution versus the working solution.

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

ID: 329a19ef-fb46-1f6b-a734-fa1c1334b1e5
Version Independent ID: 3fa4318a-3c11-c1d8-bf24-ddc6d8441ca2
Content: Prerender and integrate ASP.NET Core Razor components
Content Source: aspnetcore/blazor/components/prerendering-and-integration.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

There isn't too much I can do about it. This is (or was given that it hasn't been checked since perhaps the 6.0 release) ... this is the set of required steps to set it up.
WRT ...

That template does not contain a _Layout.cshtml file.

That's for 6.0. In 7.0, they went back to _Host.cshtml. I'll check to confirm that that step is versioned properly. If you're looking at the 6.0 version of the topic, that's fine. If you're looking at the 5.0 or 7.0 version of the topic, that shouldn't be there.

I think that there should be two dotnet new templates for a blazor wasm hosted with prerendering enabled. One with auth and one without auth. Then I could at least do a diff on my solution versus the working solution.

That would have to be a product unit request provided to them on their repo at ...
https://github.com/dotnet/aspnetcore/issues
As for this issue, let's leave it here for me to take some time and check the guidance against 7.0 to see if I can get it to work these days ... if not to get it working for >=7.0. I'm buried in security updates for a few more weeks, so I think the soonest that I would reach this is in March.

That template does not contain a _Layout.cshtml file.

Confirmed! The versioning isn't correct. That I will fix immediately ... Saturday morning as I'm OOF the rest of the day. Thanks for pointing that out. I'll get it fixed and on the live site first thing tomorrow morning.

No ... actually ... you are looking at the 6.0 version of the topic. If you use the doc version selector and look at the 7.0 version of the topic, that content on _Layout.cshtml in the Pages folder of the client app go away correctly. I did get the versioning correct on that.
Ok ... so that's fine. I do need to check the whole process tho against 7.0 to see if I can get it to 💥 ... or work. I'll get back to this as soon as I can.

I mistakenly had not considered that the dotnet new command was creating the project for .net 7 and not .net 6.
However, I also followed the instructions for creating a new hosted option dotnet new blazorwasm -ho and the instructions appear to work correctly. But if the user clicks any links too soon the page produces an error. And if the user reloads any page, except the home page, a 404 error appears. Is that expected? That means a user wouldn't be able to share a link.

I'm not sure. I'll definitely take that into account when I walk the steps to see what's what. If we need product unit support for items like that, I'll probably refer you to the product repo to open an issue for them. First, let me see if I can reproduce those behaviors here.
I was thinking that I'd like to push this to beyond the security work, but I'll do it on Tuesday morning. We're on a three-day holiday for President's Day ... back on Tuesday. I'll get back to you.

I'm going to walk these steps right now. Unfortunately, I've been up since 3am due to a family member's coughing related to COVID. 🤕 There is nothing else to do around here at this hour but work! 🤣

I mistakenly had not considered that the dotnet new command was creating the project for .net 7 and not .net 6.

It's probably worth mentioning at the start of the whole section that the reader should be careful to look at the version of the document for the version of ASP.NET Core that they're adopting, so I'll at least call that out.
I'll be back in a bit. I'll see if I can repro what you reported.

Ok ... let's take these one at a time ...
> But if the user clicks any links too soon the page produces an error.
I can't detect any problems. However, I'm using a very FAST 🏃 PC here.
Also, you didn't say what links you're clicking that are failing, nor did you indicate what error or behavior you're seeing.
> And if the user reloads any page, except the home page, a 404 error appears. Is that expected? That means a user wouldn't be able to share a link.
😮 I wasn't aware of this! As you said ... when reloading on the FetchData page or opening another browser and attempting to navigate directly to that page, I get ...

InvalidOperationException: Cannot provide a value for property 'Http' on type 'BlazorHosted.Client.Pages.FetchData'. There is no registered service of type 'System.Net.Http.HttpClient'.

Full stack trace for reference (I'll need this in a sec because I'm going to report this) ...
System.InvalidOperationException: Cannot provide a value for property 'Http' on type 'BlazorHosted.Client.Pages.FetchData'. There is no registered service of type 'System.Net.Http.HttpClient'.
   at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass7_0.<CreateInitializer>g__Initialize|1(IServiceProvider serviceProvider, IComponent component)
   at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance)
   at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
   at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
   at Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.RenderComponentAsync(Type componentType, ParameterView initialParameters)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c__11`1.<<InvokeAsync>b__11_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.ViewFeatures.StaticComponentRenderer.PrerenderComponentAsync(ParameterView parameters, HttpContext httpContext, Type componentType)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.PrerenderedWebAssemblyComponentAsync(HttpContext context, Type type, ParameterView parametersCollection)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.RenderComponentAsync(ViewContext viewContext, Type componentType, RenderMode renderMode, Object parameters)
   at Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
   at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
   at BlazorHosted.Server.Pages.Pages__Host.<ExecuteAsync>b__14_1() in C:\Users\guard\OneDrive\Desktop\BlazorHosted\Server\Pages\_Host.cshtml:line 20
   at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
   at BlazorHosted.Server.Pages.Pages__Host.ExecuteAsync()
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Also, when reloading rapidly on the Counter page, I get a client-side (i.e., in the console) error. The following only happens when I reload rapidly, not slowly. Relatively slow reloads seem to be fine.

System.AggregateException: One or more errors occurred. (error loading dynamically imported module
---> Microsoft.JSInterop.JSException: error loading dynamically imported module
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.InitializeAsync()
at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost.RunAsyncCore(CancellationToken cancellationToken, WebAssemblyCultureProvider cultureProvider)
at Program.$(String[] args)
--- End of inner exception stack trace ---

Opening for the product unit
I'll open a product unit issue on these and ping you on it.

Ok, that issue on their repo will get us started here, but I'm going to put in a quick "addresses" PR to call out that the reader should be careful with which version of the topic that they're consuming relative to the version of ASP.NET Core that they're working in. As you say, looking at the 6.0 version of the topic and working in 5.0 or 7.0+ will be very confusing given the churn on the _Layout.cshtml file, which was only used for the 6.0 release.

@Krangth ... Since Artak just labelled that for .NET 8 investigation, it could take a little while to address these problems. Let's leave this docs issue open. I'll just mark it 'blocked' for now. I'll keep an 👁 on the PU issue to see how it plays out.

UPDATE (7/6): I've learned that the hosted WASM hosting option is going away for 8.0 and later. I'm asking on the PU issue if they still plan to investigate these problems for <8.0. If they just close it out as a won't-fix scenario, then we probably won't ever get an answer on these problems. Stand-by .... They'll probably respond shortly to my ask, and I'll remark here on their decision.

UPDATE (10/2): The PU issue is still open and is scheduled for this release. They might bump it ... not sure. I'll continue to monitor that issue and see how it plays out. In the meantime, we have new integration guidance for the upcoming .NET 8 release that's hot off the presses ...
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integration?view=aspnetcore-8.0
It favors server rendering with a BWA, but WebAssembly component rendering should work fine if the app is configured for it via the Render modes article. We won't be updating the guidance specifically for hosted WebAssembly apps created from the hosted WebAssembly project template of <8.0. For >=8.0, devs are encouraged to adopt a BWA to host WebAssembly-rendered components in spite of hosted WASM continuing to be supported by the product unit in 8.0.

Update (1/17/24): It was moved to .NET 9 for PU investigation. I'm going to place this issue on On Hold until they take a look.

Update (8/5/24): This is still scheduled as a bug investigation on the PU repo. Continuing to HOLD for now.