text:
[ci] Move R Windows CI to GitHub Actions

This PR addresses https://github.com/microsoft/LightGBM/pull/3065#pullrequestreview-429217760, moving all Windows R CI jobs to GitHub Actions.
Why this is important
This should reduce the total runtime of CI for this project. GitHub Actions allows 20 concurrent builds...AppVeyor (which we currently use) allows 1 😬
While testing on my fork, I found that thanks to this concurrency, all 12 jobs for R run in 12-13 minutes!!!

As of this PR, we will have four R Windows jobs all in GitHub Actions:

R 4.0 + MSYS2 toolchain
R 4.0 + Visual Studio 2019
R 3.6 + MINGW toolchain
R 3.6 + Visual Studio 2017

You can see the full details of software versions for the GitHub Actions environments here.
What I Changed
We didn't move R jobs into GitHub Actions in #3119 because of the issues with Powershell jobs on GitHub Actions (https://github.community/t/powershell-steps-fail-nondeterministically/115496) / Powershell itself (https://github.com/PowerShell/PowerShell/issues/12823).
R, Rscript, and initexmf all produce harmless messages to stderr, which could trigger the issues linked above. I tried many approaches to fix this, including:

redirecting to $null
setting $ErrorActionPreference = "SilentlyContinue"
using -ErrorAction flag
piping to Out-Null with |
piping to Out-String with |
redirecting to a file

None of these approaches worked, but the one in this PR did: calling these commands with R and using R's built-in redirection, sink().

@jameslamb Very strange error at master r-package (windows-2016, MSVC, R 3.6):
2020-06-22T20:39:00.9756578Z Downloading R and Rtools
2020-06-22T20:39:01.0197729Z Downloading https://cloud.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe
2020-06-22T20:39:07.7544683Z Downloading https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe
2020-06-22T20:39:17.8466524Z Installing R
2020-06-22T20:39:54.6747608Z Done installing R
2020-06-22T20:39:54.6748751Z Installing Rtools
2020-06-22T20:40:39.7710780Z Done installing Rtools
2020-06-22T20:40:39.7712023Z Installing dependencies
2020-06-22T20:40:43.0911257Z package 'callr' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.1132167Z package 'prettyunits' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.1380186Z package 'backports' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.1600585Z package 'assertthat' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.1874920Z package 'glue' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.2174329Z package 'fansi' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.2429247Z package 'desc' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.2662949Z package 'pkgbuild' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.2903885Z package 'rprojroot' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.3226199Z package 'rstudioapi' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.3549368Z package 'ps' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.3881218Z package 'cli' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.4292255Z package 'crayon' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.4636846Z package 'digest' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.4783234Z package 'ellipsis' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.5258321Z package 'evaluate' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.5506307Z package 'magrittr' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.5764769Z package 'pkgload' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.5961975Z package 'praise' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.6386148Z package 'rlang' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.6659431Z package 'withr' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.7596015Z package 'data.table' successfully unpacked and MD5 sums checked
2020-06-22T20:40:43.8169609Z package 'jsonlite' successfully unpacked and MD5 sums checked
2020-06-22T20:40:44.1616615Z package 'Matrix' successfully unpacked and MD5 sums checked
2020-06-22T20:40:44.1981826Z package 'processx' successfully unpacked and MD5 sums checked
2020-06-22T20:40:44.2213825Z package 'R6' successfully unpacked and MD5 sums checked
2020-06-22T20:40:44.2953141Z package 'testthat' successfully unpacked and MD5 sums checked
2020-06-22T20:40:44.2992830Z
2020-06-22T20:40:44.2993625Z The downloaded binary packages are in
2020-06-22T20:40:44.2993977Z 	C:\Users\runneradmin\AppData\Local\Temp\RtmpgNi5C6\downloaded_packages
2020-06-22T20:40:44.3519903Z Building R package
2020-06-22T20:40:58.0415255Z ----- build and install logs -----
2020-06-22T20:40:58.0506063Z * checking for file 'D:/a/LightGBM/LightGBM/lightgbm_r/DESCRIPTION' ... OK
2020-06-22T20:40:58.0506283Z
2020-06-22T20:40:58.0506432Z * preparing 'lightgbm':
2020-06-22T20:40:58.0506821Z
2020-06-22T20:40:58.0506993Z * checking DESCRIPTION meta-information ... OK
2020-06-22T20:40:58.0507164Z
2020-06-22T20:40:58.0507639Z * cleaning src
2020-06-22T20:40:58.0507745Z
2020-06-22T20:40:58.0507902Z * checking for LF line-endings in source and make files and shell scripts
2020-06-22T20:40:58.0507981Z
2020-06-22T20:40:58.0508163Z * checking for empty or unneeded directories
2020-06-22T20:40:58.0508228Z
2020-06-22T20:40:58.0508377Z WARNING: directory 'lightgbm/src/compute/test' is empty
2020-06-22T20:40:58.0508510Z
2020-06-22T20:40:58.0508660Z * looking to see if a 'data/datalist' file should be added
2020-06-22T20:40:58.0508731Z
2020-06-22T20:40:58.0508877Z * building 'lightgbm_2.3.2.tar.gz'
2020-06-22T20:40:58.0508941Z
2020-06-22T20:40:58.0509033Z
2020-06-22T20:40:58.0509084Z
2020-06-22T20:40:58.0509306Z * installing to library 'd:/a/LightGBM/LightGBM/RLibrary'
2020-06-22T20:40:58.0509418Z
2020-06-22T20:40:58.0509520Z * installing *source* package 'lightgbm' ...
2020-06-22T20:40:58.0509627Z
2020-06-22T20:40:58.0509767Z ** using staged installation
2020-06-22T20:40:58.0509827Z
2020-06-22T20:40:58.0509973Z ** libs
2020-06-22T20:40:58.0510027Z
2020-06-22T20:40:58.0510218Z       1 [main] make (856) d:\a\LightGBM\LightGBM\RLibrary\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF35410/0xE55410.
2020-06-22T20:40:58.0510430Z This problem is probably due to using incompatible versions of the cygwin DLL.
2020-06-22T20:40:58.0510610Z Search for cygwin1.dll using the Windows Start->Find/Search facility
2020-06-22T20:40:58.0512177Z and delete all but the most recent version.  The most recent version *should*
2020-06-22T20:40:58.0512409Z reside in x:\cygwin\bin, where 'x' is the drive on which you have
2020-06-22T20:40:58.0512585Z installed the cygwin distribution.  Rebooting is also suggested if you
2020-06-22T20:40:58.0512745Z are unable to find another cygwin DLL.
2020-06-22T20:40:58.0512948Z       1 [main] make 3824 fork: child -1 - forked process 856 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
2020-06-22T20:40:58.0513149Z make: d:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
2020-06-22T20:40:58.0513364Z       1 [main] make (140) d:\a\LightGBM\LightGBM\RLibrary\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF35410/0xF15410.
2020-06-22T20:40:58.0513595Z This problem is probably due to using incompatible versions of the cygwin DLL.
2020-06-22T20:40:58.0513771Z Search for cygwin1.dll using the Windows Start->Find/Search facility
2020-06-22T20:40:58.0513951Z and delete all but the most recent version.  The most recent version *should*
2020-06-22T20:40:58.0514247Z reside in x:\cygwin\bin, where 'x' is the drive on which you have
2020-06-22T20:40:58.0514422Z installed the cygwin distribution.  Rebooting is also suggested if you
2020-06-22T20:40:58.0514587Z are unable to find another cygwin DLL.
2020-06-22T20:40:58.0514783Z   34110 [main] make 3824 fork: child -1 - forked process 140 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
2020-06-22T20:40:58.0514984Z make: d:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
2020-06-22T20:40:58.0515203Z       1 [main] make (520) d:\a\LightGBM\LightGBM\RLibrary\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF35410/0x1085410.
2020-06-22T20:40:58.0515407Z This problem is probably due to using incompatible versions of the cygwin DLL.
2020-06-22T20:40:58.0515540Z Search for cygwin1.dll using the Windows Start->Find/Search facility
2020-06-22T20:40:58.0515718Z and delete all but the most recent version.  The most recent version *should*
2020-06-22T20:40:58.0515899Z reside in x:\cygwin\bin, where 'x' is the drive on which you have
2020-06-22T20:40:58.0516074Z installed the cygwin distribution.  Rebooting is also suggested if you
2020-06-22T20:40:58.0516232Z are unable to find another cygwin DLL.
2020-06-22T20:40:58.0516423Z   66502 [main] make 3824 fork: child -1 - forked process 520 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
2020-06-22T20:40:58.0516623Z make: d:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
2020-06-22T20:40:58.0516836Z       1 [main] make (2348) d:\a\LightGBM\LightGBM\RLibrary\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF35410/0xF15410.
2020-06-22T20:40:58.0517033Z This problem is probably due to using incompatible versions of the cygwin DLL.
2020-06-22T20:40:58.0517205Z Search for cygwin1.dll using the Windows Start->Find/Search facility
2020-06-22T20:40:58.0517341Z and delete all but the most recent version.  The most recent version *should*
2020-06-22T20:40:58.0517515Z reside in x:\cygwin\bin, where 'x' is the drive on which you have
2020-06-22T20:40:58.0517684Z installed the cygwin distribution.  Rebooting is also suggested if you
2020-06-22T20:40:58.0517841Z are unable to find another cygwin DLL.
2020-06-22T20:40:58.0518030Z   98870 [main] make 3824 fork: child -1 - forked process 2348 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
2020-06-22T20:40:58.0518203Z make: fork: Resource temporarily unavailable
2020-06-22T20:40:58.0518357Z ERROR: compilation failed for package 'lightgbm'
2020-06-22T20:40:58.0518427Z
2020-06-22T20:40:58.0518578Z * removing 'd:/a/LightGBM/LightGBM/RLibrary/lightgbm'
2020-06-22T20:40:58.0518683Z
2020-06-22T20:40:58.0518894Z ----- end of build and install logs -----
2020-06-22T20:40:58.0610797Z The wrong compiler was used. Check the build logs.
2020-06-22T20:40:58.1127926Z ##[error]Process completed with exit code -1.

:scream: I have never seen that one!

authors: StrikerRUS jameslamb


text:
[BUG] Receiving Tune Request (0xF6) via USB MIDI 1.0 device doesn't work.

Describe the bug
Tune Request (System Common)  messages could not be received via USB MIDI 1.0 device which work with an existing USB MIDI 1.0 driver (USBAUDIO.sys).
To Reproduce

