text:
YML for running builds through WinUI tests & updating CsWinRT dependency

This PR adds a YML file to our main CI pipeline. The new stage has a task that only runs on nightly builds, and a task that only runs on (public) release builds. The task for nightly builds will trigger a WinUI CI pipeline and pass the CsWinRT preview NuPkg so that the WinUI tests run using the latest preview of CsWinRT. The other task, that runs on release builds of CsWinRT, triggers a WinUI pipeline which updates the CsWinRT version used in the WinUI repo.

WinUI PR to fix the script: https://microsoft.visualstudio.com/DefaultCollection/WinUI/_git/microsoft-ui-xaml-lift/pullrequest/7205661

repo: microsoft/CsWinRT


text:
[BUG]zero3 in torch.nn.functional.linear

using zero3 report an error when zero1 and 2 work:
TypeError: apply() takes no keyword arguments.
the final position of trace log:
import torch.nn.functional.linear as F
...
result = F.linear(x, T(self.weights), bias=self.bias)
version: deepspeed 0.8.3

Closing due to no response. Please re-open as needed.

source: gharchive/issue

repo: microsoft/DeepSpeed

license_type: permissive

license_source: github-api


text:
chore(dtslint): mention TSTyche in the readme

Would it be possible to add TSTyche in the list of recommended type testing tools?

I have build TSTyche, because it was not possible to find a tool which could make it a breeze testing types in a large monorepo with around 1500 assertions. Without a dedicated CLI tool and support for helpers like test() or describe() that was a pain.
TSTyche implements the test helpers with .only and .skip run mode modifiers, expect style assertions and has a mighty test runner. For example, it can select test files by path, filter tests by name and pass them through TypeScript 4.8 and latest:
tstyche JsonObject --only external --target 4.8,latest

Repo: https://github.com/tstyche/tstyche
Documentation: https://tstyche.org

I am biased, but it seems like TSTyche is the most capable type testing tool around. Currently it is in rc and a stable version will be released in few days.

I don't mind mentioning more tools, though at that point we should probably also mention vitest's type testing (which looks very similar?)

Thanks for quick response.
I was thinking abut making the list longer. There is also @arktype/attest or @glint/type-test (exotic syntax). The latter wraps around expect-type, just like @japa/expect-type.
Vitest is also using expect-type. They simply spawn a process, run tsc and process the result. It sounded like maintainers are not sure about this approach anymore and are looking for alternatives. Indeed there are some limitations (e.g. no support for references).
Given all this context, it sounded like the best idea would be to open a PR adding only my tool. Others can do the same if they are interested. Or someone could create a more complete list later.

Just to add, TSTyche is written from scratch. I was helping with jest-runner-tsd (another testing tool) and could see the problems from inside.
It was obvious that integration with JavaScript testing tool is not the best solution. For instance, Jest or Vitest do not know how to install different versions of TypeScript package. Why they should know? Standalone type testing tool was obviously better solution.
Differently from similar tools, TSTyche is wrapping around TypeScript's ProjectService. @jakebailey I have to say: thanks a lot for this idea! (I picked it up from here: https://github.com/typescript-eslint/typescript-eslint/issues/6575). That was a significant performance boost.
TSTyche compares types programatically, hence typescript have to be patched (not elegant, but I don’t see it as problem). Instead of publishing patched TypeScript package (like tsd does), TSTyche is applying the patch in memory. This makes it possible to use TypeScript builds from every-ts (the bisect command also works).
These all are niche problems, of course. Just trying to illustrate why I think that TSTyche is the most capable type testing tool around. The familiar testing APIs makes easy to start using it. If every-ts bisect is needed at some point, this will also work.

Sorry, I have no idea what changesets are. Hope that is not an issue.

TSTyche compares types programatically, hence typescript have to be patched (not elegant, but I don’t see it as problem)

This is getting off topic, but I'm curious what you need to patch in; isTypeAssignableTo is now documented on the checker (but has been available for a long time), and I would expect to cover a lot of what you may need.

Sorry, I have no idea what changesets are. Hope that is not an issue.

The CI will require one, but since this is just a readme change, you may just be able to do pnpm changeset --empty.

@microsoft-github-policy-service agree

This is getting off topic, but I'm curious what you need to patch in

Currently I have to expose isTypeIdenticalTo(), isTypeSubtypeOf() and also isTypeStrictSubtypeOf(). (Actually it could be better to use isTypeRelatedTo() directly.) Also it might be I will need instantiateSignatureInContextOf() in near future.
What TSTyche is doing is not patching in the strict sense. I understand this more like extracting parts of TypeScript's code and wrapping a type test runner around them. One can see TSTyche as a per-file type checker with benefits (assertions, different TS versions, etc). In a way it could also reimplement TypeScript's code to do its job. Only that this is unnecessary duplication.
For example, Yarn or Volar are patching TypeScript. They want to run the same tsc command, but it must act differently than originally intended. In contrary, TSTyche wants TypeScript to act exactly as it was intended (otherwise testing on different versions makes no sense).

source: gharchive/pull-request

authors: jakebailey mrazauskas

repo: microsoft/DefinitelyTyped-tools

license: MIT


text:
Added package name & version to HTTP headers

Summary of the pull request
This adds the package name and version to all HTTP request headers, in the form of UserAgent, sent to Dev Box APIs. This will facilitate easier telemetry for them.
Validation steps performed
Verified with the Dev Box team to make sure the requests received now had a distinct header.
PR checklist

[ ] Closes #197
[ ] Tests added/passed
[ ] Documentation updated

Quick question, do you happen to know if Package.Current.Id.Name has whether its canary/dev in the name?

@bbonaby I do, and it does, for example - Microsoft.Windows.DevHomeAzureExtension.Dev

repo: microsoft/DevHomeAzureExtension


text:
attention_is_all_you_need:  install.py Error: C3861: '_PyGen_Send': identifier not found

When following the instructions from https://learn.microsoft.com/en-us/windows/ai/directml/gpu-pytorch-windows
I end up with calling install.py of the attention_is_all_you_need demo.
The build errors with:
spacy/strings.cpp(10212): error C3861: '_PyGen_Send': identifier not found
It seems this issue has already been discovered by cython: https://github.com/cython/cython/issues/3876
and is related to Python 3.8.10 (possibly also 3.8.9). The installation instructions do not mention a specificy python version, so depending on the miniconda version and date of setup, a fairly new python will be installed.

Quick Fix: Hardcode a stable version in the documentation of gpu-pytorch-windows
Final Fix: Make the build work with 3.10+ Versions of python

retried with conda@3.8.16
--> One error because "spacy" couldn't be installed, because of "creating link error to de" or so. I didn't memorise the exact message, but there was a hint I might not install as admin.
So I reopened the shell with admin rights, and then the python install.py ran through.
-> I am not sure now, if the 3.10 Python version is really the issue (there I didn't realise the admin suggestion and installed spacy manually).
--> The documentation doesn't say "run/install as admin". In general, python installs requiring aren't ideal. Can this be fixed  to be non-admin dependent?

repo: microsoft/DirectML


text:
Telemetry to distinguish between "never referenced" and "referenced then unreferenced" objects that are still used

For GC, we are tracking cases where an unreferenced object is used - this represents risk of data loss since GC Sweep phase would clean up the unreferenced content, leaving the user with a broken document.
There are two ways this can happen today:

An object can be created and attached via bindToContext, and never properly referenced.
An object can be properly referenced via handle, but also incorrectly referenced via URL, and then once the handle reference is removed it's considered unreferenced but the URL may still be in use.

These two failure paths require different approaches to remedy, and it will help understand and prioritize the work to have insight into how often each case is hit.
Related: #9362 and other issues about the InactiveObjectX telemetry, which is how we're tracking use of unreferenced objects today.

Tracked by AB#429

authors: agarwal-navin markfields

repo: microsoft/FluidFramework


text:
Test summary manager

Add tests for SummaryManager, inspired by #6377, but things have changed since then.
Changes for bypassing initial delay more cleanly, checking that throttler delay is >0 before raising a warning, adding ISummaryManagerConfig to control initial delay more closely, etc.

Bump! Please review now that previous PRs have been merged.


text:
Driver-Definitions - Updating the protocol-definitions version

After releasing a prerelease for protocol-definitions, we need to bump its version on the driver-definition @heliocliu  to confirm.

this looks right.  you'll need to run an install for the driver-definitions folder to update the lock file first as the error says

this looks right. you'll need to run an install for the driver-definitions folder to update the lock file first as the error says

Perfect - just did it :)

authors: NicholasCouri heliocliu


text:
[dask] [ci] add support for scikit-learn 0.24+ in tests (fixes #4031)

Fixes #4031. In scikit-learn 0.24.x, support for passing a class (instead of an instance) to sklearn.utils.estimator_checks.check_parameters_default_constructible() was removed (https://github.com/scikit-learn/scikit-learn/pull/17134).
We must have recently started getting scikit-learn >=0.24.0 in tests, because CI has been failing on this test with this error

E           TypeError: type() takes 1 or 3 arguments

This error only shows up for the Dask estimators, because we call check_parameters_default_constructible() directly there. The equivalent test in tests/python_package_test/test_sklearn.py isn't failing because it's skipped on sklearn>=0.24.0 (https://github.com/microsoft/LightGBM/blob/6356e659af74909aa77eb87d54b79f0373772509/tests/python_package_test/test_sklearn.py#L1187) and instead run as part of the list of tests run with sklearn.utils.estimator_checks.parametrize_with_checks(): https://github.com/microsoft/LightGBM/blob/6356e659af74909aa77eb87d54b79f0373772509/tests/python_package_test/test_sklearn.py#L1180.

0.24.0
Dec 22, 2020
https://pypi.org/project/scikit-learn/0.24.0/#history

"Fast" update, conda! 👍  😄
But at anaconda.org it is still shown that the latest scikit-learn version is 0.23.2:

https://anaconda.org/anaconda/scikit-learn
I don't understand why we get 0.24.1 version. So weird!

I hope some time we just drop all workarounds and leave only unified version of tests that assumes we use > 0.24.0.

ugh, more MiKTeX issues. this one is new.

The downloaded binary packages are in
C:\Users\runneradmin\AppData\Local\Temp\RtmpKM9jGl\downloaded_packages
Downloading https://github.com/microsoft/LightGBM/releases/download/v2.0.12/miktexsetup-4.0-x64.zip
Setting up MiKTeX
miktexsetup.exe: The remote package repository is not online. You have to choose another repository.
miktexsetup.exe: Data: url="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/"
Error: Process completed with exit code -1.

I can see that that isn't true, and wasn't true the last time I restarted the failing Windows R jobs about 30 minutes ago.

I'm going to try upgrading to miktex-setup 4.1 (https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x86/). I'll just do that on this PR, since it's blocking anyway.

upgrading MikTeX did not work. Same error as before.
https://github.com/microsoft/LightGBM/pull/4032/checks?check_run_id=2005836771

The downloaded binary packages are in
C:\Users\runneradmin\AppData\Local\Temp\RtmpcJrRkF\downloaded_packages
Downloading https://github.com/microsoft/LightGBM/releases/download/v2.0.12/miktexsetup-4.1-x86.zip
Setting up MiKTeX
miktexsetup_standalone.exe: The remote package repository is not online. You have to choose another repository.
miktexsetup_standalone.exe: Data: url="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/"

But I can clearly see that that URL is responding ok.

and I get a 200 hitting it directly with curl -I https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/

One more update. I just tried pushing a change that points our CI code at a different package repository.
https://github.com/MiKTeX/miktex/issues/414 mentioned that you could use https://miktex.org/pkg/repositories to find the list of package repositories. I noticed that the math.illinois.edu mirror we use is not listed there (https://miktex.org/pkg/repositories), even though it is listed as healthy on http://dante.ctan.org/mirmon/.
I pushed https://github.com/microsoft/LightGBM/pull/4032/commits/4845136afa44045268b338047daa97f5ad66d441 changing package repo URLs, just to check if that matters at all.

Seems this is still a problem. I found another relevant issue. The exact same thing seems to have happened in 2018. Similar response from the maintainer as we've seen in other MiKTeX issues, basically "oh this is just broken for a day or two" 😫
https://github.com/MiKTeX/miktex/issues/49#issuecomment-356626188

@StrikerRUS thanks for rebuilding! I'm glad this started working again.
Once we're done with the release (#3872 ), I'll spend some time working on some options to hopefully avoid this in the future. It's awful having the whole project's CI blocked for as long as two days just because of the tools needed for the R documentation on Windows.

Great, thank you!

authors: StrikerRUS jameslamb

repo: microsoft/LightGBM

license: mit

license_source: bigquery


text:
Fix stopAtEntry for embedded debugging

I was running into issues debugging an embedded device with OpenOCD where the stopAtEntry setting in launch.json was ignored.
The first problem was that _callback.OnEntryPoint(thread) wasn't called after setting EntrypointHit, so none of the stopAtEntry logic in OpenDebugAD7 had a chance to run. However, even with that added, thre was another problem because CmdContinueAsync() runs unconditionally. To fix that, I also plumbed the value of stopAtEntry through to LaunchOptions in MICore so that we can switch on it.
cc @aleun

FYI this will have (easily resolved) merge conflicts after #1108 goes in.

@benmcmorran Can you update the description to match what your PR does now?
@paulmaybee @WardenGnaw Do either of you want to have a look before this is merged?

Updated title and description.

authors: benmcmorran gregg-miskelly

repo: microsoft/MIEngine


text:
Issue with SpectatorView (Preview)

I am trying to use SepectatorView to connect hololens with ipad to check an Vuforia image target. However, after I scan the QR code on the ipad screen with hololens' camera, hololens started to have a problem read the Vurforia images target (which it could be read before scanning the QR code).
Here is the part for the script

It seems Vuforia did not relaunch properly since it was disabled for the hololens camera to scan the QR code.
I am using Unity 2017.3.0 and 7.036 for Vuforia.
Can anyone help me, really apprciated.

Is the hololens camera occupied？
发自我的 iPhone

在 2018年10月31日，下午1:54，ShaanXiUnityWroker notifications@github.com 写道：
I am trying to use SepectatorView to connect hololens with ipad to check an Vuforia image target. However, after I scan the QR code on the ipad screen with hololens' camera, hololens started to have a problem read the Vurforia images target (which it could be read before scanning the QR code).
Here is the part for the script
It seems Vuforia did not relaunch properly since it was disabled for the hololens camera to scan the QR code.
I am using Unity 2017.3.0 and 7.036 for Vuforia.
Can anyone help me, really apprciated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Is the hololens camera occupied？ 发自我的 iPhone
…
在 2018年10月31日，下午1:54，ShaanXiUnityWroker @.***> 写道： I am trying to use SepectatorView to connect hololens with ipad to check an Vuforia image target. However, after I scan the QR code on the ipad screen with hololens' camera, hololens started to have a problem read the Vurforia images target (which it could be read before scanning the QR code). Here is the part for the script It seems Vuforia did not relaunch properly since it was disabled for the hololens camera to scan the QR code. I am using Unity 2017.3.0 and 7.036 for Vuforia. Can anyone help me, really apprciated. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

I have solved this problem.
Here is the part for the script
The OpenVuforia code should be executed here

@ShaanXiUnityWroker since you have it works with Vuforia, can you share the scene how do you set it up a little more detail.
I am trying the same thing which turn on vuforia inside OnStppedPhotoMode of CameraCaptureHololens.cs and it works great on Hololens, however, on the iPhone side, I only have black screen and the sharing object (star) is showing but freezing.
Would be interesting if you can share the scene setup in details?
Thank you

authors: Lenovezhou ShaanXiUnityWroker tletie

repo: microsoft/MixedRealityCompanionKit


text:
I can't use hand move model with oculus quest2

Describe the bug
A clear and concise description of what the bug is.
I can't use handController move model with oculus quest2
To reproduce
新建文本文档.txt
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Your setup (please complete the following information)

Unity Version [e.g. 2020.3.5f1]
MRTK Version [e.g. v3.0]

Target platform (please complete the following information)

Oculus quest2

Additional context
Add any other context about the problem here.

Unfortunately, we need more info to resolve this issue. Please reopen when you've got more context, we look forward to figuring it out with you. Thank you!

repo: microsoft/MixedRealityToolkit-Unity


text:
Fix single-frame cursor flickering

Overview
The offending cursor prefabs have by default their visuals enabled. When handtracking starts and the cursors are spawned, it takes the system a frame to figure out they're not needed and to disable them. This results in the cursors flashing.
The solution is to simply check disableCursorOnStart for the offending cursors and have the visuals properly disabled for the poke pointer (properly as in not only a transparent material, but disabling the visuals GameObject).
The latter change also fixes a cutout on your index finger when using the handmesh visualization:
After - Before:

Changes

Fixes: #10270
Fixes: #10236

/azp run

Appreciate the contribution! Looks good

authors: jloehr keveleigh


text:
Interactable Refactor Part 2/N

Overview
Continuation from #5857
Note: This is merging into a feature branch, not MRTK_Dev

Moved Theme-related files from Interactable to new VisualThemes feature folder
Elimnated dependency on InteractableTypeFinder, in favor of TypeExtensions
Update properties and helper methods of InteractableEvent
Extrapolated inspector code for InteractableEvent to it's own utility class, simplified change/remove structure too
Fixed InteractableThemeInspector to update if fields change in the targeted class
Delete InteractableTypeFinder because utilization was phased out in favor of simpler approaches (created new TypeCacheUtility instead)
Cleaned up States scriptableobject class and StateInspector to simplified and more robust model

Changes

Fixes: #5652

Verification

As a reviewer, it is possible to check out this change locally by using the following
commands (substituting {PR_ID} with the ID of this pull request):
git fetch origin pull/{PR_ID}/head:name_of_local_branch
git checkout name_of_local_branch

/azp run

/azp run

/azp run


text:
Docs update 2.5.0 stabilization

Overview
Changes

Fixes: # .

Verification

This optional section is a place where you can detail the specific type of verification
you want from reviewers. For example, if you want reviewers to checkout the PR locally
and validate the functionality of specific scenarios, provide instructions
on the specific scenarios and what you want verified.
If there are specific areas of concern or question feel free to highlight them here so
that reviewers can watch out for those issues.
As a reviewer, it is possible to check out this change locally by using the following
commands (substituting {PR_ID} with the ID of this pull request):
git fetch origin pull/{PR_ID}/head:name_of_local_branch
git checkout name_of_local_branch

/azp run mrtk_docs

Looks like there are a couple broken links:
Build succeeded with warning.
[20-09-12 12:14:46.581]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.TocDocumentProcessor.Save](../../toc.yml#L0)Invalid file link:(~/../../Documentation/GettingStartedWithTheMRTK.md).
[20-09-12 12:14:46.581]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.TocDocumentProcessor.Save](../../toc.yml#L0)Invalid file link:(~/../../Documentation/GettingStartedWithTheMRTK.md).
[20-09-12 12:14:46.581]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](../../Documentation/Tools/HolographicRemoting.md#L82)Invalid file link:(~/../../Documentation/GettingStartedWithTheMRTK.md#getting-help).
[20-09-12 12:14:46.581]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](../../Documentation/Tools/HolographicRemoting.md#L109)Invalid file link:(~/../../Documentation/GettingStartedWithTheMRTK.md#getting-help).
[20-09-12 12:14:46.581]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](../../Documentation/GettingStartedWithMRTKAndXRSDK.md#L7)Invalid file link:(~/../../Documentation/GettingStartedWithTheMRTK.md).

@hferrone, can you resolve the merge conflict?

@davidkline-ms That should do it 👍

Looks like there's a .DS_Store file being committed. Is that needed?

/azp run mrtk_docs

/azp run mrtk_docs

authors: davidkline-ms hferrone keveleigh


text:
Oscar fails with torch 2.1

Hi,
I am running Oscar with torch 2.1 but am facing this error. Could you please take a look and suggest a solution?
Traceback (most recent call last):
File "./Oscar/oscar/run_vqa.py", line 1232, in
main()
File "./Oscar/oscar/run_vqa.py", line 1155, in main
global_step, tr_loss = train(args, train_dataset, eval_dataset, model, tokenizer)
File "./Oscar/oscar/run_vqa.py", line 477, in train
optimizer = AdamW(optimizer_grouped_parameters, lr=args.learning_rate, eps=args.adam_epsilon)
File "./Oscar/./transformers/pytorch_transformers/optimization.py", line 128, in init
super(AdamW, self).init(params, defaults)
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/optim/optimizer.py", line 266, in init
self.add_param_group(cast(dict, param_group))
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_compile.py", line 22, in inner
import torch._dynamo
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_dynamo/init.py", line 2, in
from . import allowed_functions, convert_frame, eval_frame, resume_execution
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 46, in
from .output_graph import OutputGraph
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 35, in
from . import config, logging as torchdynamo_logging, variables
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_dynamo/variables/init.py", line 53, in
from .torch import TorchVariable
File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_dynamo/variables/torch.py", line 131, in
transformers.configuration_utils.PretrainedConfig.eq = (
AttributeError: module 'transformers' has no attribute 'configuration_utils'

I also encountered this problem, and then I uninstalled the transformer (pip uninstall transformers), reinstalled it(pip install transformers==4.42.3 ), and the problem was solved

repo: microsoft/Oscar


text:
LSC: Warn when file encoding does not match magic comment

This tools/option/python/general option no longer does anything.
It used to add a squiggle / error list item when the magic comment didn't match the encoding.
It was implemented in InvalidEncodingSquiggleProvider and would have to be reimplemented to not depend on analyzer events.

We are now tracking this task in our internal Pylance Azure DevOps.

repo: microsoft/PTVS


text:
Ensure that untyped blank is interpreted as a scalar for the 'in' operator

Untyped blanks, when used in contexts where they can be interpreted as either a scalar or a complex type (record / table), should be interpreted as scalars. This wasn't working for the in operator, and this fixes it. Since this is technically a breaking change (although I can't see why someone would use that), the update is made under the PowerFxV1CompatibilityRules feature.

✅ No public API change.

✅ No public API change.

authors: CarlosFigueiraMSFT LucGenetier

repo: microsoft/Power-Fx


text:
Brand Colour Correction

The Pull Request is purely a colour correction for the Brand Colour

[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.

Hello @thedarkjester,
Congratulations, your PR is approved and merged. Please update your submission in ISV Studio by using the latest commit ID.
Let us know if you have any questions.

authors: thedarkjester v-EgorKozhadei

repo: microsoft/PowerPlatformConnectors


text:
Unable to open Settings

Settings stopped opening.  When double-click or right click on the Settings, nothing happens.  This was working, no idea why it stopped.  I did rearrange my displayport cable inputs (for my triple monitor setup), but not sure if this is related.

can you provide more information here?  i just removed a monitor and on change, when the monitor positions change, it does go back to primary center.
Other thing that could be helpful is a "report bug" via system tray.

can you provide more information here? i just removed a monitor and on change, when the monitor positions change, it does go back to primary center.
Other thing that could be helpful is a "report bug" via system tray.

Uploading PowerToysReport_2021-06-11-08-56-12.zip…

@nammmers looks like the report failed to upload, could you please try again?

PowerToysReport_2021-06-11-08-56-12.zip

@nammmers looks like the report failed to upload, could you please try again?

Let me know if they new upload worked.

@nammmers there's not a lot of stuff in the logs, but I've noticed that you're running PT elevated, could you please launch it non-elevated?

@nammmers there's not a lot of stuff in the logs, but I've noticed that you're running PT elevated, could you please launch it non-elevated?

I'm not even sure what that means, how do I launch it non-elevated?

@nammmers right, since you cannot access the settings, please go to %localappdata%\Microsoft\PowerToys in the file explorer window, then open settings.json. then make sure that the following values are set to false:

is_elevated
run_elevated

E.g. the file should contain something like that:
{"startup":true,"enabled":{"Awake":true,"ColorPicker":true,"FancyZones":true,"File Explorer":true,"Image Resizer":true,"Keyboard Manager":true,"PowerRename":true,"PowerToys Run":true,"Shortcut Guide":true},"is_elevated":false,"run_elevated":false,"download_updates_automatically":true,"is_admin":true,"theme":"system","system_theme":"dark","powertoys_version":"v0.37.2"}

@nammmers right, since you cannot access the settings, please go to %localappdata%\Microsoft\PowerToys in the file explorer window, then open settings.json. then make sure that the following values are set to false:

is_elevated
run_elevated

E.g. the file should contain something like that:
{"startup":true,"enabled":{"Awake":true,"ColorPicker":true,"FancyZones":true,"File Explorer":true,"Image Resizer":true,"Keyboard Manager":true,"PowerRename":true,"PowerToys Run":true,"Shortcut Guide":true},"is_elevated":false,"run_elevated":false,"download_updates_automatically":true,"is_admin":true,"theme":"system","system_theme":"dark","powertoys_version":"v0.37.2"}

I just happened to try to open the settings and it worked finally.  Not sure what it all means now, but I'm able to getting the settings to open without doing or changing anything.

@nammmers alright, thank you for the response!

authors: crutkas nammmers yuyoyuppe

repo: microsoft/PowerToys


text:
[Color Picker] Decimal format

Description of the new feature / enhancement
An option to display and copy chosen colors in decimal format.
Scenario when this would be used?
This would be helpful when working with code where colors are written as decimal values rather than hex/RGB/HSV/etc. values. The user could use the Color Picker PowerToy to choose a color from a program, then copy the value and quickly find the decimal value in the source code rather than having to convert from hex to decimal in an external program first.
Supporting information
"To convert a hexadecimal to a decimal manually, you must start by multiplying the hex number by 16. Then, you raise it to a power of 0 and increase that power by 1 each time according to the hexadecimal number equivalent. We start from the right of the hexadecimal number and go to the left when applying the powers. Each time you multiply a number by 16, the power of 16 increases."
from https://owlcation.com/stem/Convert-Hex-to-Decimal
https://www.geeksforgeeks.org/program-for-hexadecimal-to-decimal/ has example C# code for converting from hex to decimal.

This has been added in December. See #12630.

@offchristianamr Did #12630 is what you want?
Thanks @UserTeemu!
/needinfo

authors: UserTeemu franky920920 offchristianamr


text:
shake to find cursor

Description of the new feature / enhancement
On MacOS there is a feature called shake to find that would be very usefull. if you shake your mouse from side to side quickly the cursor gets larger so that you can find it more easily. it's very intuitive and especially usefull if you're working with multiple screens.
Scenario when this would be used?
most people wiggle their mouse around to find their cursors anyways. This would make make it easier.
Supporting information
No response

Duplicate of #131

Thanks for your suggestion! This has been raised in #131. To centralize the discussion thread, please go to that thread for discussion.


text:
Adding an option to quick preview .ipynb (jupyter) files in side pane in file explorer add on.

Description of the new feature / enhancement
Just like the markdown and pdf preview currently provided in the powertoys file explorer add on, another add on to quickly preview a jupyter or ipynb file can be added.
Scenario when this would be used?
Seeing a jupyter notebook directly is very useful to see if that's the file, i want to open or just quickly see it's contents. In a mac, we can just hit the space to quick look the file but on windows, there isn't some alternative for the same.

verifying, ipynb  is just json, correct?

lemme rephrase, sorry, do you want the visualization or the raw file

I was talking about the visualisation. Thanks for confirming.

authors: crutkas priyanshu-shubham


text:
PowerToys Run : Window walker for system tray

Description of the new feature / enhancement
There are certain applications that minimize to, and run out of, the system tray (next to the clock).
Examples: Discord, KeepassXC, ShareX, not to mention PowerToys itself.
It would be nice if the window walker was able to detect / switch focus to the windows of these applications.
Scenario when this would be used?
The use cases are the same as those for window walker plugin itself i.e. the ability to be able to switch focus to a specific application.
However in addition, i would argue there is greater need in this case.
Why? Because there is a native shortcut for switching directly to a window in the taskbar (i.e. win + <number>).
Contrary to this, there are no keyboard shortcuts that will allow you to directly focus a system tray application. The only option is to win + b (win10) and then recurse arrow keys to navigate.
Supporting information
No response

I am sure this is a dup. But I don't know the tracking issue.

The closest one i've found is https://github.com/microsoft/PowerToys/issues/9414 but there are differences.
This person is talking about accessing "context menus" like this:

The issue i've made doesn't require anything so granular. It's only about being able to maximize / focus the windows, preferably by enabling window walker to detect apps even if they're minimized in system tray.

i feel like they are actually the same at the heart of it. they have to be invoked somehow.  To do this, 9414 would have same style implementation.  how does it launch / invoke the app
/dup #9414

authors: crutkas htcfreek marblewraith


text:
Automatic install of v0.60.1 doesn't run

Microsoft PowerToys version
0.59.1
Running as admin

[X] Yes

Area(s) with issue?
Installer
Steps to reproduce
When v0.60.1 is downloaded and ready to install, click 'Install now'.
✔ Expected Behavior
Update should begin.
❌ Actual Behavior
PowerToys UI closes after 1s but nothing else happens. The app doesn't stop, so I can open it again from the tray, click 'Install now', then the UI disappears again. PT and Win was restarted - no luck.
Other Software
Windows 11 Pro 21H2 22000.795.

To me it doesn't close the UI. It just displays this error:

Same here. Failed to update from v0.57.2

Got a similar problem as well, and you might want to try to fix it with what I came up with in this post:
https://github.com/microsoft/PowerToys/issues/19588#issuecomment-1197404945

/bugreport

@hellsing71, I ended up posting another issue on this with a video. Could you confirm if it's the same issue you are having?
#19876


text:
Release notes should specify type of hash and filename

Provide a description of requested docs changes
The release notes states:

Installer Hashes
x64 Installer Hash
0110EE62579462D509086D50F65EA44196F52624B08CDC8C9E1CBB8A7FFD4F35
ARM64 Installer Hash
DEE28FE7C7D59C301861375C1DBA47B41865653D1F34262E4C5A7A30A0051F39

Since there are many types of hash, you should really state which hashing algorithm was used.
It is better to explicitly state which hashes relate to which files.
Some hint on how to validate the hash

Suggested update:
Installer Hashes

Description
Filename
sha256 hash

x64 Installer
PowerToysSetup-0.64.1-x64.exe
0110EE62579462D509086D50F65EA44196F52624B08CDC8C9E1CBB8A7FFD4F35

ARM64 Installer
PowerToysSetup-0.64.1-arm64.exe
DEE28FE7C7D59C301861375C1DBA47B41865653D1F34262E4C5A7A30A0051F39

Checking file hashes
File hashes can be checked using the built-in CertUtil command in either Windows PowerShell or cmd terminal:
PS C:\Users\robl\Downloads> certutil -hashfile .\PowerToysSetup-0.64.1-x64.exe sha256
SHA256 hash of .\PowerToysSetup-0.64.1-x64.exe:
0110ee62579462d509086d50f65ea44196f52624b08cdc8c9e1cbb8a7ffd4f35
CertUtil: -hashfile command completed successfully.

It is also nice to have a file in the repository containing the hashes of all the downloadable binaries, e.g:

sha256sums
0110EE62579462D509086D50F65EA44196F52624B08CDC8C9E1CBB8A7FFD4F35  PowerToysSetup-0.64.1-x64.exe
DEE28FE7C7D59C301861375C1DBA47B41865653D1F34262E4C5A7A30A0051F39  PowerToysSetup-0.64.1-arm64.exe

To allow for some automated method to obtain and check the sha256sums if needed.

@jaimecbernardo and @cinnamon-msft this is a solid idea. Does scoobe need an update to it if we migrate the formate a tad?

@jaimecbernardo and @cinnamon-msft this is a solid idea. Does scoobe need an update to it if we migrate the formate a tad?

It does, in order to not show the hashes in scoobe. I don't think there's an issue with them showing for some versions if we don't get it right, though ;)

For reference, we're using some regexes for this that are defined here:
https://github.com/microsoft/PowerToys/blob/f41fe145fc77048389697fc1e50b884b98d5d9a9/src/settings-ui/Settings.UI/OOBE/Views/OobeWhatsNew.xaml.cs#L58-L59

Looking at that regex, it seems we used to say it's SHA256 previously on some releases, like https://github.com/microsoft/PowerToys/releases/tag/v0.56.2

There seems to have been a spate of cloned free/open source projects  (like OBS) being cloned, having malware embedded in them, and malicious actors placing Google ads to trick users into downloading malware/trojanned versions of the software etc.
It's becoming increasingly difficult to validate if "random .exe I downloaded from the Internet" is safe to run, even with supposedly reputable projects, when malicious actors create convincing clones of their websites with copies containing malware for download.
Seems it's too fiddly for Windows users to validate the SHA256 (It's not something that would occur to most Windows users) and there aren't clear instructions here for doing so.
The primary recommendation on your page is to install "Via GitHub with EXE [Recommended]" (i.e. download a random .exe from the Internet) and run it without any warning or clear instructions how validate the SHA256 checksum before installing it.
This is probably not something you want to encourage most users to do.
The primary install method should be to install from the MS Store, or if you want newer versions, a package manager like scoop/winget. (Which is mentioned in places, but perhaps a more prominent mention that it's likely safer to install this way.)

There seems to have been a spate of free/open source projects  (like OBS) being cloned, having malware embedded in them, and malicious actors placing Google ads to trick users into downloading malware/trojanned versions of the software etc.
It's becoming increasingly difficult to validate if "random .exe I downloaded from the Internet" is safe to run, even with supposedly reputable projects, when malicious actors create convincing clones of their websites with copies containing malware for download.
Seems it's too fiddly for Windows users to validate the SHA256 (It's not something that would occur to most Windows users) and there aren't clear instructions here for doing so.
The primary recommendation on your page is to install "Via GitHub with EXE [Recommended]" (i.e. download a random .exe from the Internet) and run it without any warning or clear instructions how validate the SHA256 checksum before installing it.
This is probably not something you want to encourage most users to do.
The primary install method should be to install from the MS Store, or if you want newer versions, a package manager like scoop/winget. (Which is mentioned in places, but perhaps a more prominent mention that it's likely safer to install this way.)

I see your point, but there are countless tutorials on how to validate checksums.
Donwloading from the GitHub release page is the safest way as we're uploading the exe first here, before it gets copied to other platforms. And by installing via MS Store or winget you can't check the hash as the installer is executed immediately. I certainly don't want to say the other install methods are less safe, but downloading the exe from our release page is the safest, most updated way to download PowerToys.

What if someone clones this entire GitHub repo to another GitHub repo, embeds malware in either the installer, or one or more tools, (including mentions of the checksums and updates them) and then pays Google to place an ad at the top of search results for "powertoys" to point to this copied repo? It's clear that Google doesn't care about malicious ads, or do any serious checks to prevent this from happening.
Installing via MS Store or winget, the user is much less likely to end up installing some malware copy.
In my original post, I suggested a paragraph to:
a) Make it clearer what the checksums are.
b) Show users how to check the checksum.
The current release notes still show without context or explanation, the "Installer Hashes." You have to already know what these are for, and then figure out which type of hash it is, and then find out how to check it with the tools provided by Windows.
There may be tutorials out there. You don't mention any. And never mind relying on users searching for a tutorial on how to check the hashes, if users don't know it's even a thing in the first place!)
Checking via some external source is also a good idea, e.g.: You could link to the hash somewhere it can be checked:
https://www.virustotal.com/gui/file/ee3f76f056a0611f69a203ba6d2b36ff81014b1fa29d1f46ecdcc6d312724fc6
According to this documentation, Winget supposedly verifies the installer hash:
https://learn.microsoft.com/en-us/windows/package-manager/winget/
But it doesn't seem to display it.
It's possible to do:
C:\>winget show Microsoft.PowerToys
Found PowerToys (Preview) [Microsoft.PowerToys]
Version: 0.66.0
Publisher: Microsoft Corporation
Publisher Url: https://github.com/microsoft/PowerToys
Publisher Support Url: https://github.com/microsoft/PowerToys/issues
Author: Microsoft Corporation
Moniker: powertoys
Description: Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. Inspired by the Windows 95 era PowerToys project, this reboot provides power users with ways to squeeze more efficiency out of the Windows 10 shell and customize it for individual workflows.
Homepage: https://github.com/microsoft/PowerToys
License: MIT
License Url: https://github.com/microsoft/PowerToys/blob/master/LICENSE
Privacy Url: https://privacy.microsoft.com/en-us/privacystatement
Copyright: Copyright (c) Microsoft Corporation. All rights reserved.
Copyright Url: https://github.com/microsoft/PowerToys/blob/main/LICENSE
Release Notes Url: https://github.com/microsoft/PowerToys/releases/tag/v0.66.0
Installer:
  Type: burn
  Download Url: https://github.com/microsoft/PowerToys/releases/download/v0.66.0/PowerToysSetup-0.66.0-x64.exe
  SHA256: ee3f76f056a0611f69a203ba6d2b36ff81014b1fa29d1f46ecdcc6d312724fc6
  Release Date: 2023-01-05

I don’t want to misrepresent winget but there are a lot of verifications there from submission to running an install command.
All our stuff is automated from creation of hash on the build server to submission to winget / store.
I do think this is a good idea but One thing we can’t do is over complicate release notes

Okay. I don't think it would be over complicating the release notes to add the paragraphs I suggested above, along with perhaps a link to another page with more detail explaining how to verify the downloaded .exe, and that users should exercise caution. (Or use winget/store installer.)
Downloading and running .exe files from the internet without any form of verification is just not a very safe thing to be doing anymore.
Some of the more recent cloned websites have been extremely convincing, and have tricked even experienced users. (Especially when the trojanned version of the installed program appears to function otherwise normally. It may not be discovered for weeks, by which time, who knows how much data has been stolen, accounts compromised etc.....)

@listerr I agree that we could add these paragraphs.
Bur there's one thing I don't get. When a malicious website would distribute an infected version of PowerToys like you described, this website can also provide wrong file hashes, right? When a website can fake for example the github release page they can just change the file hash too. How exactly does that bring more security?

Have a look at Thio Joe's video: https://www.youtube.com/watch?v=aNDw1QMV-lM

we've updated releases for some time with directly calling out hash type

authors: Aaron-Junker Jay-o-Way crutkas jaimecbernardo listerr


text:
After the lock screen wakes up again, the Windows related combination shortcut keys configured in the keyboard manager will become invalid

Microsoft PowerToys version
0.73.0
Installation method
WinGet
Running as admin
None
Area(s) with issue?
Keyboard Manager
Steps to reproduce
After the lock screen wakes up again, the Windows related combination shortcut keys configured in the keyboard manager will become invalid
✔ Expected Behavior
press Windows+ Tab
❌ Actual Behavior
Failure to execute behavior according to the predetermined combination preset
Other Software
No response

Not able to repro this, going to close. Let us know if you see this again!


text:
[Color Picker] Magnify area under cursor

On the color picker tool (WIN + Shift + C) please magnified area to show what is under the mouse cursor.
Similar to:
https://annystudio.com/software/colorpicker/

You can do this by using the scroll wheel on your mouse.

https://github.com/microsoft/PowerToys/wiki/ColorPicker-Overview#color-picker-usage

Awesome works great!


text:
Fix CDPX build

https://github.com/microsoft/PowerToys/commit/212ea2de30d69dbbfebf86c9d3604008d2272346 renamed settings UI projects paths, but didn't update hardcoded paths in localization script

Since it's not a user facing fix for a released bug, we can close it now.

authors: enricogior yuyoyuppe


text:
Fix for issue #1849 - FancyZones: When decreasing the number of zones windows in the last zone get placed in the first zone.

Summary of the Pull Request
Simple fix for https://github.com/microsoft/PowerToys/issues/1849
Prevents windows in the last zone being placed in the first zone when the zone count is decreased. Tested manually.

PR Checklist

[x] Applies to #1849
[x] CLA signed. If not, go over here and sign the CLA
[x] Tests passed
[ ] Requires documentation to be updated
[x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #1849

Validation Steps Performed
Tested each template layout from 9 zones, placed a window into each zone. Decreased the number of zones one at a time and checked that the window in the last zone maintained its size and position, and was not sized and placed so as to be in the first zone.

@JordanAnthonyKing
thank you for the PR, we will merge it after we release 0.16.1 ( 0.16.1 was already built an under testing).

Thanks, will #1849 close automatically or does the issue need to be linked?

We keep the issue open until we publish the release that contains the fix, so if someone searches for the issue while committed but not released yet, it's easier to find it.
We will take care of closing it.

authors: JordanAnthonyKing enricogior


text:
Flow Layout Container implementation

Support for Flow Layout Container

This PR adds support for the Flow Layout container for elements of type AdaptiveCard, Container, Column and Table Cell.
This PR introduces a feature flag resolver interface that allows the host to implement and register it, enabling control of features through ECS settings.

A new layouts property is introduced on container elements. The value is an array of Layout objects. The layout objects look like this:

The layout to apply is determined the following way:

Look for the first layout in the list whose targetWidth property matches the current host width. If one is found, apply it

Otherwise, look for a layout that doesn’t have a targetWidth defined. If one is found, apply it

Otherwise, apply a default Layout.Stack layout and ignore other layouts in the list

Spec for Layout.Flow

Sample Card:

Is there some unit test could be added for this feature? If a card with nested layout could be added to ensure is working would be great.

Is there some unit test could be added for this feature? If a card with nested layout could be added to ensure is working would be great.

The NestedFlowLayout example is already added in the samples.

repo: microsoft/Teams-AdaptiveCards-Mobile


text:
Possible regression in conditional types using typescript@4.0.2

TypeScript Version:  4.0.2

Search Terms: conditional, regression, 4.0.2
Code
type Selector<T> = (selector: T) => any

type Value<T extends Selector<any>> = ReturnType<T> extends string[]
  ? ReturnType<T>[0][]
  : ReturnType<T> extends string
  ? ReturnType<T>[]
  : never

function buildQuery<T = any, S extends Selector<T> = Selector<T>>(selector: S, values: Value<S>) {
  values.forEach(value => {
     // do things with the value
  })
}

Expected behavior:
Using typescript@3.9.5 it used to be the following type (string[] & ReturnType<S>)[0] which can be seen here
Actual behavior:
Using typescript@4.0.2 the type definition changes to an implicit any which can be seen here
Playground Link: See above
Related Issues:  I did not find any similar issues.
If any more information is required let me know!

This is working as expected now - ReturnType<T> where T is a selector will always resolve to any, and any resolves to both conditional type branches, so you end up with array element types (string[] & ReturnType<S>)[0] and string & ReturnType<S> (realistically, when S is instantiated, these will all collapse to any, but it's not, so it isn't). These two options mean we have a union of two different array types, meaning values is a union of types, and we're doing .forEach on it. The value parameter type isn't the same across those two overloads, so we type it any (or require a type annotation by issuing an implicit any error with noImplicitAny on).
Even in 3.9.2, you can actually witness the same behavior if you change Selector to return unknown, rather than any (so it doesn't trigger the buggy behavior we previously had).

authors: traverse weswigham

repo: microsoft/TypeScript


text:
createCompilerHost cannot resolve 'lib' field from compiler options.

TypeScript Version:  4.0.3

Search Terms:

Could not resolve the path
lib
dom
esnext

Code
import fs from 'fs-extra';
import {
  CompilerOptions,
  createCompilerHost,
  createProgram,
  Diagnostic,
  getPreEmitDiagnostics,
} from 'typescript';
import readTSConfig from './read-tsconfig';
import readConfigWithCWD from './read-config-with-cwd';

interface OutputFile {
  name: string;
  data: string;
}

export default async function compileTypes(noEmit = true): Promise<Diagnostic[]> {
  const tsconfig = await readTSConfig();
  const config = readConfigWithCWD();
  const baseConfig: CompilerOptions = {
    ...tsconfig.compilerOptions,
    outDir: config.outDir,
    emitDeclarationOnly: true,
    moduleResolution: 2,
    noEmit,
  };
  // Create a Program with an in-memory emit
  const host = createCompilerHost(baseConfig);

  const files: OutputFile[] = [];

  host.writeFile = (name, data) => {
    files.push({
      name,
      data,
    });
  };

  // Prepare and emit the d.ts files
  const program = createProgram(
    [readConfigWithCWD().srcFile],
    baseConfig,
    host,
  );

  const result = program.emit();

  await Promise.all(
    files.map((file) => fs.outputFile(file.name, file.data))
  );

  return getPreEmitDiagnostics(program)
    .concat(result.diagnostics);
}

Example TSConfig:
{
  "exclude": ["node_modules"],
  "include": ["src", "types"],
  "compilerOptions": {
    "module": "ESNext",
    "lib": ["ESNext"],
    "importHelpers": true,
    "declaration": true,
    "sourceMap": true,
    "rootDir": "./src",
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "node",
    "jsx": "react",
    "esModuleInterop": true,
    "target": "ES2017"
  }
}

Expected behavior:
If the source file/directory does not have any compile-time errors, as well as has the valid tsconfig format, the diagnostics emitted by the program will be empty.
Actual behavior:

Interestingly, if the whole lib filename is provided (e.g. lib.esnext.d.ts), the path is resolved correctly. I assume that the lib values are not formatted before being read
Playground Link:
Related Issues:

This is the same API tsc uses, so I can assure you it's not fundamentally broken as is being described here.
I'm guessing your implementation of ./read-tsconfig is wrong - you need to go through the compiler API to turn the config file into a working CompilerOptions object. We may be able to assist with a more complete code sample but ultimately this is a bug in the sample, not a TS bug.

Here's read-tsconfig
import path from 'path';
import fs from 'fs-extra';
import { CompilerOptions, TypeAcquisition } from 'typescript';
import readConfig from './read-config';

export interface TsConfig {
  compilerOptions: CompilerOptions;
  exclude: string[];
  compileOnSave: boolean;
  extends: string;
  files: string[];
  include: string[];
  typeAcquisition: TypeAcquisition;
}

let TSCONFIG: Partial<TsConfig>;

export function getTSConfigPath(): string {
  return path.resolve(path.join(process.cwd(), readConfig().tsconfig));
}

export default async function readTSConfig(): Promise<Partial<TsConfig>> {
  if (TSCONFIG) {
    return TSCONFIG;
  }

  // Read config
  TSCONFIG = await fs.readJSON(getTSConfigPath()) as Partial<TsConfig>;

  return TSCONFIG;
}

and I also tried logging the json file:

you need to go through the compiler API to turn the config file into a working CompilerOptions object (i.e. not just JSON.parse)

Is the shape of CompilerOptions different than the compilerOptions field from tsconfig.json?

Well that was very hard to find.
Reference: https://github.com/microsoft/TypeScript/issues/5276
import { CompilerOptions, convertCompilerOptionsFromJson } from 'typescript';
import readConfig from './read-config';
import readTSConfig from './read-tsconfig';

export default async function readValidCompilerOptions(): Promise<CompilerOptions> {
  return convertCompilerOptionsFromJson(
    (await readTSConfig()).compilerOptions,
    process.cwd(),
    readConfig().tsconfig,
  ).options;
}

authors: LXSMNSYC RyanCavanaugh


text:
Named generics (or generic maps) for partial generic application (and inference for those that aren't passed)

Suggestion
🔍 Search Terms

#26242
Partial Generics
Generic maps
Generic objects
Generic inference

✅ 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
We have all heard or seen this PR: #26242 which outlines the technical merits of allowing inference on some, but not all generics. What I am proposing in addition to that core concept is either

A new way of partially applying generics via an object-like syntax
Better support for generic inference in generic objects

📃 Motivating Example
Here is a tweet thread (with codesandbox examples) detailing some of the motivations for this feature: https://twitter.com/tannerlinsley/status/1363926547489456129
💻 Use Cases

Allowing users to customize only some generics for a type or function without needing to know the number of generics, eg. no LibraryType<*, *, *, *, *, *, TData> // Oops! LibraryType expected 5 generic arguments, not 7.
In the tweets and codesandboxes in that tweet, you can see some potential workarounds for allowing this type of behavior, but both are limited in either TS's ability to infer types nested in an object literal, or the ability for Ts to infer all generics after user-supplied ones (#26242 would fix this, but would still have the issue of Type<*,*,*,*,*,TDData>)

It appears this has a PR already here: #23696. Closing!


text:
Type-only export causes no exported member error in generated .d.ts file

Bug Report

🔎 Search Terms

"export type"
typeof
"has no exported member"
"type only export"
🕗 Version & Regression Information

This is the behavior I observed in versions: 4.5.0-dev.20210917, 4.4.3, 4.3.5, 4.2.4, 4.1.6
It did not occur in versions: 4.0.8, 3.9.10, 3.8.3
⏯ Playground Link

Sorry, I could not find a way to reproduce this in the bug workbench. Here is an attempt, but I could not find a way to disable angle brackets from being interpreted as JSX. Additionally, the error occurs when consuming generated .d.ts output, rather than in the initial compile pass.
💻 Code

// @filename: button.ts
import {classMap} from './lit.js';
export const c = classMap();

// @filename: lit.ts
class ClassMapDirective {}

export type {ClassMapDirective};

export const directive =
  <C>(class_: C) =>
  () => ({
    directive: class_,
  });

export const classMap = directive(ClassMapDirective);

The problem occurs in the generation of the .d.ts file for button.ts. The output is:
// @filename: button.d.ts
export declare const c: {
    directive: typeof import("./lit.js").ClassMapDirective;
};

🙁 Actual behavior

Compiling the generated button.d.ts file results in an error:
button.d.ts:2:42 - error TS2694: Namespace '"/home/aomarks/scratch/tsbug/lit"' has no exported member 'ClassMapDirective'.

2     directive: typeof import("./lit.js").ClassMapDirective;
                                           ~~~~~~~~~~~~~~~~~

🙂 Expected behavior

The generated button.d.ts file should compile without errors.
One thing I noticed is that removing the typeof operator from the generated button.d.ts file seems to fix the error. I wonder if this bug is related to that. Could it be that a symbol which is exported with a type-only export is already a type, unlike a normal export, so the use of a typeof operator is redundant and invalid, since typeof expects the LHS to be a value?

Pretty sure https://github.com/microsoft/TypeScript/pull/40985 is the change that broke this

authors: andrewbranch aomarks


text:
Can I get "narrowing to never" behavior on a non-union type?

Bug Report

🔎 Search Terms
narrow non-union never
narrow record never
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about "narrow" and "never".

(I tested on the Playground with v3.3.3333, v4.0.5, v4.6.0-dev.20211201.)
⏯ Playground Link
Playground link with relevant code
💻 Code
export function impossible(_value: never): never {
    throw new Error('impossible! (according to static types)');
}

// This is how we define errors for some of our operations.
export type Operation1Error =
    | {type: 'not_found'}
    | {type: 'not_authorized', details: string};

// We use this pattern to handle errors. If someone adds a new option to
// Operation1Error, TS will tell us we need another branch.
function f1(err: Operation1Error): void {
    if (err.type === 'not_found') {
        // ...
    } else if (err.type === 'not_authorized') {
        // ...
    } else {
        throw impossible(err);
    }
}

// Some of our operations currently have just a single type of error.
export type Operation2Error =
    | {type: 'not_found'}

// This doesn't work as well -- TS doesn't allow us to use the same pattern.
function f2(err: Operation2Error): void {
    if (err.type === 'not_found') {
        // ...
    } else {
        // TS error: Argument of type '{ type: "not_found"; }' is not assignable to parameter of type 'never'.
        throw impossible(err);
    }
}

🙁 Actual behavior
In f2, I get a type error on impossible(err).  (See comment in code sample.)
🙂 Expected behavior
In f2, I was hoping that err gets narrowed to never and I don't get a type error when using impossible(err).

Duplicate of #38963.

If you have something that is currently 1 case but will eventually be more than 1, you can use a workaround
export type Operation2Error =
    | {type: 'not_found'}
    | {type: never}

authors: MartinJohns RyanCavanaugh cakoose


text:
The performance of ReadonlyArray in union is different from others

Bug Report

🔎 Search Terms

🕗 Version & Regression Information

4.5.4

⏯ Playground Link

Playground link with relevant code
💻 Code

type num = 1 extends number ? true : false
// result is true

type numUnion = 1 | number
// result is number

type readOnlyArr = number[] extends ReadonlyArray<number> ? true : false
// result is true

type readOnlyArrUnion = number[] | ReadonlyArray<number>
// result is number[] | readonly number[]     why different ??

🙁 Actual behavior

why different in second ?

🙂 Expected behavior
only show ReadonlyArray<number>

Unions reduce base on the stricter subtype relation, whereas conditional types are evaluated based on the assignability relation.

I think the question was rather about why number[] | readonly number[] isn't subject to subtype reduction while 1 | number is.  The answer is that it is, but isn't done eagerly:
declare const foo: { a: number } | { a: number, b: string };
declare const bar: number[] | readonly number[];

const x = foo ? foo : foo;
//    ^? const x: { a: number }
const y = bar ? bar : bar;
//    ^? const y: readonly number[]

authors: RyanCavanaugh fatcerberus heretic-G


text:
When using disposable, typescript should never report the variable as unused

🔍 Search Terms
"using", "dispose", "asyncDispose", "is declared but its value is never read"
✅ Viability Checklist

[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 our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

⭐ Suggestion
TypeScript reports variables declared via using as unused if they aren't used explicitly, but I would argue that they are used implicitly and shouldn't be reported as unused in any case.
📃 Motivating Example
TypeScript Playground link
💻 Use Cases

What do you want to use this for?
What shortcomings exist with current approaches?
What workarounds are you using in the meantime?

Sometimes I just want the using for creating a mutex lock, and I don't need to interact with the variable in any way.
Workaround is to prefix the variable with _

I would argue that it should be reported as unused. I believe in the majority of cases you actually want to use the resource for something, and not only treat it as an automatic scope. For those cases prefixing with an underscore is a good workaround.
Instead a proposal should be made to TC39 to support using declarations that don't bind any variable.

I agree; I think it looks wrong enough that the _ prefix, if it was really intended to be unused by explicit code, is really valuable.

https://github.com/tc39/proposal-discard-binding
I guess I have to wait for this.


text:
Check for optional property expanded with spread operator is skipped

🔎 Search Terms
"spread operator", "optional property"
🕗 Version & Regression Information

This is the behavior in every version in Playground.

⏯ Playground Link
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgCJzHZBvAUMg5GAe2IC5kBnMKUAcwG59CAjOKC62kR3AX1y5QkWIhQB5AA5hgxEHAA26TDmYES5KjXpNCyNlAD8nbTyYDcAekvIAwnEooAjBQCiUKMShWbAPmQACp6S0GAAnsgA5AaRyMCUyAC28ZT0cSDI4SFR2PpwAF7GWtx0yAA+yACuIAAmEDCgEDUMRKQmJS18sSyVYMhQEACOlcADNemZYdmRynCRAHS4CHLUyABuipUQLmgYWAC8qnoaFJEAYuLikQA0asjzD9hs+RQARABC7K98t3xMPnYHCgAEwUAByxGQ7k8UGQhnhSxWfQ2Ci2oOQUhkckUs2QhzwxzaUTOpBudwe8yeBTenyg31+-2sgMcyAAzG4PF4Af4ACpTFCRXInYo6PIvEVmZBdOIJEDEPoOVJ0eQsBQoMCQrICzGyeRKPYLbkYlgAKwgCD6CmAIkUSTgETkCgilBCCGAMAiAGs5QB3DKSYKhYAQSjXZBwWpRZ6xGrEEPIOV9CAAD3ifVAk2mOux+swhuWIFWKK27Ix0l1OL2eKOhGF51Jtz0z1OtLJf2YQA
💻 Code
interface Data {
    foo: string;
    bar: string;
}

interface OptionalData {
    foo: string;
    bar?: string;
}

// Case 1: Error
// > Property 'bar' is missing in type '{ baz?: string | undefined; foo: string; }' but required in type 'Data'.
const value1: Data = {
    foo: 'FOO',
    ...{baz: "Bar"},
};

// Case 2: No Error ???
const value2: OptionalData = {
    foo: 'Foo',
    ...{baz: "Bar"},
};

// Case 3: Error
// > Type '{ foo: string; baz: string; }' is not assignable to type 'OptionalData'.
// > Object literal may only specify known properties, and 'baz' does not exist in type 'OptionalData'.
const value3: OptionalData = {
    foo: 'Foo',
    baz: 'Bar',
};

🙁 Actual behavior
In all cases, bar is misspelled as baz
In cases 1 and 3, typos can be detected as errors.
However, in case 2, the compilation succeeds without any errors.
🙂 Expected behavior
In all cases, typos can be detected as errors.
Additional information about the issue
I found this bug when I was writing the following code with exactOptionalPropertyTypes set to true.
return {
    foo,
    ...(bar !== undefined ? { bar } : {}),
};

The Excess Property Check[^1] is not (currently) done for spreads.  See https://github.com/microsoft/TypeScript/issues/39998.
[^1]: Note that, in general, EPC is primarily designed as a lint check and is intentionally not comprehensive.


text:
Support dynamic file names with project root path

Fixes #35094 and #35091

@typescript-bot cherry-pick this to release-3.7

@typescript-bot cherry-pick this to release-3.7


text:
Preserve module marker in es2015+ module emit for tool compatibility

Fixes #38696

@typescript-bot pack this
CC @JasonGore

@typescript-bot cherry-pick this into release-3.9

How do I get Typescript to NOT keep the empty export code?
It breaks the ability to compile code with no exports and have it run in the browser.

authors: DanielRosenwasser WORMSS weswigham


text:
feat: add closest node util

Fixes #

use case:
const transformer = <T extends ts.Node>(context: ts.TransformationContext) => (rootNode: T) => {
    function visit(node: ts.Node): ts.Node {
        if (ts.isIdentifier(node) && node.text === 't') {
            const parentNode = ts.getClosestNode(node, ts.isCallExpression)
            // The `parentNode` is closest `CallExpression` node.
        }
        return ts.visitEachChild(node, visit, context)
    }
    return ts.visitNode(rootNode, visit)
}
ts.transform(ts.createSourceFile(
  /** fileName */'',
  /** sourceText */ sourceText,
  ts.ScriptTarget.Latest,
  /** setParentNodes?: boolean */ true,
  ts.ScriptKind.TSX
  ),
  [transformer]
);

@sandersn OK, Move findAncestor to public.

@sandersn

@sandersn @a-tarasyuk


text:
WSL 2.0.7 bridge mode doesn't work on Win 10 Pro without extra hackery

Windows Version
Microsoft Windows [Version 10.0.19045.3636]
WSL Version
2.0.7.0
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
5.15.133.1-1
Distro Version
Fedora 39
Other Software
not important, it doesn't get that far
Repro Steps
PS C:\Users\MaZe> wsl --version
WSL version: 2.0.7.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.19045.3636
PS C:\Users\MaZe> wsl
Failed to configure network (networkingMode Bridged). To disable networking, set wsl2.networkingMode=None in C:\Users\MaZe.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HCS/0x8037010d
this is with
PS C:\Users\MaZe> type ..wslconfig
[wsl2]
dhcp = false
ipv6 = true
networkingMode = bridged
vmSwitch = External
and hyperV switch created External bridge
Expected Behavior
it should use the ready bridge
Actual Behavior
it errors out (see above)
Note that bridging can be made to work, by not putting networkingMode/vmSwitch in .wslconfig and instead manually changing the WSL bridge to be 'external' mode in HyperV switch manager.
This is just annoying to do, because it means the system boots with broken networking, and then needs to be manually fixed...
Diagnostic Logs
No response

note that the failure is different if the named bridge doesn't actually exist, for example:
PS C:\Users\MaZe> wsl
The VmSwitch 'NameOfAVMSwitchThatDoesNotExist' was not found.
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/WSL_E_VMSWITCH_NOT_FOUND
so if you specify an existing VmSwitch, it does find it and it tries to use it... just something goes wrong
as a Linux kernel dev myself I'm guessing this is some stupid typo and can be fixed with a few lines of code...
(but of course who knows)

+@craigloewen-msft, I'm pretty sure we never released bridged mode as a supported/documented feature. If the state of the universe has changed I'll let craig update this bug.

Considering bridge mode works, and it's just missing integration in the startup scripts to prevent one from having to manually set it up on every boot, that's a pity.

Considering bridge mode works, and it's just missing integration in the startup scripts to prevent one from having to manually set it up on every boot, that's a pity.

@zenczykowski did you have a workaround? My personal laptop is on Windows 10 Pro, and neither bridged nor mirrored (#10823) networking mode are supported.

The workaround is basically to manually reconfigure things after every
reboot.
Basically going into HyperV switch manager and manually forcing the WSL
bridge to bridge with the external wired nic [ie. External vSwitch mode].
Unfortunately this has a tendency to fail (by virtue of already being
busy/used by vSwitch/hyperV), so you also have to go into CMD+I -> network
configuration of the external nic and manually toggle it's vSwitch/hyperV
setting (and then try again).
It's... finicky, but I can always get things working in a minute or two,
and once it does, you're good until you reboot.
But note that this is with wired ethernet.
Wireless simply doesn't support bridging (it's basically a fundamental
limitation of wireless protocols, needing WDS for bridging which just isn't
very standardized nor well supported by wireless clients).
Also note I bought Win10 Pro thinking it would help, but I did have things
working with Win10 non-pro as well (previously), with just a normal (non
hyperv I think) bridge... the issue there was mostly that the normal bridge
driver would periodically panic the machine.  Eh, the wired broadcom nic in
this 27" 2013 iMac has a terrible windows driver: I have to turn off some
large receive/transmit and checksum offload to get good performance (in
Windows), and get DHCP working in WSL2.  I'd have never figured it out if I
wasn't actually a network developer...
Anyway, nowadays I don't really care any more.  I only use Win10 for gaming
(the hw is just slightly too old for Win11 so I can't upgrade it), and my
dev machines are all Linux based.
On Sat, Jun 1, 2024 at 7:37 PM Mike @.***> wrote:

Considering bridge mode works, and it's just missing integration in the
startup scripts to prevent one from having to manually set it up on every
boot, that's a pity.
@zenczykowski https://github.com/zenczykowski did you have a
workaround? My personal laptop is on Windows 10 Pro, and neither bridged
nor mirrored (#10823 https://github.com/microsoft/WSL/issues/10823)
networking mode are supported.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/10711#issuecomment-2143525933,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABAR64AAQGQ3J7F5YAHKILZFIBHDAVCNFSM6AAAAAA65OBXZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGUZDKOJTGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

@zenczykowski thanks so much for the detailed response. I unfortunately only use WiFi to connect to the Internet with this laptop. Even if I was on Ethernet, the process you described sounds too cumbersome since I'd have to do that every time I reboot. I wanted to use my personal laptop to tinker, but I guess I can do that on my work laptop. Thanks again!

authors: onwardmk pmartincic zenczykowski

repo: microsoft/WSL


text:
WSL2 X11 output corruption

Windows Version
Version	10.0.22631 Build 22631
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
5.15.133.1-1
Distro Version
Ubuntu-22.04
Other Software
Any and all applications that use xlib or X Windows.
Repro Steps
Launch an xeyes, or emacs.
Expected Behavior

Actual Behavior

Diagnostic Logs
Nothing in logs to report.

I have tried multiple versions of NVIDIA drivers. Doesn't appear to be a driver issue. Appears to be and issue with the internal X window server.


text:
which command can be use to replace 'systemctl deamon-reload'

Environment
ubuntu Release:        20.04

i want to set the docker proxy and then refresh it by using 'systemctl deamon-reload',but got 'Unknown operation deamon-reload'.try 'chkconfig docker --add' then got 'chkconfig: command not found'. i had search in many ways  but isn't working.

systemctl is #1579. There is a discussion thread about running docker inside WSL2 at #4872. The OP of that thread was about Debian, but the discussion applies just as well to any distro. Or feel free to open a new discussion for your use case.

systemctl is #1579. There is a discussion thread about running docker inside WSL2 at #4872. The OP of that thread was about Debian, but the discussion applies just as well to any distro. Or feel free to open a new discussion for your use case.

authors: jevonsnotes therealkenc


text:
Ubuntu 22.04 WSL2 opens to GUI with blank screen

Version
Microsoft Windows [Version 10.0.22000.739]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.102.1
Distro Version
Ubuntu 22.04
Other Software
Docker Desktop 4.9.1
Repro Steps
Go to Microsoft store, search for Ubuntu 22.04, install, open.
Expected Behavior
I expect that at the GUI I could create an user.
Actual Behavior
The GUI is blank, cannot create an user.
Diagnostic Logs

Oh, btw, I have Lenovo X1 Nano 1st gen and it indeed has the Intel gpu.

Same for me.  Intel 12th gen Core i7.  From the error output, seems like some fonts or config files missing.  May be the files needed by the Ubuntu OOBE.

I've worked around this using text UI profile setup.

Install Ubuntu 22.04 from Microsoft Store.
Launch Ubuntu 22.04.
Once OOBE unpacks completed and shows the blank "Ubuntu WSL" windows, simply close the window.

It will bring up the Ubuntu console window as root user.  Close this console window.

Open PowerShell and run the following.  It brings up the text mode tui profile setup instead.wsl --shutdown
wsl --unregister Ubuntu-22.04
ubuntu2204.exe --ui=tui

We do not own the Ubuntu 22.04 app. This should be reported to the folks at Canonical.

Posted at launchpad Ubuntu Wsl Bug #1979881

Quick test to know if it's gpu related. From Ubuntu22.04 bash run:
sudo LIBGL_ALWAYS_SOFTWARE=1 /usr/libexec/wsl-setup
If it shows the window correctly then it's a problem with with the indel windows driver.

Quick test to know if it's gpu related. From Ubuntu22.04 bash run: sudo LIBGL_ALWAYS_SOFTWARE=1 /usr/libexec/wsl-setup
If it shows the window correctly then it's a problem with the intel windows driver.

I tried this , it shows the setup properly after running this command but when you fill all the details and click finish setup , it crashes the pc
Running : Latest intel beta driver (30.0.101.3113) & latest windows 11 pro insider build 25151 _220625-1835

@pawangond That's a known issue for build 25151. They are investigating it.

My Problem Windows 11 ;(

Debian (WSL 2) should be good alternative. Stable enough👌

This happen to me with WSL2 from the MS Store and Ubuntu 22.04.1

Don't know when they gonna release a fix

FYI - I was trying to fix something before I had my coffee, but be aware the solution posted erases all your data. Don't be like me.

wsl --shutdown
wsl --unregister Ubuntu-22.04
ubuntu2204.exe --ui=tui
ubuntu2204 config --default-user

People should be warned that wsl --unregister will destroy all their data in the distribution.

authors: EOM benhillis edurojasr framerate gnsmrky jacobus onomatopellan pawangond soumesh2002 thesalmonidae


text:
Pods stuck in "Terminating" state on Windows nodes when deleting the pod after docker restart

We are using MCR version 20.10.9 (https://docs.mirantis.com/mcr/20.10/release-notes/20-10-9.html) and we have seen that after restarting the docker service and deleting a pod, the pod gets stuck at "Terminating" state. Describing the pod shows:
container ecddba6213ecd857171e6af11988979b5f0d16629509ad6f42385147ab24f2d9: driver "windowsfilter" failed to remove root filesystem: failed to detach VHD: failed to open virtual disk: The process cannot access the file because it is being used by another process.: rename C:\ProgramData\docker\windowsfilter\ecddba6213ecd857171e6af11988979b5f0d16629509ad6f42385147ab24f2d9 C:\ProgramData\docker\windowsfilter\ecddba6213ecd857171e6af11988979b5f0d16629509ad6f42385147ab24f2d9-removing: Access is denied.

Kubelet logs:
I0309 16:38:47.933233    2040 kuberuntime_container.go:661] "Killing container with a grace period override" pod="default/windows-log-test-6c9956b86d-t5jcp" podUID=9afb7084-8a8d-4239-8d7c-18176c80ae21 containerName="winloggertest" containerID="docker://8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2" gracePeriod=30
I0309 16:38:47.933773    2040 fake_topology_manager.go:47] "RemoveContainer" containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"
E0309 16:38:47.945199    2040 remote_runtime.go:296] "RemoveContainer from runtime service failed" err="rpc error: code = Unknown desc = failed to remove container \"8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2\": Error response from daemon: container 8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2: driver \"windowsfilter\" failed to remove root filesystem: failed to detach VHD: failed to open virtual disk: The process cannot access the file because it is being used by another process.: rename C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2 C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2-removing: Access is denied." containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"
E0309 16:38:47.945199    2040 kuberuntime_gc.go:146] "Failed to remove container" err="rpc error: code = Unknown desc = failed to remove container \"8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2\": Error response from daemon: container 8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2: driver \"windowsfilter\" failed to remove root filesystem: failed to detach VHD: failed to open virtual disk: The process cannot access the file because it is being used by another process.: rename C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2 C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2-removing: Access is denied." containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"

Using kubectl delete pod --force did clean the pod from the cluster but according to kubelet logs, it keeps trying to remove the old container with no luck:
I0309 16:50:48.263635    2040 kuberuntime_container.go:661] "Killing container with a grace period override" pod="default/windows-log-test-6c9956b86d-t5jcp" podUID=9afb7084-8a8d-4239-8d7c-18176c80ae21 containerName="winloggertest" containerID="docker://8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2" gracePeriod=30
I0309 16:50:48.264169    2040 fake_topology_manager.go:47] "RemoveContainer" containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"
E0309 16:50:48.275910    2040 remote_runtime.go:296] "RemoveContainer from runtime service failed" err="rpc error: code = Unknown desc = failed to remove container \"8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2\": Error response from daemon: container 8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2: driver \"windowsfilter\" failed to remove root filesystem: failed to detach VHD: failed to open virtual disk: The process cannot access the file because it is being used by another process.: rename C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2 C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2-removing: Access is denied." containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"
E0309 16:50:48.275910    2040 kuberuntime_gc.go:146] "Failed to remove container" err="rpc error: code = Unknown desc = failed to remove container \"8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2\": Error response from daemon: container 8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2: driver \"windowsfilter\" failed to remove root filesystem: failed to detach VHD: failed to open virtual disk: The process cannot access the file because it is being used by another process.: rename C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2 C:\\ProgramData\\docker\\windowsfilter\\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2-removing: Access is denied." containerID="8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2"

Searching for handles on this path shows that System process holds sandbox.vhdx:
System	4	File	C:\ProgramData\docker\windowsfilter\8a26af90e71ec6eb8b8015253d6b76001d5efde3bd26e587eef9b8a8218ed2e2\sandbox.vhdx

Environment:

Kubernetes version: v1.21.5
OS version: Windows Server 2019 Datacenter   10.0.17763.2565
Docker version: docker://20.10.9

We are still experiencing this issue. Could you reproduce this issue?

Hi, just following up to let you know we are currently investigating a similar issue. Nothing more to report right now though.

Hey @ilanitr, we're in the middle of a fix for this and tracking a similar issue internally (internal ID: 31661934)

No updates to share yet, but we're making progress on the fix for this.

We've already worked on a fix, but we don't have timelines to share yet of when this will be available.

@fady-azmy-msft you were the last to comment on this a while ago - has there been any progress on this item?

@jeffwmiles yes, the fix was validated internally and we expect the fix to roll out soon. I don't have a timeline to share unfortunately since this depends on our backporting priority and process but I will update the thread when it comes out.

I took am looking forward to a fix.

Any update on this? We're closing in on 2 years since a fix was developed, and it seemingly has yet to be released.

Hey all, thank you for your patience on this. We shipped the fixed for this issue with the 2024 Feb release of Windows Server 2022. Can you confirm that the issue has been solved on your end?

^ Bumping this.

Closing due to lack of response.

authors: braveness23 cwilhit fady-azmy-msft ilanitr jeffwmiles ntrappe-msft

repo: microsoft/Windows-Containers


text:
Latest Windows OS SAC and LTSC support in K8s

From SIG-Windows K8s Community : https://github.com/kubernetes/kubernetes/issues/90142

K8s community is has commited to supporting latest Windows Server LTSC release and 1-2 latest Windows SAC releases. https://github.com/kubernetes/kubernetes/issues/90142


text:
bold font in extracting all the contents.

A lot of people still asking how to build. Maybe the extracting part should be more visible

We now have separately-downloadable samples.

authors: geralexgr oldnewthing

repo: microsoft/Windows-universal-samples


text:
[Build] Ensure chaining of Directory.Build.Props files reaches the new central one for Sample apps

Description
Please include a summary of the change and/or which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Target Release
release/experimental
Checklist

[ ] Samples build and run using the Visual Studio versions listed in the Windows development docs.
[ ] Samples build and run on all supported platforms (x64, x86, ARM64) and configurations (Debug, Release).
[ ] Samples set the minimum supported OS version to Windows 10 version 1809.
[ ] Samples build clean with no warnings or errors.
[ ] [For new samples]: Samples have completed the sample guidelines checklist and follow standardization/naming guidelines.
[ ] If I am onboarding a new feature, then I must have correctly setup a new CI pipeline for my feature with the correct triggers and path filters laid out in the "Onboarding Samples CI Pipeline for new feature" section in samples-guidelines.md.
[ ] I have commented on my PR /azp run SamplesCI-<FeatureName> to have the CI build run on my branch for each of my FeatureName my PR is modifying. This must be done on the latest commit on the PR before merging to ensure the build is up to date and accurate. Warning: the PR will not block automatically if this is not run due to '/azp run' limitation on triggering more than 10 pipelines.

I forgot to adjust the target branch before creating this draft PR.

repo: microsoft/WindowsAppSDK-Samples


text:
App's URL returns 404

Accessing the app's URL about 25 minutes after deployment completion returns the result below.
I've tried twice - the second time using a 'random' username in case duplication was the issue.

Same when attempting to run the standalone version of the app https://docs.microsoft.com/en-us/azure/azure-sql/database/saas-standaloneapp-get-started-deploy

@mattgillam You can also reference the Azure SaaS Development Kit (ASDK) where we have built on top of this sample solution:  https://www.github.com/azure/azure-saas

@nickpinheiro thank you I will take a look - would be great if the demo app worked as described though, unless I did something wrong (don't think so).

authors: mattgillam nickpinheiro


text:
feat(Chat): Enhance input and UI interactions

Description
This pull request improves the chat UI by adding icons, managing input behavior, and adjusting layout interactions; the main changes are:

Added icons for Send and Stop buttons.
Disabled sending when the input box is empty or contains only white spaces.
Disabled the input box while a response is in progress to prevent multiple messages being sent simultaneously.
Trimmed prompted text to remove unnecessary leading and trailing white spaces.
Enabled new line insertion with Shift + Enter, set a maximum height for the input box, and enabled scrolling when needed.
Adjusted the padding of the ScrollViewer in InvertedListView when the scroll bar is visible.

Screenshots

Tested, works well.. LGTM! Thanks :)!
Thanks! exited to keep contributing 🚀

repo: microsoft/ai-dev-gallery


text:
AttributeError: 'AssistantAgent' object has no attribute 'register_for_llm'. Did you mean: 'register_reply'?

Describe the issue
Ask what version of pyautogen will support 'register_for_llm' later, because I'm using the local model chatGLM, needs openai<1, so I use pyautogen==0.1.14, but reports an error: AttributeError: 'AssistantAgent' object has no attribute 'register_for_llm'. Did you mean: 'register_reply'?
Steps to reproduce
import autogen
from typing import Literal
from pydantic import BaseModel, Field
from typing_extensions import Annotated

# 1、建立必要配置
config_list = [
    {
        "model": "chatglm2-6b",
        "api_base": "http://localhost:8002/v1",
        "api_type": "open_ai",
        "api_key": "NULL",
    }]

# 2、大模型请求配置
llm_config = {
    "request_timeout": 600,
    "seed": 45,  # change the seed for different trials
    "config_list": config_list,
    "temperature": 0,
    "max_tokens":8192,
}

# 3、新建一个助理智能体
assistant = autogen.AssistantAgent(
    name="assistant",
    llm_config=llm_config,
    system_message="For currency exchange tasks, only use the functions you have been provided with. Reply TERMINATE when the task is done."
)

#创建名为 user_proxy 的用户代理实例，这里定义为进行干预
user_proxy = autogen.UserProxyAgent(
    name="user_proxy",
    human_input_mode="NEVER",
    max_consecutive_auto_reply=10,
    is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"),
    code_execution_config={"work_dir":"_output", "use_docker":False},
    llm_config=llm_config,
)

CurrencySymbol = Literal["USD", "EUR"]
def exchange_rate(base_currency: CurrencySymbol, quote_currency: CurrencySymbol) -> float:
    if base_currency == quote_currency:
        return 1.0
    elif base_currency == "USD" and quote_currency == "EUR":
        return 1 / 1.1
    elif base_currency == "EUR" and quote_currency == "USD":
        return 1.1
    else:
        raise ValueError(f"Unknown currencies {base_currency}, {quote_currency}")

@assistant.register_for_llm(description="Currency exchange calculator.")
@user_proxy.register_for_execution()
def currency_calculator(
base_amount: Annotated[float, "Amount of currency in base_currency"],
base_currency: Annotated[CurrencySymbol, "Base currency"] = "USD",
quote_currency: Annotated[CurrencySymbol, "Quote currency"] = "EUR",
) -> str:
    quote_amount = exchange_rate(base_currency, quote_currency) * base_amount
    return f"{quote_amount} {quote_currency}"

task1 = """How much is 123.45 USD in EUR?"""
user_proxy.initiate_chat(assistant,message=task1)

Screenshots and logs
Traceback (most recent call last):
  File "/ldata/llms/autogen/ZY/test.py", line 59, in <module>
    @assistant.register_for_llm(description="Currency exchange calculator.")
AttributeError: 'AssistantAgent' object has no attribute 'register_for_llm'. Did you mean: 'register_reply'?

Additional Information
No response

Odd. Which pyautogen version are you using?

Odd. Which pyautogen version are you using?

I have tried 0.1.14 and 0.2.3 ，the problem same.

repo: microsoft/autogen


text:
[DONT MERGE UNTIL WE TEST ESRP] Set up ADO pipeline for real-signing

This PR adds ADO pipeline for real-signing packages. Most of pipeline code are copied from dotnet/orlearns repo
The agent hasn't been configured with ESRP yet, so the running instance below is not real-signed
ADO: https://dev.azure.com/AGPublish/AutoGen.Publish
Pipeline example: https://dev.azure.com/AGPublish/AutoGen.Publish/_build?definitionId=5
Why are these changes needed?
Related issue number
#3801
Checks

[ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
[ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[ ] I've made sure all auto checks have passed.

Its hard to see from here - what are the resulting package names?

https://dev.azure.com/AGPublish/AutoGen.Publish/_build/results?buildId=15&view=artifacts&pathAsName=false&type=publishedArtifacts


text:
typo error, Properaties to Properties

Changing typo error processProperaties ==> processProperties
Sample snippet contributions
For client library sample snippets, review and follow the snippet contribution guidance

[ ] Follow organization guidelines
[ ] Use real types (avoids var)
[ ] Use Context.Log (avoids Console.WriteLine)
[ ] Sample should clean up resources they create
[ ] Avoid samples that arbitrarily destroy data

If you'll retarget this PR at main, I will merge it. Thanks!

done @vtbassmatt

authors: Abdulsametileri vtbassmatt

repo: microsoft/azure-devops-dotnet-samples


text:
Creating a directory for download tar

Creating a directory for download tar

@TingluoHuang - can we merge this please asap. Thanks.

repo: microsoft/azure-pipelines-agent


text:
NugetCommand does not use Azure Credential Provider for Linux

Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: NugetCommand
Environment

Server - Azure Pipelines

Issue Description
When using the NugetCommand task on a Linux agent, a warning is spit out by nuget.

WARNING: The credential plugin model used by '/home/vsts/work/_tasks/NuGetCommand_333b11bd-d341-40d9-afcf-b32d5ce6f23b/2.164.0/CredentialProvider/CredentialProvider.TeamBuild.exe' is deprecated. Please contact the provider of the plugin for an alternative. More information about the recommended plugin model can be found at 'https://aka.ms/nuget-cross-platform-authentication-plugin'.

We are also seeing this old plugin crash sometimes, providing instability to our builds.
Therefore we'd like to update to the new plugin model. It looks like some logic was added to the NugetCommand task to use the next version of the credential plugin, but it's Windows only (#8367).
One option would be to integrate with the recently added= task NugetAuthenticate. The NugetCommand task currently does not use the plugin setup by the NuGetAuthenticate task.

The fix to this issue will be blocked by #12524

The NuGetAuthenticate task is intended to be used with a script task instead of the NuGetCommand task, so we just set up authentication and get out of the way and you can call nuget.exe however you want

Ah, gotcha, thanks for the explanation. In that case, this issue is not blocked by #12524 but is still an issue all the same.

Hey @schultetwin1 - are you able to use NugetAuthenticate and script instead of NugetCommand? That is our recommended path moving forward.

Hi @herenhuang, definitely! Currently we use NugetAuthenticate and a script instead of NugetCommand.
I had this issue open to point out that if you run NugetAuthenticate to install the Azure Credential Provider plugin, and then use NugetCommand, NugetCommand will not use that plugin.
Up to you guys how you want to proceed.

Got it! We've got it in our bug log. And to confirm, this isn't currently blocking right?

Thank you!!

And to confirm, this isn't currently blocking right?

That is correct. This isn't currently blocking.

authors: herenhuang jmyersmsft schultetwin1

repo: microsoft/azure-pipelines-tasks


text:
[PublishTestResultsV1] Fix critical security issues

Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: PublishTestResultsV1
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Issue Description
Compliance build started to report new critical security alerts since 12/08.
To reproduce this issue: run npm audit
PublishTestResultsV1 task right now has 1 critical issue.
Audit log attached.
Task logs
PublishTestResultsV1.json.txt
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Created PR: https://github.com/microsoft/azure-pipelines-tasks/pull/15699


text:
[BUG]: Behavior mismatch when using scale command between pipeline and regular powershell terminal

Task name
Kubernetes
Task version
1
Environment type (Please select at least one enviroment where you face this issue)

[X] Self-Hosted
[ ] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 10
Task log
Starting: Resume XYZ Service
==============================================================================
Task         : Kubectl
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands
Version      : 1.227.0
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-kubectl-tsg
==============================================================================
==============================================================================
			Kubectl Client Version: v1.27.2
			Kubectl Server Version: v1.24.15
==============================================================================
"F:\AzureAgents\Agent 2\_work\_tool\kubectl\1.27.2\x64\kubectl.exe" scale -n mynamespace --replicas='1' deployment/mydeployment -o json
error: invalid argument "'1'" for "--replicas" flag: strconv.ParseInt: parsing "'1'": invalid syntax
See 'kubectl scale --help' for usage.
commandOutput
##[error]The process 'F:\AzureAgents\Agent 2\_work\_tool\kubectl\1.27.2\x64\kubectl.exe' failed with exit code 1
Finishing: Resume XYZ Service

Relevant log output
error: invalid argument "'1'" for "--replicas" flag: strconv.ParseInt: parsing "'1'": invalid syntax

Aditional info
When executing locally, same kubectl version against the same aks cluster it works as expected with either '1' (single quotes), "1" (double quotes) or 1 (no quotes):

PS C:\Users\RM> kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.24.15
PS C:\Users\RM> kubectl scale -n mynamespace --replicas="1" deployment/mydeployment
deployment.apps/mydeployment scaled
PS C:\Users\RM> kubectl scale -n mynamespace --replicas='1' deployment/mydeployment
deployment.apps/mydeployment scaled

Local environment:
Windows 11
PSVersion 5.1.22621.1778

bump


text:
Fixed vulnerability with nth-check package in Gradle tasks

Task name: GradleV2, GradleV3
Description: Changed versions of azure-pipelines-tasks-codecoverage-tools and azure-pipelines-tasks-codeanalysis-common to fix vulnerabilities with nth-check
Documentation changes required: N
Added unit tests: N
Attached related issue: Bug 1953810: [Component Governance Alert] - CVE-2021-3803 in nth-check 1.0.2. Severity: High #3210
Checklist:

[x] Task version was bumped
[x] Checked that applied changes work as expected (Tested by Canary pipeline at Ubuntu1804, Win19, Win22)

buddy-tested Gradle tasks, all correct, Pipeline logs attached:

GradleV2TestPipeline.zip
GradleV3TestPipeline.zip

authors: DmitriiBobreshev SvetlanaMaliugina