Set the Roland UM-ONE to class compliant mode and short UM-ONE's INPUT and OUTPUT to loop back the message.
Attach UM-ONE to the PC and make sure the device is working with USBAUDIO.sys.
Open midi.exe in two windows.
From one, monitor UM-ONE.
From the other, run following command with attached file:
'midi endpoint send-message 0x10F60000 --count 10'

Expected behavior
Sent Tune Request messages is received.
Observed behavior
No Tune Request messages is received.
Screenshots
All messages are sent and received on the USB transaction.

Installer Name or Version

DP4 Daily3 (Windows.MIDI.Services.Developer.Preview.4.x64.1.0.24018.1850.exe)

Desktop (please complete the following information):

OS: Windows 11 23H2 build 26020.1000

Device information, if this is with an external MIDI device:

Roland UM-ONE mk2
Classic MIDI 1.0 class driver (USBAUDIO.sys)

Application Information

midi.exe console app.

Additional context
If the device is working with the new USB MIDI 2.0 driver (USBMidi2.sys), it works fine.

Thank you again for your report @m-komo

This should be fixed as soon as we pull in the new AM Lib from Andrew. We're working on the vcxpkg approach to be able to properly consume that.

The issue persists on the DP5.

MIDI Service version: DP5 (1.0.24066.2126)
Driver version: DP5 (10.0.14)
OS version: Windows 11 24H2 build 26063.1

Tested with DP6 0x10F60000 onP device with UMP and legacy MIDI1 support. using windows legacy driver, device goes in legacy mode and when sending this UMP package a legacy MIDI F6 was received on the device.

I confirmed that the issue has been solved.

Service: Windows.MIDI.Services.In-Box.Service.-.Developer.Preview.6.1.0.24194.2233-x64.exe
Driver: [interim preview build] 240713-USBMidi2-x86-TESTSIGNED.zip (DriverVer = 07/13/2024,23.1.50.504)

source: gharchive/issue

authors: MusicMaker Psychlist1972 m-komo

repo: microsoft/MIDI

license: MIT

license_type: permissive

license_source: github-api


text:
How to read and send recyclable memory stream parallel to multiple destinations

Hi,
I'm working in a document processing app, where we need to pass large documents (20MB). I read the document as a stream and populate it to recyclable memory stream and feed it to Aspose Word library. The library after processing the document returns another stream which I also can copy to recyclable stream. Now I need to send the output document stream to multiple destinations like email, database etc. How can I deliver the stream to multiple places in parallel? Do I need to clone it? Does cloning cause more memory issues?

Cloning the stream would likely annul the benefits of using this library. The point of RMS is to avoid allocating new bytes, and then ideally copying those bytes everywhere.
Other specifics would really depend on the libraries and application your using in. If they can take read-only spans, buffers with length, streams, or other equivalent interfaces to memory, then theoretically there's no limit to how many places you can use these bytes--as long as the access is read-only.

authors: benmwatson vanand-conga


text:
Removing a mesh from a ClippingPrimitive resets all the properties from the material

Describe the bug
Removing a mesh from a ClippingPrimitive resets all the properties from the material. It clears the properties that the clipping system has set, but the issue is that it also clears all the properties that other systems have set to the material using a MaterialPropertyBlock
To reproduce

Set a color to a material using a MaterialPropertyBlock
Add the render to a clipping primitive
Remove the render from the clipping primitive
Check that the color set in step 1 is lost

You can use this code to reproduce it
using Microsoft.MixedReality.GraphicsTools;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

public class RemoveFromClippingPrimitiveBugTest: MonoBehaviour
{
    public bool randomColor = false;
    public Color color = Color.yellow;
    public Material material;

    public List<MeshRenderer> renderers;

    private MaterialPropertyBlock propBlock;

    public ClippingPrimitive clippingPrimitive;

    public float waitTime = 1f;

    public void OnEnable()
    {
        renderers = this.GetComponentsInChildren<MeshRenderer>().ToList();

        foreach (var renderer in renderers)
        {
            renderer.sharedMaterial = material;
        }

        propBlock = new MaterialPropertyBlock();
    }

    public IEnumerator Start()
    {
        clippingPrimitive.gameObject.SetActive(false);
        yield return new WaitForSeconds(waitTime);
        SetColor(); //Use property block to set color
        yield return new WaitForSeconds(waitTime);
        AddToClippingPrimitive(); //Add all renderers to clipping primitive
        yield return new WaitForSeconds(waitTime);
        RemoveFromClippingPrimitive(); //Remove all renderers to clipping primitive. See how color is lost
    }

    private void SetColor()
    {
        foreach (var renderer in renderers)
        {
            Color c = randomColor ? Random.ColorHSV() : color;
            renderer.GetPropertyBlock(propBlock);
            propBlock.SetColor("_Color", c);
            renderer.SetPropertyBlock(propBlock);
        }
    }

    private void AddToClippingPrimitive()
    {
        clippingPrimitive.gameObject.SetActive(true);

        foreach (var renderer in renderers)
        {
            clippingPrimitive.AddRenderer(renderer);
        }
    }

    private void RemoveFromClippingPrimitive()
    {
        clippingPrimitive.gameObject.SetActive(false);

        foreach (var renderer in renderers)
        {
            clippingPrimitive.RemoveRenderer(renderer);
        }
    }

    public void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space))
        {
            SetColor();
        }

        if (Input.GetKeyDown(KeyCode.C))
        {
            ClearPropertyBlock();
        }

    }

    private void ClearPropertyBlock()
    {
        foreach (var renderer in renderers)
        {
            propBlock.Clear();
            renderer.SetPropertyBlock(propBlock);
        }
    }
}

This is happing because ClippingPrimitive.RemoveRenderer calls to ClippingPrimitive.ResetRenderer that has this call
materialPropertyBlock.Clear();
_renderer.SetPropertyBlock(materialPropertyBlock);

https://github.com/microsoft/MixedReality-GraphicsTools-Unity/blob/9a2f1242ce09fb1c28dba898f51e436611959ac8/com.microsoft.mrtk.graphicstools.unity/Runtime/Clipping/ClippingPrimitive.cs#L187
Expected behavior
The color (or any other property that is used outside the clipping system) remains.
This was the behavior in MRTK 2.x
Screenshots
https://github.com/microsoft/MixedReality-GraphicsTools-Unity/assets/25863696/7ce4dc7b-8c4a-4ea7-9183-59003df15d02
Your setup (please complete the following information)

2022.3.14f1.0.19043
Graphics Tools Version 0.6.5

Target platform (please complete the following information)

Editor
Hololens 2

Additional context
The used shader is Graphics Tool/Standard

Thank you for the very detailed bug report @Maesla, it's appreciated, and we will follow up!

authors: Cameron-Micka Maesla


text:
Hololens clicker not working

Overview
Clicker not working with interactable and other scripts also
Expected Behavior
Should select or click on the gazed object
Actual Behavior
Just show a white line when clicked and nothing get selected or clicked. Also deployed to device that is on HoloLens
Unity Editor Version
2018.4.1
Mixed Reality Toolkit Release Version
Microsoft Mixed Reality Toolkit v2.0.0 RC2.1

This should be fixed in #5402! Please take a look, if you get a chance.

Closing as this should be fixed. please reopen if issues persist.

How can I detect the clicker input. I am getting white line in the hololense after clicking from it,
Please help ASAP

How can I detect the clicker input. I am getting white line in the hololense after clicking from it,
Please help ASAP

You must be using MRTK. Use the latest source code of MRTK and make sure that you install the application on the HoloLens. I am building for HoloLens 1 and MRTK don't support HoloLens 1 completely so it's better to use HoloToolkit to build for HoloLens 1

Thanks. I think I have figured it out using  InteractionManager_InteractionSourcePressed(InteractionSourcePressedEventArgs args) method rather than using mrtk for controllers

We definitely support HL1 and the clicker with MRTK!
@iotMice Which version of MRTK are you using? I made some updates in the linked PR above (#5402) to better support the clicker. Are you still seeing the white line with the GA 2.0.0 version?
@Kartik99999, what do you mean by the MRTK not supporting HoloLens 1 completely? Please file issues whenever you run into something unexpected.

We definitely support HL1 and the clicker with MRTK!
@iotMice Which version of MRTK are you using? I made some updates in the linked PR above (#5402) to better support the clicker. Are you still seeing the white line with the GA 2.0.0 version?
@Kartik99999, what do you mean by the MRTK not supporting HoloLens 1 completely? Please file issues whenever you run into something unexpected.

HoloToolkit supported placing anchors in the surroundings. I can't find that in MRTK. Is it available now as it has been 20 days?

HoloToolkit supported placing anchors in the surroundings. I can't find that in MRTK.

@Kartik99999 We do have the WorldAnchorManager in MRTK, which should currently function similarly to the one in HoloToolkit: https://github.com/microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Experimental/Features/Utilities/WorldAnchorManager.cs
We're still working on an improved anchor management system as well, hence why that script is currently in the Experimental folder.

@keveleigh I am using mrtk 2.0.  I am able to detect the click events as mentioned . But I am facing one issue, which is white dotted line comes after I make my first click, and it remains there at the screen.How should I solve it

@keveleigh is there any update on the same?

I am not able to reproduce this on the latest 2.1.0 code. The clicker selects and interacts without a pointing ray (as expected)

@davidkline-ms Can you tell me how do you add clicker functionality in any custom application made in Unity by importing Hololens SDK. Which interface are you using to map the click events.
Thanks and Regards

Hi,
How can I use the clicker with mrtk 2.1 in unity 2019.2.5f1. It doesn't seem to recognize it as a GGV Hand. I'm not very experienced with HoloLens development but I would like to integrate this tool into my app and would very much appreciate some help.

Does the clicker work on Holographic Emulation?

authors: Kartik99999 Yoyozilla davidkline-ms iotMice keveleigh marcfischer123467

repo: microsoft/MixedRealityToolkit-Unity


text:
official diminished reality support?

is that possible to get official "diminished reality" support in this toolkit?

I don't think that it will be part of this Toolkit. In VR, you don't have the real world you would do this in. In AR you see the real world with your own eyes so you'd need to add rendered patches as overlayes which might be ugly. This leaves devices that show the image via camera feed, meaning mobile phones. And for those you don't need the MRTK.

Do you have a link to more information on "diminished reality"? I'm not sure I've heard this term before.

authors: Alexees Lei-Wei keveleigh


text:
Linux

integrate using different usernames for each computer.

@vidyas00 old pr for npt-linux

source: gharchive/pull-request

repo: microsoft/NetPerfTest-Linux


text:
V2 - Why is OpenAPISchema.Type of type "object"?

This provides a really poor development experience, forcing the consumer to implement complex type assertions when it shouldn't be required.
And then we do things like those: https://github.com/microsoft/OpenAPI.NET/blob/3c644511afba381b0c580f31d7282ac1e98c8d41/src/Microsoft.OpenApi/Models/OpenApiSchema.cs#L839
Which is not only going to be slow, but also problematic for people using AOT/trimming.
We already know that OAS 3.1 and Json Schema only support the following types:

null
boolean
object
array
number
string

(maybe we could add compatibility with the integer mess).
Why not instead:

Define an enum for those types
Make the type property, an array/list/enumerable of that enum
When serializing as v2/v3, ensuring that we emit the right compatible information.

I hadn't noticed this.  I agree that making the type property of type object is not going to be a great experience.  However, I'm not sure making it an array is the right choice considering how commonly devs will only want to set a single value.
Could we make a HttpMethod style class that does some operator overloading to handle assigning both simple values and arrays?

@darrelmiller with modern CSharp (12) people can simply write collection expressions
schema.Type = [SchemaType.Object];

(assuming we go with an enum)
@calebkiage I think this is simply an abstract of the JSON schema spec at the end, the possible values here being constrained to a set we know in advance, we might as well use an enum.

authors: baywet darrelmiller


text:
BrianGun/issue257

Functions to create and manipulate clusters of elements in lattices.
Description
These functions allow you to create repeating clusters of lattice elements.
Fixes # (257)
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
created various clusters and verified that they graphed properly.
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 commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[x] I have checked my code and corrected any misspellings

Codecov Report

Merging #264 (c9818fa) into main (1fce5a5) will decrease coverage by 0.37%.
The diff coverage is 1.88%.

:exclamation: Current head c9818fa differs from pull request most recent head b67e96d. Consider uploading reports for the commit b67e96d to get more accurate results

@@            Coverage Diff             @@
##             main     #264      +/-   ##
==========================================
- Coverage   53.01%   52.63%   -0.38%
==========================================
  Files          77       78       +1
  Lines        6974     7024      +50
==========================================
  Hits         3697     3697
- Misses       3277     3327      +50

Impacted Files
Coverage Δ

src/Examples/repeating_structure_examples.jl.jl
0.00% <0.00%> (ø)

src/RepeatingStructures/Cluster.jl
0.00% <0.00%> (ø)

src/RepeatingStructures/HexagonalLattice.jl
0.00% <0.00%> (ø)

src/Vis/VisRepeatingStructures.jl
0.00% <0.00%> (ø)

src/RepeatingStructures/Lattice.jl
7.14% <9.09%> (+2.59%)
:arrow_up:

src/RepeatingStructures/RectangularLattice.jl
100.00% <100.00%> (ø)

src/Vis/Visualization.jl
9.01% <0.00%> (+0.14%)
:arrow_up:

src/Geometry/CSG/CSG.jl
83.52% <0.00%> (+0.31%)
:arrow_up:

Continue to review full report at Codecov.

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

@galran could you look over this PR and tell me if you think more examples are necessary (look in Examples directory, repeating_structures_examples.jl).

authors: BrianGun codecov-commenter


text:
Files are wrongfully counted as test files

Summary
A file like DuplicateStorageItemPlugin.java is considered as a test file because it contains the word test, even though the camel casing shows it's clearly not a test file.
Reproduction Steps

Calculate the metrics for a pull request where a file with a name like DuplicateStorageItemPlugin.java is one of the added/edited files.

Thanks @aerodynamica for using PR Metrics and for letting us know about the issue. I've now got a PR out – linked above – which should resolve the issue.
Note that PR Metrics is designed to provide a quick and robust determination of the metrics rather than a slow but accurate determination. Therefore, it is possible and acceptable that the new algorithm will still detect false positives. But overall, it should be much more accurate, and it will resolve the issue you detected.

authors: aerodynamica muiriswoulfe

repo: microsoft/PR-Metrics


text:
Autocompletion dialogue automatically shows "no completions" when completions are possible

Type "pk" and autocomplete will pop up with suggestions. Press space and move back.
Type "g" so you have "pkg" and autocomplete shows "no completions".
Press control+space, autocomplete will show valid completions.

The same issue happens when you insert the "dot operator"

Ctrl+Space (Edit.CompleteWord) will list all members

Verified with Visual Studio 16.4.0 Preview 2.0
Python 16.4.19275.1

repo: microsoft/PTVS


text:
Few Time Expressions yields errors [wip]

Below expression with Time function gives incorrect result.
Expression: Time(2, 1, 1) + 60000 OR 60000 + Time(2, 1, 1)
Current O/P: Error
Expected O/P: DateTime(2064,4,8,2,1,1)
Explanation: the addition should add 60000 days to 1970-01-01T10:02:01.000Z, which should result in  DateTime(2064,4,8,2,1,1)
Expression: -Time(2, 0, 0)
Current O/P: Error
Expected O/P: 10:00 AM (Date 12/31/1969)
Expression: Time(2, 1, 1) + -Time(2, 0, 1)
Current O/P: Error
Expected O/P: Time(0,1,0)

Date reference isn't 1st Jan 1970 but approx. 1st Jan 1900
See https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year
(We have that bug and need to keep it)
Adding 60k days to 1/1/70 would end up in 2134 (April11th)

From McCall, also consider:
Time - Time = Time + (-Time)
And
Date - Date = Date + (-Date)
This may have some relation to #354 .

Is this addressed by Carlos's recent work?

Yes, this was fixed via, https://github.com/microsoft/Power-Fx/pull/659

authors: LucGenetier MikeStall jas-valgotar

repo: microsoft/Power-Fx


text:
Request for Fluent UI React v9 compatibility with Power Apps PCF

Summary:
Integrating Fluent UI React v9 into Power Apps PCF controls is currently challenging due to React version limitations in Power Apps. Canvas apps support React 16.14.0, but Fluent UI React v9 requires React 17 or higher.
Use Case:
Power Apps developers want to use the improved components and features of Fluent UI React v9 to build modern, responsive, and accessible PCF controls.
Problem:
Power Apps PCF does not support React 17, creating a dependency mismatch that makes it impossible to leverage Fluent UI React v9.
Request:
1.	Explore backward compatibility for Fluent UI React v9 with React 16.14.0.
2.	Collaborate with the Power Apps team to align supported React versions or provide an alternative integration pathway.
3.	Document clear guidelines for using Fluent UI React v9 in PCF projects.
This approach increases the chances of your issue being addressed and creates a pathway for better integration between Fluent UI and Power Apps PCF.
In the documentation it was mentioned Fluent version 9.46.2 can be used, however it was not mentioned importing from @fluentui/react or @fluentui/react-components When we try to install from latter we are running into dependency and compatible issues.
React controls & platform libraries (preview)

@sekharmalla Sorry, but this is not the place to request enhancements to products. We handle issues to our code samples here.

authors: phecke sekharmalla

repo: microsoft/PowerApps-Samples


text:
Add Luware Nimbus Connector Artifacts

When submitting a connector, please make sure that you follow the requirements below, otherwise your PR might be rejected. We want to make you have a well-built connector, a smooth certification experience, and your users are happy :)
If this is your first time submitting to GitHub and you need some help, please sign up for this session.

[X] I attest that the connector doesn't exist on the Power Platform today. I've verified by checking the pull requests in GitHub and by searching for the connector on the platform or in the documentation.
[X] I attest that the connector works and I verified by deploying and testing all the operations.
[X] I attest that I have added detailed descriptions for all operations and parameters in the swagger file.
[X] I attest that I have added response schemas to my actions, unless the response schema is dynamic.
[X] I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
[X] If this is a certified connector, I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff. If this is an independent publisher connector, I confirm that I am not submitting a connector icon.

If you are an Independent Publisher, you must also attest to the following to ensure a smooth publishing process:

[ ] I have named this PR after the pattern of "Connector Name (Independent Publisher)" ex: HubSpot Marketing (Independent Publisher)
[ ] Within this PR markdown file, I have pasted screenshots that show: 3 unique operations (actions/triggers) working within a Flow. This can be in one flow or part of multiple flows. For each one of those flows, I have pasted in screenshots of the Flow succeeding.
[ ] Within this PR markdown file, I have pasted in a screenshot from the Test operations section within the Custom Connector UI.
[ ] If the connector uses OAuth, I have provided detailed steps on how to create an app in the readme.md.

Hello @bleul,
Could you please resolve review comments?

Hello @vmanoharas
Thanks for the corrections. I have updated the PR with all suggested changes.

repo: microsoft/PowerPlatformConnectors


text:
FancyZones - let window span multiple zones

TLDR:
use windows+arrows to position window into one tile, then hold shift (windows+shift+arrow) to let it span multiple tiles
Example:
Gnome gtiles has this solution, you can setup pretty small tiles and then let window take multiple or all of them. (But it lacks other features from FancyZones, so....)
https://extensions.gnome.org/extension/28/gtile/
My usage:
Sometimes I'd need 6 windows on my secondary screen, sometimes I'd like to have only two, or three, this would give me option to set what I need on the fly without thinking if I have any layout already set for this. It will be much distraction free option for everyday use.

Read the documentation https://docs.microsoft.com/en-us/windows/powertoys/fancyzones#snapping-a-window-to-two-or-more-zones

authors: enricogior lubomirfiala

repo: microsoft/PowerToys


text:
[Welcome to PowerToys]: Narrator focus does not navigate to ‘Microsoft Docs’ and ‘PowerToys in our release notes’ link.

Microsoft PowerToys version
"0.35.0"
Running as admin
Area(s) with issue?
Welcome / PowerToys Tour window
Steps to reproduce
Test Environment:
OS: Windows 10 Build 21354.1
App version: 0.35.0
App name: PowerToys
Screen Reader: Narrator
Tool: Accessibility Insight for Windows
Repro Steps

Launch 'PowerToys' application.
Turn on the 'Narrator'.
Application will get open with default list item 'General' selected.
Navigate to 'Welcome to PowerToys' link present at the right side of the pane and activate it.
'Welcome to PowerToys' window will get open.
Navigate using 'Tab' key.
Observe the issue.

User Impact: Priority-1
If any application does not expose information and mechanisms necessary to track focus, text insertion point, and selection attributes (e.g. whether text has been selected for copy/paste) of user interface components,  it would be difficult for the platforms that provide Accessibility APIs, and would in turn affect the screen reader dependent users to determine the focus.
MAS Reference:
https://microsoft.sharepoint.com/:w:/r/sites/accessibility/_layouts/15/Doc.aspx?sourcedoc={3C29FC92-CBCC-4A68-9FA6-0F159E3CFEA1}&file=MAS 4.2.10 – Tracking of Focus and Selection Attributes.docx&wdLOR=c15814F13-1B22-4FF5-A80E-802D46292C60&action=default&mobileredirect=true&cid=8d8a8173-bcfa-4764-b18e-ca7fd7332081
Note: Same issue repro with NVDA also.
MAS4.2.10_Welcome_narrator focus not navigating to links.zip
✔ Expected Behavior
Narrator focus should navigate to ‘Microsoft Docs’ and ‘PowerToys in our release notes’ link along with keyboard focus navigating via 'Tab' key.
❌ Actual Behavior
Narrator focus does not navigate to ‘Microsoft Docs’ and ‘PowerToys in our release notes’ link.
Only the keyboard focus navigates and narrator focus stays on 'Welcome to PowerToys' item and remain silent.
Other Software
No response

Fixed in #12470 and will be integrated in the next major release of PowerToys

Resolved with the release of v0.45.


text:
SVG thumbnail/icon preview in File Explorer

Microsoft PowerToys version
0.53.3
Running as admin

[X] Yes

Area(s) with issue?
SVG Thumbnail
Steps to reproduce
Install PowerToys
Enable SVG thumbnails (by default).
Reboot (as instructed)
No SVG thumbnails (i.e. preview of the svg image/icon in File explorer file area).
Just the associated svg-program icon.

✔ Expected Behavior
Instead of program icon I'm expect to see a thumbnail / miniature preview of the image / icon in the file explorer.
❌ Actual Behavior
I see all svg-documents showing the icon of the default program associated with svg-files.
Other Software
Inkspace 1.1.1
Internet Explorer

I now see this is a problem on files/folders that are synced using OneDrive
For local harddrive files/folders (not synced) this works fine.
All folders I work on are however synced...

Deleting files from a OneDrive synced folder and copying files from a local source (where the svg thumbnails preview correct) makes the svg thumbnail to preview correct, for a while. When I re-open the folder the thumbnail preview is gone, and I see the program Icon again as when I started.
Copying the same folder to a DropBox synced folder preserves the svg thumbnails preview.
So OneDrive sync seems to mess up SVG thumbnail preview.

After more investigation it seems it an option within OneDrive, "Files On Demand".
It appears as IT admins are recommended to enable it by policy... :-(
Disabling that option off will make the SVG thumbnails to preview as expected...

Duplicate of #12949

Issue is a duplicate
Thank you for your issue! We've linked your report against another issue to centralize the thread.
Thanks for helping us to make PowerToys a better piece of software.


text:
File compare tool to compare contents of files easily

Description of the new feature / enhancement
Compare the contents of a file and highlight its differences. Contents of one file can also be easily copied to the next file easily. The tool can select the file by holding Left Shift+ Windows Key+ Left Mouse Click on a file to select it as the left side file and doing that again on another file to select it as the right side file. Contents are then compared automatically and differences are highlighted. If two files are required to compare, maybe the compare tool can be initiated by selecting (highlighting) two files and then holding Left Shift + Windows key + Z to compare the files.
Scenario when this would be used?
I have hundreds of files with very minor differences in their names and each having rows and rows of data. It would be great if there is a built-in shortcut to compare two or more files and it will automatically highlight the differences. As a power user, this feature is necessary.
Supporting information
Some tools that I notice available online are Diffinity and BeyondCompare. They are just not well integrated with Windows 11 enough, no keyboard shortcuts are available to compare two files quickly.

Thanks for your message. This is a Duplicate of another issue: /dup #14950
(Somebody started with #17095, but that was closed recently...)


text:
Thumbnails on folders and files

Description of the new feature / enhancement
It used to be that folders and PNG files had thumbnails generated by Windows when you used Explorer or the standard file dialogs.  However, in recent builds of File Explorer, folders are just generic folders (which used to indicate the folder was empty) and PNG files are shown as a basic icon.
I'm hoping that can be added back in via PowerToys.
Scenario when this would be used?
When I'm in a folder containing images, photos, or videos, I tend to prefer the extra large icon size, but if only stock icons will be used, what's the point?
Supporting information
No response

What windows build are you on?
The dev channel currently has folder previews. File thumbnails should always work.
In the explorer options there is an option called "Always show icons, never thumbnails". Can you check if this option is off?
/needinfo

21H2 Build 22000.739  And yes, I already double checked that.

@WillPittenger Is this a question for PowerToys or for Windows / Explorer?
Have you tried the File preview function?

Well, I've been told it's something PowerToys can't fix.

I see what you mean. But if Aaron says it's on the way, I don't think we will be doing the same work.

folders with and without content

authors: Aaron-Junker Jay-o-Way WillPittenger


text:
Span displays shortcut for FancyZones

Description of the new feature / enhancement
A user-defined keyboard shortcut that toggles the "Span across monitors" checkbox.
Scenario when this would be used?
Application and zone layout switching. This would function well along with the other FancyZones shortcuts allowing the user to toggle the span monitors checkbox without having to open Power Toys / FancyZones to enable and disable the feature.
Supporting information
I believe my issue with FancyZones  "Span across monitors" is due to having different sizes of displays (PLP+1  32,55,32+16") When I leave the layout editor with span across enabled, the entire layout shrinks to about 75% and moves up and to the left away from the 16" screen.  Not checking the "Span across monitors" box solves the issue. Still, I like to combine the PLP monitors into one big display when working with extensive schedules, spreadsheets, and occasional other tasks. Having one big zone spanning them doesn't cause the same malfunction, but it is slightly cumbersome opening the program to switch back and forth. I do have some screenshots showing the difference between the zone locations in and out of the editor if anyone is interested. This is intended to be a feature request and not a troubleshooting post though, so they are available upon request.

I think, this is somehow related to https://github.com/microsoft/PowerToys/issues/6973, which asks for a better shortcut to span a concrete window across multiple zones? Win+Alt+Ctrl+Arrow key (which currently does not work on my side, too).


text:
PowerToys causes Buggy Keyboard behaviour in videogame(CSGO)

Microsoft PowerToys version
0.63.0
Installation method
GitHub
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
So I had PowerToys running in background I launched CSGO I had mapped Space-bar as a key to switch to primary weapon and Scroll Down to Jump and of course I've not touched Keyboard Manager to map those keys to something else. And when I do quick movements like jumping and picking primary weapons while moving left (complex combination of keys) the keystrokes get bugged out and my A key gets stuck (i.e game character constantly moving left) or D key gets stuck or even sometimes Spacebar becomes unresponsive. Please resolve this issue.
✔ Expected Behavior
No conflict within game
❌ Actual Behavior
Buggy behaviour of keys in-game.
Other Software
n/a

we do not recommend using KBM running with games.
https://learn.microsoft.com/en-us/windows/powertoys/keyboard-manager#will-this-work-on-video-games

Do you have any actual maps?  /reportbug


text:
Russian text is copied in transliteration

Microsoft PowerToys version
0.64.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
TextExtractor
Steps to reproduce
PowerToysReport_2022-11-20-21-33-38.zip
Uploading obs-2022-11-20 21-36-32.zip…
✔ Expected Behavior
Russian text in Cyrillic
❌ Actual Behavior
Russian text in transliteration
Other Software
No response

What does this mean? Can you please examplify with some screenshots?
/needinfo

What does this mean? Can you please examplify with some screenshots? /needinfo

updated video link in post

@Purpursarkans when you do a selection, is your input language Russian?
/needinfo

@Purpursarkans when you do a selection, is your input language Russian?

in English, and your comment gave me the idea to change it, and indeed, my default input is in English, not Russian (it’s more convenient (the system language is Russian)) and when I change the input language to Russian - the Russian text reads great, but I still think that this is a bug, becouse I need to change the layout for the correct display of the language, because English on the Russian layout is read correctly (not transliteration)

/dup #20327
The solution here would be allowing the language switch, so I'm associating this issue with that one.


text:
Wrong icons for buttons in Registry Preview

Microsoft PowerToys version
0.69.0
Installation method
GitHub
Running as admin
None
Area(s) with issue?
Registry Preview
Steps to reproduce
In the Simplified Chinese environment, most icons are garbled characters.

✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

cc: @randyrants

This one is interesting and likely why toolbars used images for 100 years instead of relying on built-in fonts (as the current incarnation of the commandbar tells you to.)
I'll have to see what happened with this and figure out a path forward.

Quick ask on this, as there are several ways to assign an icon to the button, and I'm trying to avoid creating images for each of the buttons.  I found this, in the blurb about "SymbolIcon" in the API docs:

The SymbolIcon uses the font family defined by the SymbolThemeFontFamily theme resource. By default, Windows uses the Segoe Fluent Icon font family. If your app is run on Windows 10, version 20H2 or earlier, the Segoe Fluent Icon font family is not available and the SymbolThemeFontFamily resource falls back to the Segoe MDL2 Asset font family instead.

Based off the screenshot, I'm assuming you're in Windows 11, but can you confirm that "Segoe Fluent Icon" is a font installed to your system?  It will take some time for me to find a machine or get a VM-capable box running with Simplified Chinese; I have one or two devices running in other languages somewhere, but I wanted to check your device first.

@randyrants The system in the screenshot of the original post is Win 10 22H2. I just installed PowerToys in Win 11 22H2 in the virtual machine, and the language is also zh-Hans, but its icon magically displays correctly.

I took a look, the font "Segoe MDL2 Assets" exists in both systems, but the version is different: 1.79 in Win 10, and 1.86 in Win 11.
Since the first icon in the command bar is displayed as "钅黄" in my Win 10, the codepoint of this character is U+E1A5. I checked the font "Segoe MDL2 Assets" in the two systems with font editing software, there are indeed an icon with a similar meaning on this codepoint, but both different from the one in the screenshot of Win 11 (the icon in Win 11 is obviously more rounded).

So, are you sure the target font for software GUI rendering is "Segoe MDL2 Assets"? Could it be another font?

@randyrants The system in the screenshot of the original post is Win 10 22H2. I just installed PowerToys in Win 11 22H2 in the virtual machine, and the language is also zh-Hans, but its icon magically displays correctly.

I took a look, the font "Segoe MDL2 Assets" exists in both systems, the font "Segoe Fluent Icons" only exists in Win 11.
Then there are two things involved here:

My Win 10 is 22H2, but "Segoe Fluent Icons" still does not exist, which means that the document may not be accurate.
Although "Segoe MDL2 Assets" exists in Win 10, but the software's GUI doesn't fallback to it correctly. (From the screenshot of the original post, we can see that the penultimate icon is displayed correctly. This proves that the primary font "Segoe Fluent Icons" is not fallback to "Segoe MDL2 Assets" directly, there are other fonts between them.)

I think I have it.  I switched how the icon was being selected and told it to use the StaticResource SymbolThemeFontFamily which should handle the fallback better.  If it doesn't, I'll pull someone into the conversation to see what the options are, like locking it to the Windows 10 font, rather than 11.

I am using Windows 10 and have no problems. Usung the static resource soud good to me and I think that should fix it.

I am using Windows 10 and have no problems. Usung the static resource soud good to me and I think that should fix it.

I agree it should, but the fallback behavior with zh-Hans hasn't, well, fallen back as it should.  On Win11, it should use Segoe Fluent Icons, but on Win10 it should look for Segou MDL2 Assets, and if Windows 8 was supported, it should look for Segoe UI Symbol.  For LIXiangChen, Windows 10 with Simplified Chinese, the original code picked up an unexpected font for the icon, which is the oddity.  My hope is that by calling out the StaticResource explicitly, it will behave better.
WinUI3 just has some odd behavior at times.  Normally, I would think I've missed something but the last few days, have the stuff I'm debugging ends up being broken for everyone, which leave me confused!

This issue is well familiar to me. The icons are defined with their names, like Icon="Save" but for some reason the actual icon code points connected to those names (the SymbolIcons in Win SDK) are all in the range of E1**. Range E1** - E5** has been deprecated for years now. Right, @niels9001 and @crutkas ?

See also https://github.com/microsoft/microsoft-ui-xaml/issues/8375

@randyrants the changes in your open pr circumvent this by specifically setting the icons with valid code points 👍🏻

Related: https://github.com/microsoft/microsoft-ui-xaml/issues/8375

@niels9001 that's what I said 😝. I made https://github.com/MicrosoftDocs/winrt-api/issues/2363 to specifically focus on the Docs page.

There's another one with the same issue in Flyout, which uses xE130. It looks like this:

Yes, I'm aware of that one, @niels9001 is too.

The content to the right of the number is also wrong.

@1332186865 That one is on Microsoft, see issue linked above.

Can we please limi discussion on the original reported bug.

Who is working here on fixing what and is the fix for the initial report merged? I am a bit confused as this issues moved somehow away from the initial bug report.

@htcfreek If no one is picking this up I'm happy to help with this as I'm working on a UI related PR for Registry Preview anyway 👍

Yes
I'm working on ui-xaml, the core for many of these issues still.

https://github.com/microsoft/PowerToys/issues/25284#issuecomment-1501110036

authors: 1332186865 Jay-o-Way LIXiangChen PixelMonkeyPro hidacow htcfreek niels9001 randyrants


text:
Replace complete original string in PowerRename

Description of the new feature / enhancement
Option to NOT find and replace matching string but rather replace the whole original file/folder name.
Scenario when this would be used?
Camera footage applies its own naming which looks something like "DJI_0129", "DJI_0130", etc. I need to be able to replace everything including the numbering the camera applies to apply my own numbering scheme.
In the example below you can see that I'm only able to replace the first part of the original file name and I'm stuck with the extra numbers at the end.

Supporting information
No response

@Samuel-Murray-Metservice
If you enable "Use regular expresion" and search for .* it should do what you want. /helped

authors: Samuel-Murray-Metservice htcfreek


text:
Failed to copy to clipboard

Microsoft PowerToys version
0.80.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
PowerToys Run
Steps to reproduce
Results calculated in the PowerToys Run cannot be copied to the clipboard.
OS: Windows 11 23H2(22631.3593)

PowerToysReport_2024-05-20-13-34-11.zip
✔ Expected Behavior
Can be successfully copied to clipboard
❌ Actual Behavior
Cannot be copied to the clipboard
Other Software
No response

I have the same issue.
Can't upload a bug report - feature doesn't work.
Running as admin - English.
This has been happening for over a year now.

+1一样的问题还未解决

+1一样的问题还未解决

查下后台开了什么进程占用了剪贴板，我之前是比特彗星占用了剪贴板后报错的

这个怎么看是那些进程占用了发自我的 iPhone在 2024年7月17日，18:41，Eric @.***> 写道：
Closed #32917 as completed.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

这个怎么看是那些进程占用了

看看后台运行的应用有没有“监控剪贴板”之类的选项，有的话关掉试试，我之前是凭直觉😂

1、试了一下，我开了截图工具和鼠标滑动工具，关掉是有用
2、但是我把PowerToys Run 在打开还是会提示报错  需要再开前面两个软件暂用进程关掉才行。
3、即使报错了计算器计算的结果还是能复制上的
只能解决一时情况

authors: EricSUID Landy-hub shoham-elad


text:
(Feature suggestion) Make an option to hide the tray icon

It would be much better if there was an option to hide the tray icon

Hi @Neykiratick
the tracker for this feature is https://github.com/microsoft/PowerToys/issues/765
Closing this as duplicate.
Thanks.

authors: Neykiratick enricogior


text:
PTRun got an error

ℹ Computer information

Windows build number: [run "winver"]
Version 10.0.18363.959

PowerToys version:
Probably current... - it displays toast about ability to update, I select "on next launch", and Windows Installer starts.

PowerToy module:

📝 Provide detailed reproduction steps (if any)

…
…
…

✔ Expected result
What is the expected result of the above steps?
❌ Actual result
What is the actual result of the above steps?
📷 Screenshots
Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
Please open new issue in: https://github.com/microsoft/PowerToys/issues

upload log file: C:\Users\pkar\AppData\Local\Microsoft\PowerToys\PowerToys Run\Logs\1.0.0\2020-08-09.txt
copy below exception message

Version: 1.0.0
OS Version: Microsoft Windows NT 10.0.18363.0
IntPtr Length: 8
x64: True
Date: 08/09/2020 16:00:36
Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Timer'.
at System.Timers.Timer.set_Enabled(Boolean value)
at System.Timers.Timer.Start()
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.UIElement.UpdateIsVisibleCache()
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSource
Window(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2020-08-09.txt

@pkar70
please update to 0.20.1 https://github.com/microsoft/PowerToys/releases/tag/v0.20.1
Duplicate of #5400


text:
Multi monitor support

It will be great if fancy zones support multi monitor setups.

@ukidabek
it already does, please read the wiki for FZ https://github.com/microsoft/PowerToys/wiki/FancyZones-Overview
We are improving the UI to make it simpler to discover the functionality https://github.com/microsoft/PowerToys/pull/6562

#6435 is our tracking issue.

authors: crutkas enricogior ukidabek


text:
Unable to install PowerToys

ℹ Computer information

PowerToys version:
PowerToy Utility:
Running PowerToys as Admin:
Windows build number: [run "winver"]

📝 Provide detailed reproduction steps (if any)
Always the same error message:
"Power Toys (Preview). Setup Wizard ended prematurely because of an error. Your System has not been modified. Install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard."
Win 10 Pro
Ver.: 20H2
Installiert am 04.10.2020
Build: 19042.685
Leistung WinFeature Expeience Pack 120.2212.5510
Gerät: Microsoft Surface mit Core i7,
16 GB
64-Bit-Betriebssystem, x64 basierter Prozessor.

Tried several times to install PowerToys.
Always the same error message:
"Power Toys (Preview). Setup Wizard ended prematurely because of an error. Your System has not been modified. Install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard."
Win 10 Pro
Ver.: 20H2
Installiert am 04.10.2020
Build: 19042.685
Leistung WinFeature Expeience Pack 120.2212.5510
Gerät: Microsoft Surface mit Core i7,
16 GB
64-Bit-Betriebssystem, x64 basierter Prozessor.
What can I do?
Thanks for your comments

@hgm99 I'm assuming you are trying to install the latest version of PowerToys (0.27.1)?

yes

@HGM99 Can you give a screenshot?

Hi @HGM99
Can you try to install PowerToys with the following command in order to get an error log?
PowerToysSetup-0.27.1-x64.exe --log_level error
You should find an error in the file powertoys-bootstrapper-msi-0.27.1.log.

The error message ist the same.
This is the error file log>:
=== Logging started: 27.12.2020  12:45:11 ===
That's all....
powertoys-bootstrapper-msi-0.27.1.log

Mmmm.. Can you try to run with debug? Is the error changed?
PowerToysSetup-0.27.1-x64.exe --log_level debug

Hi @davidegiacometti
System Answer:

"Diese App kann auf dem Gerät nicht ausgeführt werden"
"Access denied"

Is the command prompt running as admin?

yes, I am tha admin

@enricogior have you looked at this?

@enricogior have you looked at this?

@crutkas
this seems a problem with the Windows install service not with the PowerToys installer.

@crutkas
this seems a problem with the Windows install service not with the PowerToys installer.

@HGM99
are you still having problems installing PowerToys?
In case try the Microsoft troubleshooter https://download.microsoft.com/download/7/E/9/7E9188C0-2511-4B01-8B4E-0A641EC2F600/MicrosoftProgram_Install_and_Uninstall.meta.diagcab
And then try installing the latest version
https://github.com/microsoft/PowerToys/releases/download/v0.31.2/PowerToysSetup-0.31.2-x64.exe

...thie worked.
PowerToys are installed.
Thanks for your support!
Georg

installing problem anyone help please

Hi @sajjad4499
Are you using a device with an ARM processor?
Can you try the x64 version (https://github.com/microsoft/PowerToys/releases/download/v0.62.0/PowerToysSetup-0.62.0-x64.exe) or install PowerToys from the store?

Hi @sajjad4499 Are you using a device with an ARM processor? Can you try the x64 version (https://github.com/microsoft/PowerToys/releases/download/v0.62.0/PowerToysSetup-0.62.0-x64.exe) or install PowerToys from the store?

think you very much for help that works thinks a lot


text:
[FancyZones] Revisit mutexes

Summary of the Pull Request
What is this about:
Summarizing changes:

Removed mutexes
Refactored FancyZones
Removed IZoneWindowHost
Renamed ZoneWindow -> WorkArea

What is include in the PR:
How does someone test / validate:
Quality Checklist

[x] Linked issue: #11892
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

Looks good. Tested manually basic FZ functionalities including VDs

authors: SeraphimaZ stefansjfw


text:
[Shortcut Guide] UI tweaks

Summary of the Pull Request
Some minor UI tweaks to improve Shortcut Guide:

Rounded corners(#6927), using Fluent Icons and slightly smaller text and re-arranged the multi-key shortcuts for improved readability.

Added 'Open Emoji panel' and 'Open clipboard history'.

Background color of the desktop is now using accent color, resolving: #14214

Updated the running application tooltips: rounded corners and resolving #14212

Fixed casing for "Xbox Game Bar" resolving: #6884

OLD

NEW (LIGHT)

NEW (DARK)

Quality Checklist

[X] Linked issue: #6884, #14212, #14214, #6927
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

/azp run

One small detail Win+. and Win+; are identical, based on keyboard layout. For EN, . should be standard.

how do we edit this file?  Holistically this bothers me how hardcoded this is e2e

how do we edit this file?  Holistically this bothers me how hardcoded this is e2e

Yeah, it's not great at all. The text labels are converted into SVG paths so any edits to be made requires redrawing them in a (design) tool.
Would be nice to generate these based on a config file... better yet, move away from .SVG and move to WPF/WinUI. Just a top-most window :-)?

how do we edit this file?  Holistically this bothers me how hardcoded this is e2e

Yeah, it's not great at all. The text labels are converted into SVG paths so any edits to be made requires redrawing them in a (design) tool.
Would be nice to generate these based on a config file... better yet, move away from .SVG and move to WPF/WinUI. Just a top-most window :-)?

Yes, this is still an artifact of the initial implementation based on win32 Direct2D.

authors: Jay-o-Way crutkas jaimecbernardo niels9001


text:
Fix registration of PowerRename to work with OneDrive placeholders

This change adds a ContextMenuOptIn registry name which is required for shell context menu extensions to appear on the context menu for OneDrive placeholders.
See https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-default_folder_menu_restrictions.
Applies to https://github.com/microsoft/PowerToys/issues/708

I went ahead and merge it to avoid having to rebase it again.

Nice fix!

authors: chrdavis enricogior wangfu91


text:
Allow non-CoreApplication based apps to be a share target

Proposal: Allow non-CoreApplication based apps to be a share target
Today any app including HWND apps can host the share charm. However, till now only apps with a CoreWindow can be a target because the dialog doesn't support displaying other windows even if the app is packaged.

Summary

Although you could create a new UWP project and use it as the target, for developers who are using third-party frameworks this is not simply feasible. Take the new Skype for example. It's packaged but it now lost the share charm support which is really necessary for a modern OS. Even on Android, Skype supports as a share target but not on your own platform anymore. This is not a good experience.
Rationale

More apps can become a share target
Sharing will be much better in Windows

Scope

Capability
Priority

This proposal will allow classic HWND developers to make their apps a share target
Must

This proposal will allow end users to share content directly to more apps
Should

This looks like something that could be added to @andreww-msft 's existing proposals of expanding the kinds of activations that apps support.  Share-target is an activation.

Yes, ShareTarget is on our list of activation kinds to support in a later version of AppLifecycle. https://github.com/microsoft/ProjectReunion/issues/111

authors: Jaiganeshkumaran andreww-msft jonwis

repo: microsoft/ProjectReunion


text:
Project : CustomChatBots

Project Name
CustomChatBots
Description
We developed different pipelines to try out both simple and advanced RAG methods. The simple pipeline uses Grok-LLama3, Hugging Face’s embedding model, and ChromaDB for storing vectors. The advanced pipeline includes newer RAG techniques like multi-query retrievers and parent-child chunking, and it uses Neo4j and Azure OpenAI.
Our main focus was to make RAG easy to use and easy to work with. We wanted to move RAG from Colab Notebooks to a production environment. So we designed a client-server architecture so it can be used as a product by real users. Just like Langchain connects different parts, we provide a ready-made setup and frontend components to create RAG-based chatbots that you can easily add to your websites. Our backend is also flexible, allowing you to update and replace different components easily.
Summary :
Using CustomChatBots, users can effortlessly create chatbots that follow custom instructions and utilize their custom data as a knowledgebase. Updating the data and instructions is simple and can be done anytime with just a few clicks. After creating a chatbot, user receive a public URL that they can integrate into their own user interfaces. Alternatively, they can also use our ready-made React components in their projects easily.
The more detail about the project description and the motivation, and how it work can be in readme.md of github repository.

Details: CustomChatBot
Detail Screenshots are given to demonstrate how easily chatbots can be created, and instructions and data can be kept up to data with simple clicks

Technology & Languages

[X] JavaScript
[ ] Java
[ ] .NET
[X] Python
[ ] AI Studio
[ ] AI Search
[ ] PostgreSQL
[ ] Cosmos DB
[ ] Azure SQL

Project Repository URL
https://github.com/tareeb/CustomChatBot-backend
Deployed Endpoint URL
No response
Project Video
https://youtu.be/c2GdtBP1FmI
Team Members
@hasnatahmed331

Hello @tareeb, @hasnatahmed331, thank you for participating in RAG Hack!
The team is working hard to distribute badges. Please have each team member fill out this form:
aka.ms/raghack/badge-dist
Thank you!

authors: multispark tareeb


text:
[.NET] Dutch NumbersWithUnits Temperature spec review

Added support for 2 previously skipped test cases. One Input was changed, to make it consistent with the English Input:  "convert 200 celsius celsius into fahrenheit", in Dutch: "converteer 200 graden Celsius celsius naar Fahrenheit"

@LionbridgeCS @LionbridgeCSII

authors: LionbridgeCS tellarin

repo: microsoft/Recognizers-Text


text:
possible to use semi-learn package on CPU-only device?

Hi
I would like to use your Python package semi-learn but I am running into a GPU-related problem. Since my computer has no GPU, even very simple scripts (like the "Beginner example notebook") return a GPU/cuda- related error. I was wondering if there is a possible way  to work around this and so be able to use your package also on a CPU-only device?
Thanks in advance!

you need cuda

authors: eliduval mhmdghazal

repo: microsoft/Semi-supervised-learning


text:
docs: Move Geospatial Services to its own folder

moved the geospatial jupyter notebooks to its own folder
regen docs website to reflect the change.

/azp run

Codecov Report

Merging #1345 (b4b5fd8) into master (79d92d3) will decrease coverage by 84.26%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #1345       +/-   ##
==========================================
- Coverage   84.86%   0.60%   -84.27%
==========================================
  Files         287     258       -29
  Lines       14231   12970     -1261
  Branches      732     732
==========================================
- Hits        12077      78    -11999
- Misses       2154   12892    +10738

Impacted Files
Coverage Δ

...m/src/main/scala/com/microsoft/lightgbm/SWIG.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ain/scala/org/apache/spark/ml/param/MapParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/scala/org/apache/spark/ml/param/UDPyFParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...cala/org/apache/spark/ml/NamespaceInjections.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...cala/org/apache/spark/ml/param/DataTypeParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ala/org/apache/spark/ml/param/ByteArrayParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ala/org/apache/spark/ml/param/EvaluatorParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...la/org/apache/spark/ml/param/ParamSpaceParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...la/org/apache/spark/ml/param/TypedArrayParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...a/com/microsoft/azure/synapse/ml/stages/udfs.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 270 more

Continue to review full report at Codecov.

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

/azp run

/azp run

repo: microsoft/SynapseML


text:
Binary size improvements related to #115

See issue #115 for more discussion.
The key idea here is to use the SNMALLOC_SLOW_PATH macro, which is a cross-plaform noinline macro, on functions which construct, copy, and destroy long-lived pass, pattern, and WF objects.
These functions are only called on start-up, so they should have minimal performance impact.
By default, they are inlined into Trieste pass defs and such.
Some of their contents is rather bulky, like red-black tree copy routines, big reference count updates (including dynamic checks for whether glibc is multi- or single- threaded), and array resizing code.
Making these lifecycle functions explicit using = default and marking them with SNMALLOC_SLOW_PATH, alongside some other operators that might possible cause similar problems, saves 15-27% on code size for executables using Trieste.

It would probably be nice to define a TRIESTE_SLOW_PATH macro, rather than import the snmalloc one (even if it's just #define TRIESTE_SLOW_PATH SNMALLOC_SLOW_PATH)

@davidchisnall  I saw a lot of SNMALLOC_SLOW_PATH and SNMALLOC_FAST_PATH in the codebase already, so the second commit adding that would get somewhat bigger.
That said, I would be fine doing that. It's just a search-replace.

@mjp41 all done I think

authors: davidchisnall fhackett

repo: microsoft/Trieste


text:
Can not infer not null / undefined when use enum as the optional key

TypeScript Version:  3.4.0-dev.201xxxxx

Search Terms:
enum as key
Code
enum A {
  a,
  b,
  c
}

type b = A.a|A.b

const a: {
  [key in A]?: {
    [key in A]?: string
  }
} = {
  [A.a]: {
    [A.a]: "a"
  }
}

function t() {
  // below line will have error on a[A.a][A.a] for possibly `undefined` when enabled `strictNullChecks`
  if (a[A.a] && a[A.a][A.a]) {
    return a[A.a][A.a];
    }
    return
}

Expected behavior:
no err when enable strictNullChecks, as the undefined should be ruled out after first a[A.a] check.
Actual behavior:
Object is possibly 'undefined'. for a[A.a][A.a]
Playground Link: https://www.typescriptlang.org/play/#src=enum A {
  a%2C
  b%2C
  c
}

type b %3D A.a|A.b

const a%3A {
  [key in A]%3F%3A {
    [key in A]%3F%3A string
  }
} %3D {
  [A.a]%3A {
    [A.a]%3A "a"
  }
}

function t() {
  if (a[A.a] %26%26 a[A.a][A.a]) {
    return a[A.a][A.a]%3B
    }
    return
}

Duplicate #28081

The fix for #28081, namely #31478, did not address enum keys; should this be reopened or should a new issue be filed?

authors: RyanCavanaugh jcalz taoalpha

repo: microsoft/TypeScript


text:
extended type to never not saved

This is related to https://github.com/DefinitelyTyped/DefinitelyTyped/issues/36661
It appears that when a K = keyof T where T is unknown, K is never. However when trying to use that fact in a conditional type it fails. Here's an example (The last two lines are where the bug is highlighted):
declare function spyOn<T, K extends keyof T>(
    object: Record<K, Function>,
    method: keyof T extends never ? string : K,
): void;

declare function spyOn2<T, K extends keyof T>(
    object: Record<K, Function>,
    method: K extends never ? string : K,
): void;

class MyClass {
    myMethod() {}
    propShouldError = 123
}

spyOn(new MyClass, 'myMethod') // OK
spyOn2(new MyClass, 'myMethod') // OK

spyOn(new MyClass, 'propShouldError') // ERROR
spyOn2(new MyClass, 'propShouldError') // ERROR

spyOn(new MyClass, 'notExistingShouldError') // ERROR
spyOn2(new MyClass, 'notExistingShouldError') // ERROR

declare let a: any

spyOn(a, 'thisShouldWork') // OK
spyOn2(a, 'thisShouldAlsoWorkButDoesnt') // ERROR

https://www.typescriptlang.org/play/#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwGcAHATwHlUAeAFQBp4BpeEADwxFWAPgGsQScieNQB8ACgBQ8afBwAjAFbgMALngAlcDhjBKDegDE0mXKhG0pMgLYgMACxzA1fAUOrM2HLvFQgAbiAw8AD8hBgwWKgA5vBq+hIAlGp+OFjAANwSEqCQsAgo6Nh4hKQUAEw09Eys7JzcLoLC4pbS8kqYappg2rr68EaFpuYt8Db2jnEetd6+AUGhBOGRMXEWSfApaZkSuQTcALIkAMLQe-AA3iNWJPu2DsBiCRcAviNEMDhEAMoOyBDAAFEYB8ggBeeAARjKAGYJK8JMRyKgxL4AO7wQ4nKB7egAcmut3GwFxTwA9KT4GQGAjSqgyiiQOjMacCHiCXdHCT4OTKdSaUiGUzjiy8e9Pj8cH9AcDtFyeQD1OoyOp+eVBRjhdjWfBcWLvr9-kCQXKKQqlSrVci0RqsTidagcBgASwsItlhKpUbZWTTYrlZb6dbmVq8Q6nS63dEPYaZTATfAzf7suBoHB4BBbPAoGooKgSFlERQxFA8fZXdHgAB1bQ8eNUgPF0t2csG4AAQQgBBw1ZgPAAQsgMAARHAgAioDDxxMqoA

I'm pretty sure this is the work of distributive conditional types.  If K is never then distributing over it always produces never (it's treated as an empty union), so your K extends never check isn't doing what you think it is.
https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
Distribution is generally useful and is therefore the default behavior, but can be disabled on a per-type basis.  The following disables the distributive behavior and makes the last line in your example work:
declare function spyOn2<T, K extends keyof T>(
    object: Record<K, Function>,
    method: [K] extends [never] ? string : K,
): void;

Distribution only happens over a "naked type parameter".  Give it some clothes to turn that off. :)

authors: fatcerberus kolodny


text:
Make const assertions smarter 🧠

Search Terms

const assertions
as const
object.keys
exact types

Suggestion

Const assertions are really useful in many different scenarios! However, the types are not always recognized properly when using some standard Javascript operations. Which should be possible for const assertions.
Use Cases

Everywhere where final Javascript objects are used. For example in config objects or mapping objects.
Examples

const counterHoiPolloi = {
  jeffB: {
    vision: "Squeeze the shit out of people!",
    trustScore: 97,
  },
  markZ: {
    vision: "How could I even track their winks?",
    trustScore: 43,
  },
  billG: {
    vision:
      "Viruses are my expertise! First digitally, now biologically and next mentally.",
    trustScore: -32,
  },
  donaldT: {
    vision:
      "I am the best! I didn't tamper my trust score! I invented trust scores!",
    trustScore: 9999,
  },
} as const;

const test1 = Object.values(counterHoiPolloi);
// ✅ smart => const test1: ({ readonly vision: "..."; readonly trustScore: 97; } | { ...; })[]
const test2 = test1[0];
// ✅ smart => const test2: ({ readonly vision: "..."; readonly trustScore: 97; } | { ...; })
const test3 = test2.trustScore;
// ✅ smart => const test2: 97 | 43 | -32 | 9999
type test4 = typeof test2.trustScore;
// ✅ smart => type test3 = 97 | 43 | -32 | 9999
const test5 = Object.keys(counterHoiPolloi);
// ⛔ not smart => const test5: string[]
// expected result => const test5: "jeffB" | "markZ" | "billG" | "donaldT"
const test6 = test1[5];
// ⛔ not smart => const test2: ({ readonly vision: "..."; readonly trustScore: 97; } | { ...; })
// expected result => const test6: undefined
const test7 = [97, 43, -32, 9999].includes(test2.trustScore);
// ⛔ not smart => const test7: boolean
// expected result => const test7: true
const test8 = test1.find(chp => chp.vision === "How could I even track their winks?").trustScore;
// ⛔ not smart => Error: Object is possibly 'undefined'
// expected result => const test8: 43
const test9 = test1.find(chp => chp.vision === "How could I even track their winks?")?.trustScore;
// ⛔ not smart => const test9: 97 | 43 | -32 | 9999 | undefined
// expected result => const test9: 43
const test10 = counterHoiPolloi.hasOwnProperty("steveJ");
// ⛔ not smart => const test10: boolean
// expected result => Uncaught OutOfThisWorldError: "steveJ" no longer dwells among the "counterHoiPolloi".
// real expected result => const test10: false

// and so on...

There are no implications. All example data are purely random.
Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[X] This feature would agree with the rest of TypeScript's Design Goals.

This is like ten different language change proposals in one, many of which are questionable (do we really need to special-case include to return compile-time true/false values? Why?), wrong (Object.keys should not return (keyof T)[]; see StackOverflow or dozens of duplicates), or flatly undesirable (why should hasOwnProperty be only legal on things you already know to exist?). Please take these up individually after researching what's already been posted about them.

authors: RyanCavanaugh mamiu


text:
typescript generic break filter after spreading object in map

TypeScript Version:  any, including 4.0.2 and v4.1.0-dev.20201008

Search Terms: typescript generic break filter after spreading object in map? O_o
Code
interface Success {
    isSuccess: true;
}

interface Fail {
    isSuccess: false;
}

type Item =
    | Success
    | Fail

// ok
function foo(a: Array<Item>): void {
    a
        .map((item) => ({...item}))
        .filter((value) => {
            console.log(value);
        });
}

// error
function bar<T extends any>(a: Array<Item>): void {
    a
        .map((item) => ({...item}))
        .filter((value) => {
            console.log(value);
        });
}

Expected behavior:
adding generic to function does not break the code
Actual behavior:
.filter((value) => { after .map((item) => ({...item})) when it inside function with generic trigger error.
Playground Link: https://www.typescriptlang.org/play?ts=4.0.2#code/JYOwLgpgTgZghgYwgAgMoFcFIM7eQbwChkTlhsMsJcAuZMKdCAbkIF9DDRJZEUAxOMAA2BYqXKUc2OvGHYW7TmACeABxQBJSAFtkAXnEkAPmkzSjyU4JGcA9HeQB7ANaEY6EAjDAnIZDBOTgAUcHQAglBQcCoAPNoQOgB8AJR0AG5OwAAmYqTIcJb5AHQ6cGrBwcC6KQZJyMH4xc3ViWwpKUWkxTAiPJXpcMJMtfr1RPmTpAh+2E7CEMXCTgDmwYPDECnMyA7IG0x0CTpdJO2sHIR70FBOUO6e3r7+AEZwULEAKsgQAB6QIGyeDgIBUSVCESiMXiulSGSyuQmpEKUxIpXKlVaOlG9UazWKWPanVRyB6fWgAyGIzqeRJ01m80WyzWBy2Oz2AH4OadkOclEA

This behavior goes back at least to 3.3 😦

authors: andrewbranch dartess


text:
Module augmentation: TypeScript overrides declarations instead of merging them

TypeScript Version:  4.1.0-dev.20201031

Search Terms: "declare module", "module augmentation"
Code
codesandbox
Expected behavior: TypeScript should merge two separate declarations of the ParsedPath interface.
Actual behavior: TypeScript overrides the declaration of the ParsedPath interface. This behavior can be fixed by uncommenting the line export type Foo = ""; in types.ts file.
Playground Link:  codesandbox
Related Issues:

I'm not too sure about the internal details, but you see this behavior because types.ts is not a module. You can only augment modules within modules or declaration files. Once you add an import or export statement it's a module. Alternatively you can make types.ts a decaration file by renaming it to types.d.ts.

Thanks for the explanation!


text:
Generated lib*.d.ts files differ from the files in TypeScript SDK

TypeScript Version:  at least 3.9.7 and 4.0.5
The lib/lib*.d.ts and built/local/lib*.d.ts files contain mixed line breaks (LF/CRLF) and differ from the files in the TypeScript SDK, which contain only LF.
Steps to reproduce
Build LKG or local on any operating system.
git clone --config core.autocrlf=input https://github.com/microsoft/TypeScript.git
cd TypeScript
npm ci
gulp LKG

Expected behavior:
Consistent line breaks in lib*.d.ts files and no differences from the TypeScript SDK.
Actual behavior:
Mixed line breaks.

Post #51387, this one is definitely fixed as the problem here was the way we combined things with gulp (among other things). In the new build, the entirely of built and lib now consistently use LF line endings.

@jakebailey, I've tested TypeScript 5.1.6 and can confirm that the problem is fixed. Thank you!

authors: deniskovalchuk jakebailey


text:
styled-components broken by #41841

Found by overnight DT run for #41841
Here's a standalone repro; it's not minimal but it doesn't depend on anything else.
interface FunctionComponent<P = {}> {
    defaultProps?: Partial<P>;
}
type ComponentType<P = {}> = FunctionComponent<P>;
export type KProps<C extends string | ComponentType<any>> =
    object extends object ? Omit<C, any> & Partial<C> : never;
export interface StyledK<C extends string | ComponentType<any>> {
    (props: KProps<C>): never
}
type Constraint<T extends ComponentType> = T ;
export type StyledComponentInnerComponent<C> = C extends StyledK<infer I> ? I : C;
export type SProblem<C extends ComponentType<any>> = C extends StyledK<any> ? Constraint<StyledComponentInnerComponent<C>> : number;

Expected behavior:
No error, as in 4.1.
Actual behavior:
Error in SProblem on Constraint<StyledComponentInnerComponent<C>>:
error TS2344: Type 'StyledComponentInnerComponent<C>' does not satisfy the constraint 'ComponentType<{}>'.
  Type 'string | ComponentType<any> | C' is not assignable to type 'FunctionComponent<{}>'.
    Type 'string' has no properties in common with type 'FunctionComponent<{}>'.
      Type 'string | ComponentType<any>' is not assignable to type 'FunctionComponent<{}>'.
        Type 'string' has no properties in common with type 'FunctionComponent<{}>'.

Here's a smaller repo. I think it better illustrates the problem:
interface StyledK<C extends string> {
    (props: {}): never
}
type Constraint<T extends { p }> = T ;
type Inner<C> = C extends StyledK<infer I> ? I : C;
export type SProblem<C extends { p }> = C extends StyledK<any> ? Constraint<Inner<C>> : number;

I guess before the string constraint on C from the outer C extends StyledK<any> ? ... got dropped? It kind of looks like this new error is correct.

I guess before the string constraint on C from the outer C extends StyledK ? ... got dropped? It kind of looks like this new error is correct.

Yes, that was the problem with not preserving substitution types in conditional types--constraints implied by outer conditional types were dropped. They're now preserved, which in this case reveals an error. If C is a StyledK<any> then Inner<C> is constrained to string | C, and string is not assignable to { p: any }.
BTW, I have no earthly idea what these types are supposed to be doing!

Presumably they made sense in situ. The standalone repro chops them up pretty badly. I'll go back to the original and try to figure out a workaround.
(There are nearby comments in the original along the lines of "I'm quitting now before my head starts hurting again." So.)

Later: It seems like the string constraint was a low-fi keyof JSX.IntrinsicElements substitute, because switching to that now compiles successfully. I'm afraid that it's going to be a lot slower though.
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50046

authors: ahejlsberg sandersn


text:
tsconfig  exclude doesn't work for index.d.ts in node_modules

Bug Report

🔎 Search Terms

🕗 Version & Regression Information

This is a crash
This changed between versions ______ and _______
This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code
💻 Code

// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.

🙁 Actual behavior
tsconfig.json :
{
"exclude": ["app/module/**/*.d.ts"]
}
file direcotry:
-app
-module
-moduleA
-node_modules
-someModule
index.d.ts
test.d.ts
test.d.ts is excluded
but index.d.ts is checked
🙂 Expected behavior
index.d.ts is also excluded
no typechecking on index.d.ts

exclude is not a mechanism that prevents a file from being included in the codebase - it simply changes what the include setting finds.
types can be used to restrict the ambient declarations present in your node_modules. However, if you import code that references those global declarations, they will still be loaded.
skipLibCheck can be used to avoid checking library code.

exclude will not prevent the inclusion of something that gets imported/referenced. node_modules is in the default value of exclude, so this config has no effect.

You can use --explainFiles to show why each file is getting included.

authors: 412799755 andrewbranch ilogico


text:
as tuple type assertion modifier

Suggestion
🔍 Search Terms
tuple casting assertion as modifier
✅ Viability Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
I'm requesting to add an as tuple type assertion, similar to as const. I'm not sure about the syntax yet, since tuple isn't a reserved word and could break existing code, so I'm hoping someone has a better idea for naming. Additionally, we could add a property to tsconfig to allow as tuple assertions instead of enabling it by default.
as const doesn't work because that specifies too many declarations, makes arrays readonly, and locks the types of literal elements such as 23.
📃 Motivating Example
Sometimes I store several variables in an array, but TypeScript infers an array type whereas I want a tuple type. To fix this, we could use the as tuple modifier.
let mousePosition = [23, 56];
// The type here is `number[]`, not a tuple.

let mousePosition: [number, number] = [23, 56];
// Now we have the correct type, but too much code.

let mousePosition = [23, 56] as tuple;
// Beautiful!

Another example might be storing user data in an array because you don't want to use an object. In these cases, as tuple syntax could save time spent writing complex type declarations.
let user = ["Steve", 45, "test@example.com"];
// No TypeScript, I don't want an (string | number)[].

let user = ["Steve", 45, "test@example.com"] as tuple;
// Amazing!

A readonly keyword could also be added to allow easier syntax for readonly tuples.
let user: readonly [string, number, string] = ["Steve", 45, "test@example.com"];
// There isn't even a shortcut for this; you have to type everything.

let user = ["Steve", 45, "test@example.com"] as readonly tuple;
// Amazing!

This is also out of scope a bit, but named tuples would be nice, but I'm not sure how the syntax would work.
let user = ["Steve", 45, "test@example.com"] as tuple of [name, age, email];
// The type of `user` is [name: string, age: number, email: string].

let user: [name: string, age: number, email: string] = ["Steve", 45, "test@example.com"];
// Too verbose!

💻 Use Cases
Currently, I manually specify types for these tuples, but it feels like it could be shorter at times. Here's an example from my zSnout project where I need to store the last two points the user touched.
let lastTouchPointA: [number, number] = [NaN, NaN];
let lastTouchPointB: [number, number] = [NaN, NaN];

While writing this, I felt that there should be an easier way to write these tuples, but the current workarounds feel to verbose when I only need them for simple tasks.

Duplicate of #48052

authors: xiBread zsakowitz


text:
Negated {} and null | undefined predicates on unknown should still narrow

🔎 Search Terms
{} undefined null predicate unknown narrowing
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about narrowing

⏯ Playground Link
https://www.typescriptlang.org/play/?#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXywGcA5HDY5CCIgCwAoA3KCZEALnjQGtUcB3VAEoOTFgiLwA3gF8A3AChQkWAhTpseAiUrVC9Uaw7deA4fAPjC8VDvgAfTqlCIsqEMAWLw0OPDB5CDHNmQ0ceflRPLER4OiJSch1aRhCQQUEpeXhgsQVsgHp8+AA9AH55aXl5aNiAQniyCipki3TM7Is8+EKS8srqmLjtZr0UsTbJLJzWLp6yiqqaunrh3X1UianOqbm+oA
💻 Code
declare function isNotNullish(value: unknown): value is {};
declare function isNullish(value: unknown): value is null | undefined;

declare const value: unknown;

if (isNotNullish(value)) {
  value;
  // ^?
}

if (!isNotNullish(value)) {
  value;
  // ^?
}

if (isNullish(value)) {
  value;
  // ^?
}

if (!isNullish(value)) {
  value;
  // ^?
}

🙁 Actual behavior
value only narrows when the type predicate is called directly, not when negated with a !.
The narrowed types of value in that example are:

isNotNullish(value): {}
!isNotNullish(value): unknown ❌
isNullish(value): null undefined
!isNullish(value): unknown ❌

🙂 Expected behavior
The narrowed types of value should be:

isNotNullish(value): {}
!isNotNullish(value): null | undefined
isNullish(value): null undefined
!isNullish(value): {}

Additional information about the issue
No response

Using unknown is so 2024: TS playground

authors: Andarist JoshuaKGoldberg


text:
autocomplete works for const assertion.

Fixes #39384

Nice work @ShuiRuTian  - this looks good to me, thanks!

Hi !
Thanks @ShuiRuTian for this feature. I have however a recommendation for a case that doesn't work on my side.
So this will work :
const test1 = <Self extends { test: number }>(s: Self) => s
test1({  } as const)

But not that :
const test2 = <Self extends { test: number }>(s: () => Self) => s
test2(() => ({  } as const))

What do you think ?
Thank you for your help.

@n4zim
Thanks for feedback, the fix PR is on the way~

@ShuiRuTian It's really nice of you, this well really going to help me, many thanks !

authors: ShuiRuTian n4zim orta


text:
Fix double alias of complex export/import/default/namespace combination

Fixes a case where we failed to resolve an aliased symbol when the following combination of features are employed:

An exported namespace declaration that merges with a function and that has an export named default
An import of the exported namespace in (1)
Exporting (2) using export=
Importing (3) using a default import while --esModuleInterop is set.

This seems to be caused by the fact that we weren't calling resolveSymbol for an export resolved from an export= symbol in resolveExportByName, resulting in a Symbol that was an alias to an alias, rather than the actual target.
Fixes #39149

@typescript-bot perf test
@typescript-bot run dt
@typescript-bot test this
@typescript-bot user test this


text:
[Question] Adding Options and Settings

In the VS Community project, there is a way to add custom options/settings using a provided UI.  See here for example.
Does this new VS extensibility offer something similar?  If not, is there a plan to add or will there be a new concept added?
Thanks

Not at the moment as we are working on a new model compatible with the new extensibility framework. We will provide the new APIs to provide, read and write user settings in an upcoming update.

@BertanAygun do you know when this new functionality will be released?

Unfortunately we don't have an exact date yet, we are working on making sure the new APIs integrates seamlessly with the new Unified Settings feature: https://devblogs.microsoft.com/visualstudio/unifiedsettings/. The new unified settings removes the need for custom UI for options as it provides a flexible framework to declare settings that are both user friendly to edit in JSON or via a generated UX.
Thanks!

authors: BertanAygun cjdutoit shaggygi

repo: microsoft/VSExtensibility


text:
WSL2 boot freeze - VspDeviceWriteErrorLog

Windows Version
Microsoft Windows [Version 10.0.22631.2792]
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
No response
Distro Version
Ubuntu
Other Software
Similar to issue #9942, the ext4.vhdx appears to have been corrupted while running a high CPU and disk workload. The distro froze and will no longer boot after a full system restart.
Debug:
Collecting logs from failed boot
Windows Performance Analyzer shows a flood of tthe following error on the host. Full logs attached further down.
Event Name: Microsoft-Windows-Hyper-V-StorageVSP//
Source: VspDeviceWriteErrorLog
Message: Log status 0xC0000001: VspDeviceWriteErrorLog: AnsiDeviceName = C:\Users\Redacted\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx, Initiator = 2, SCSIOP = 0x2A, SrbStatus = 0x04

Attempt to mount and recover the ext4.vhdx image from another wsl installation
host:  wsl -d Ubuntu-22.04 --mount --bare --vhd <path>
Ubuntu-22.04:
[sudo] password for debug:
e2fsck 1.46.5 (30-Dec-2021)
/dev/sdd: recovering journal

and fsck hangs. Looking at dmesg shows a flood of errors:
[  415.127466] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#674 cmd 0x2a status: scsi 0x2 srb 0x4 hv 0xc0000001

Repro Steps
N/A
Expected Behavior
Succesfully boot, or fail gracefully at the very least (timeout for example)
Actual Behavior
wsl.exe cmd indefinitely hangs until system restarted.
Diagnostic Logs
WslLogs-2023-12-05_16-41-47.zip

I had a look at the raw data in the etl file, saw redacted. Did you perform a blind string replacement on all the data? I don't know the data format well for etl, if it has checksums. But if the replacement was a different length than the original string I won't at all be surprised that it didn't work for us when reading it.

Logs again
WslLogs-2023-12-06_14-09-45.zip
Thankfully I've been able to recover the system image with the following command: wsl --import new_distro .\new_distro\ <path to ext4.vhdx> --vhd

authors: hellicopterpd pmartincic

repo: microsoft/WSL


text:
UDP port proxy for WSL2 (in order to support HTTP/3 which uses UDP/QUIC)

Is your feature request related to a problem? Please describe.
I cannot access my HTTP/3 service running in WSL2/Ubuntu. because the service UDP port is not proxied/exposed to outer Windows.
Describe the solution you'd like
Consider supporting UDP port proxy, or adopting an existing UDP port proxy implemetation like Simple UDP proxy/pipe.
Describe alternatives you've considered
N/A
Additional context

Windows 10 Build 19042
WSL 2, Ubuntu Ubuntu 20.04 LTS

The following repros. Disabling firewall does not resolve.

/dupe #4825 as landing zone

It would be really nice to have a pointer to which issue this is a duplicate of.

authors: fluffy fuweichin therealkenc