text:
Exception in async code

Hi,
how would ClearScript catch an exception when an error occurs in an async code segment? Take for example the following code:
`
var request = new XMLHttpRequest()
request.onreadystatechange = function () {
if (request.readyState == 4 && request.status == 200) {
try {
var json = JSON.parse(request.responseText)
  // do something with the repsonse.... now do something stupid:
  let zero = null
  zero.stupid = 42
} catch (ex) {
  // handle stupid error
}

}
}
request.open("GET", "https://jsonplaceholder.typicode.com/users", true)
request.setRequestHeader("Content-Type", "application/json")
request.send()
`
So if I hadn't placed the try/catch block the error would go undetected. Is there anything I can do in ClearScript to get an error message?

Hi @flat-eric147,
It's difficult to provide a concise answer without knowing what XMLHttpRequest is. It isn't a JavaScript built-in, so it could be a .NET type, a COM type, or perhaps something else. Can you say anything about it? How are you exposing it to the script engine?
Thanks!

Hi, apologies, I totally forgot that I added a binding to XMLHttpRequest, so yes then it's a .NET type.
I am exposing it through AddCOMType("XMLHttpRequest", "MSXML2.XMLHTTP");
So I guess that means I have no chance :)

Hi @flat-eric147,
One possibility is to modify the onreadystatechange property so that the assigned callback is always invoked within a try...catch statement. Unfortunately, you're using a COM type, so extending it or modifying its implementation is probably not an option. One thing you can still do, however, is wrap it, and JavaScript's Proxy provides a nice mechanism for that.
First, let's import the COM type without exposing it to the script engine. We can use ExtendedHostFunctions.comType for that, although it's a bit "off-label":
var xmlHttpRequest = new ExtendedHostFunctions().comType("MSXML2.XMLHTTP");

Next, let's define a function that builds a proxy for that type. The proxy will intercept construction and return a proxy to the constructed instance that adds error handling to the onreadystatechange callback:
dynamic makeProxy = engine.Evaluate(@"
    impl => new Proxy(impl, {
        construct(target, args) {
            let callback;
            return new Proxy(new target(...args), {
                get(target, name, receiver) {
                    if (name === 'onreadystatechange') {
                        return callback;
                    }
                    return Reflect.get(target, name, receiver);
                },
                set(target, name, value, receiver) {
                    if (name === 'onreadystatechange') {
                        callback = value;
                        value = function () {
                            try {
                                callback();
                            } catch (exception) {
                                // -=> HANDLE EXCEPTION HERE <=-
                            }
                        }
                    }
                    return Reflect.set(target, name, value, receiver);
                }
            });
        }
    })
");

Finally, we'll call our function to build the proxy and expose it to the script engine as XMLHttpRequest:
engine.Script.XMLHttpRequest = makeProxy(xmlHttpRequest);

Note that you can do whatever you want inside that catch clause – log the exception, invoke another host method, etc. Please let us know if this solution works for you.
Thanks!

oh boy, this makes me almost cry, it's a thing of great beauty. It works nicely! I'm glad I asked, I would have never worked that out on my own. Thank you!!!!

Thanks for letting us know! Please reopen this issue if you have additional questions or comments. Thanks again!

repo: microsoft/ClearScript


text:
No module named 'prismatic'

CogACT/vla/load.py
IDs, mappings to paper experiments, and short descriptions), as well as for loading models (from disk or HF Hub).
"""
import json
import os
from pathlib import Path
from typing import List, Optional, Union
from huggingface_hub import HfFileSystem, hf_hub_download
from prismatic.conf import ModelConfig
from prismatic.models.materialize import get_llm_backbone_and_tokenizer, get_vision_backbone_and_transform
from prismatic.models.registry import GLOBAL_REGISTRY, MODEL_REGISTRY
from prismatic.models.vlms import PrismaticVLM
from prismatic.overwatch import initialize_overwatch
from vla import CogACT
######################
the 'prismatic' module is not included in the repo

Please install the dependencies by pip install -e ., and the 'prismatic' module will be included. Related to #2.

We have modified the 'prismatic' module in this repository, and it is included as a dependency in pyproject.toml. Please feel free to make further modifications to the 'prismatic' module in the provided repository if necessary.

source: gharchive/issue

authors: Winston-Yuan arnoldland

repo: microsoft/CogACT

license: MIT

license_type: permissive

license_source: github-api


text:
Regression for WriteFile friendly overload

Actual behavior

Expected behavior
This overload used to take a byte*. byte? is definitely not right.
Repro steps

NativeMethods.txt content:

WriteFile

NativeMethods.json content (if present):

{
  "className": "WindowsPInvoke",
  "allowMarshaling": false,
  "wideCharOnly": false,
  "emitSingleFile": true
}

Context

CsWin32 version: 0.2.206-beta
Win32Metadata version (if explicitly set by project): 48.0.19-preview
Target Framework: net7.0
LangVersion (if explicitly set by project): latest

Thank you for the report. I see in the metadata that this API is declared as:
public unsafe static extern BOOL WriteFile([In] HANDLE hFile, [Optional][In][Const][MemorySize(BytesParamIndex = 2)] byte* lpBuffer, [In] uint nNumberOfBytesToWrite, [Optional][Out] uint* lpNumberOfBytesWritten, [Optional][In][Out] OVERLAPPED* lpOverlapped);

My guess is because lpBuffer isn't using the NativeArrayInfoAttribute that we decide it isn't an array. I'm not sure if the metadata should be using one or the other, but CsWin32 can be updated to recognize MemorySize as well.

authors: AArnott alexrp


text:
error CS0111: Type 'SomeType' already defines a member called 'Equals' with the same parameter types

Describe the bug
CsWinRT generates duplicate Equals methods if the underlying type in the WInMD already has an Equals() method with itself as the type parameter
To Reproduce
Create a C++WinRT component with a type that has an Equals method with itself as the equator. For example:
    runtimeclass SomeType
    {
        SomeType();

        Boolean Equals(SomeType someType);
    };

Pass the WinMD to CsWinRT.
Expected behavior
No error.
Version Info
CsWinRT 1.2.6

We should investigate the built-in support behavior in .NET Native/.NET Core to see what they do

With existing built-in .NET support for WinRT, default behavior for ToString, Equals(Object), and GetHashCode methods is provided for C# WinRT components. According to these docs, Windows Runtime classes that are written in C# or Visual Basic can override the Equals(Object) method overload.
@Scottj1s - is it possible to define/override the Equals method from a C++/WinRT component that is projected into C#/.NET 5?

Looking into the existing .NET Native support:
If we have a C++/WinRT component with the following definition:
runtimeclass Class
    {
        Class();
        Boolean Equals(Class c);
    }

Consuming this component from a .NET Native (UWP) C# application, I see two Equals methods (overloaded):
public bool Equals(Class c); // in my RuntimeComponent
public virtual bool Equals(Object obj); // in System.Runtime

It sounds like CsWinRT should probably not auto-generate the implementation of IEquatable. Thoughts?

CsWinRT should ensure the IEquatable pattern of 5 methods is enforced, picking up any methods that the runtime component implements.

I just ran into this problem :sob:.

Same problem here.
We have an old component in C++/CX which overrides Equals and when migrating to C++/WinRT got the same issue.

authors: Corillian angelazhangmsft jlaanstra pontin-pdftron

repo: microsoft/CsWinRT


text:
Verify and update the SqlPackage Linux dependencies document

SqlPackage or DacFx Version: Latest
.NET Framework (Windows-only) or .NET Core: Any
Environment (local platform and source/target platforms): Linux

Steps to Reproduce:

From the request: Need to get clarity on SQL Package dependencies in Linux environment

Per below article, In Linux environment we need to install 2 libraries to use SQLPackage
https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver16#linux-net-core
But even without libunwind library, the usage of SQLPackage was successful
Ask by cx :-
Is this library compulsory for sqlpackage to work..?? If yes, what would be the impact if it is not installed..??
Did this occur in prior versions?  If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)

Libraries libicu and libunwind are getting added while installing the Ubuntu!

repo: microsoft/DacFx


text:
Inference transformer issue with sequence length >1024

Hi,
I'm trying to use DeepSpeedTransformerInference, and am getting the following error whenever the sequence length is higher than 1024:
RuntimeError: CUDA error: too many resources requested for launch
For sequence lengths up to 1024 it works great, including with much larger batch sizes.
This is some minimal code which reproduces the error:
import torch
from deepspeed.ops.transformer.inference.transformer_inference import DeepSpeedInferenceConfig, DeepSpeedTransformerInference

hidden = 512
batch = 1
seqlen = 2048

config = DeepSpeedInferenceConfig(
    hidden_size=hidden,
    heads=32,
    fp16=True,
    num_hidden_layers=8)

layers = [DeepSpeedTransformerInference(config).half().cuda().requires_grad_(False) for i in range(8)]

inputs = torch.rand([batch, seqlen, hidden], device="cuda", dtype=torch.half)
input_mask = torch.ones([batch, seqlen], device="cuda", dtype=torch.half)
x = inputs
for i, layer in enumerate(layers):
    print(i)
    x = layer(x, input_mask=input_mask)

Thanks

Hi @opherlieber
Thanks for reporting this.
I will work on this to solve the issue soon. By the way, can you tell me what model architecture is this for? I see you are just creating the layers on your own with some random dimensions, or is it related to some model specification?
Thanks,
Reza

Thanks a lot for the support!
The dimensions here are just for the example, I have various architectures I'd like to try and apply this too.
Can you also maybe give some info about the 'specialized_mode' ? It looks like it fuses/optimizes the ops for the case of decoding with past K/V values, but It seems I'm missing the 'InferenceSpecializedBuilder' to get it enabled. Is there any plan to release this, and do you have any numbers about how much it helps?
Thanks

Hi @opherlieber,
I believe this PR  should fix the issue you were seeing with larger sequence-length.
The specialized kernels are the high-performance version of the inference kernels that fuse the operations at deeper level, such as combining all the attention part in just one kernel as you mentioned (you can find more information in our inference-blog). The benefit of performance improvement varies based on network's architectures/dimensions (50% to 2x speedup over the current version of the inference kernels). We are working on a plan to release the code in near future.
Thanks,
Reza

Works great, thanks!

authors: RezaYazdaniAminabadi opherlieber

repo: microsoft/DeepSpeed


text:
Fix shaders not compiling with spaces in the path

When compiling shaders, if your file path contains spaces it will fail to compile shaders, this PR fixes that.

Thanks for the fix. I did this change to help meeting some new vcpkg requirements, but had a lot of problems with quotes there. I'll try this one out and see if it fixes those problems.

Fixed the same problem in DirectX Tool Kit
https://github.com/microsoft/DirectXTK/commit/89db7aa40a57a85b5f5921ecd15526aaf6088d97
https://github.com/microsoft/DirectXTK12/commit/e33307720d1152d8778012c06972dd52c48cb89e
Looks like it works great for vcpkg too. Much appreciated!

No problem, glad I could help!

source: gharchive/pull-request

authors: AnthonyFuller walbourn

repo: microsoft/DirectXTex


text:
[C#] FasterLogIterator.CompleteUntilRecordAt() should not verify checksum of the record, even if checksumming is enabled

CompleteUntilRecordAt() currently fails occasionally due to checksum failures. This is because the AsyncGetHeaderOnlyFromDiskCallback method reads only enough data in to capture the header. The solution is to never verify checksum in GetRecordLengthAndFree()--this should be "safe" since this method is not used to retrieve records themselves.

Makes sense, merged PR.

authors: badrishc mito-csod

repo: microsoft/FASTER


text:
Adding new event taskAssigned whenever there will be atomicChanged

This is required to support AIM specific Agent Scheduler, because we are already maintaining current client in DDS after this SB will won't use another DDS to do the same.

@Dhoot Can you elaborate on the intended usage?  In general, the AgentScheduler's design intentionally tries to mask the election process and the status of other clients.  We may choose to alter this election process in the future (reducing null writes, staggering volunteer timing, etc.) which today would be invisible to the user but with this change would result in a customer-visible behavior change.

@ChumpChief : currently AgentScheduler only emits to client who has picked the task and to share leader information with all another clients we need to keep leader's information in DDS.
but, for read-only leader selection we are implementing IAgentScheduler but here we can't use DDS that's why we need to emit taskAssigned to all connected clients, also keep getTaskClientId as public se that instead of keeping leader information in DDS for any taskId we can directly fetch it from AgentScheduler  which is already maintaining this information in consensusRegisterCollection

I'd suggest you consider writing a separate task assignment tool from AgentScheduler for that purpose.  As I mentioned above, AgentScheduler's design is to explicitly try to mask the selection process for write clients, so the requirement for read clients to inspect the selection process is fairly counter to its goal.
Aside from growing the API surface to maintain, the exposure of the selection process would cause improvements to that selection process to become breaking changes.  For instance, it would be easy for some customer to develop a dependency on null client signifying a task being released.  However we'd like to reduce or eliminate the null client behavior to reduce COGS, which would then break those downstream customers.
Ultimately AgentScheduler is just an API wrapper around a ConsensusRegisterCollection, so if inspection of the collection is a goal then you can probably devise a more ergonomic API wrapper for your scenario (e.g. directly emitting events to signify that no eligible owner is present).

forking Agent Scheduler as required changes might create problem with future development in it.

authors: ChumpChief Dhoot

repo: microsoft/FluidFramework


text:
Handle errors in docs pipeline more gracefully

The pipeline should not fail when uploading api-extractor json to Azure storage, because those are optional.
Also fixes the upload step to overwrite an existing file.

Thanks @skylerjokiel 🙏


text:
IMU lags behind Camera

I have an application similar to StreamRecorder where I access the camera and some IMU sensors (Accelerometer and Gyroscope). The application works in realtime and as suggested in #28 I retrieve all sensor data in seperate threads and unite them in an additional thread.
However the IMU data lags behind the camera frames by up to 0.3s (when obtaining host ticks in the same way as in the StreamRecorder app). This of course is way to long for a realtime application. Is there a way to reduce this lag? I have checked and the processing done by the application is not the issue, the lag is already present once the data arrives. Any help would be appreciated.

Hey @kellenberger
I am actually working on a similar code, but having trouble with transmitting the IMU sensors in real time. Would you be so kind and share your code with us? So we can maybe help each other.
Kind regards

Hi @Sayoj, unfortunately I am not allowed to share my code and am currently no longer working on this. However, as far as I know the problem still persists.

authors: Sayoj kellenberger


text:
fix cpp lint in json11

json11 issues from #1990

Awesome PR! Only 4 issues remains! I'm so happy. 🎉
Seems the most diff produced here is due to code redactor settings, right?

yes, as the indent is 4 previously, I reformat the style by copy-and-paste.

Awesome PR! Only 4 issues remain! I'm so happy. 🎉
Seems the most diff produced here is due to code redactor settings, right?

@StrikerRUS after this PR is done, I think we should put // NOLINT on the remaining 4 issues, capture the work to remove those in an issue, and permanently enable cpplint as a proper CI check to prevent any new issues being introduced.

@jameslamb I like your suggestion!

authors: StrikerRUS guolinke jameslamb

repo: microsoft/LightGBM

license: mit

license_source: bigquery


text:
The user name or password is incorrect

When I try to run this tool as domain admin I get a "The user name or password is incorrect" error. Any ideas on how to fix? Running on Windows 10

turned out to be an issue with my OS, tried another server and seems to be working now.


text:
Missing documentation for profiles

There are several profiles that are available for use and some profiles, like the ones used for sample scenes, don't have documentation. Documentation should describe what's different between a given profile and the default so that users can determine which settings provide the desired results

Challenges with understanding profiles could be solved by a profile comparator feature.

Closing as a duplicate of #6826

repo: microsoft/MixedRealityToolkit-Unity


text:
Properly switch input simulation mode in tests

Overview
This PR removes the use of PushControllerSimulationProfile() and PopControllerSimulationProfile() when trying to switch input simulation mode in tests (e.g. from articulated hand to gesture hand). Those two functions manipulate the profile of input simulation service, which does not have any impact on simulation mode after the initialization of the service. In this PR the current simulation mode is cached before switching and will be restored after the test is finished. This technique has been used in some other existing tests.
Changes

Fixes: #8468.

/azp run


text:
About tensorflow code

Thanks for your code.When I use the code basis tensorflow, I run the file of build.py. I meet some problems as :
g++ -std=c++11 -O2 -shared -o libocnn.so object/*.o -I/home/onefivechen/anaconda3/envs/ocnn/lib/python3.6/site-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0 -I../../octree/octree -I /usr/local/cuda-10.0/include -L /usr/local/cuda-10.0/lib64 -D GOOGLE_CUDA=1 -L/home/onefivechen/anaconda3/envs/ocnn/lib/python3.6/site-packages/tensorflow -l:libtensorflow_framework.so.1 -L../../octree/build -loctree_lib -lrply -fPIC -lcudart
/usr/bin/ld: cannot find -loctree_lib
/usr/bin/ld: cannot find -lrply
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'libocnn.so' failed
make: *** [libocnn.so] Error 1
Could you please tell me what environment do the code need?
I use python3.6 cuda10.0 and tensorflow-gpu14.0

it is may be  the wrong version of the numpy

This seems to be missing some files. octree_lib? ocnn.so? rply?

I have updated the readme. You can follow the instructions to build the code.

After cmake, I meet some problems:
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp: In function ‘void bounding_sphere(float&, float*, const float*, int)’:
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:19:3: error: ‘Miniball’ has not been declared
Miniball::Miniball<Miniball::CoordAccessor<PointIterator, CoordIterator> >
^
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:19:22: error: ‘Miniball’ has not been declared
Miniball::Miniball<Miniball::CoordAccessor<PointIterator, CoordIterator> >
^
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:19:59: error: expected primary-expression before ‘,’ token
Miniball::Miniball<Miniball::CoordAccessor<PointIterator, CoordIterator> >
^
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:19:74: error: expected primary-expression before ‘>’ token
Miniball::Miniball<Miniball::CoordAccessor<PointIterator, CoordIterator> >
^
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:19:76: error: expected primary-expression before ‘>’ token
Miniball::Miniball<Miniball::CoordAccessor<PointIterator, CoordIterator> >
^
/home/onefivechen/Desktop/O-CNN-tf/octree/octree/math_functions.cpp:20:29: error: ‘miniball’ was not declared in this scope
miniball(dim, ap, ap + npt);
^
CMakeFiles/octree_lib.dir/build.make:114: recipe for target 'CMakeFiles/octree_lib.dir/octree/math_functions.cpp.o' failed
make[2]: *** [CMakeFiles/octree_lib.dir/octree/math_functions.cpp.o] Error 1
CMakeFiles/Makefile2:371: recipe for target 'CMakeFiles/octree_lib.dir/all' failed
make[1]: *** [CMakeFiles/octree_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Do you konw how to solve it?

I found that there is no file called Miniball.hpp in the octree. And I also find it in folder external, but is is an empty file. Are you missing it?

solve it

Thanks for your code.When I use the code basis tensorflow, I run the file of build.py. I meet some problems as :
g++ -std=c++11 -O2 -shared -o libocnn.so object/*.o -I/home/onefivechen/anaconda3/envs/ocnn/lib/python3.6/site-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0 -I../../octree/octree -I /usr/local/cuda-10.0/include -L /usr/local/cuda-10.0/lib64 -D GOOGLE_CUDA=1 -L/home/onefivechen/anaconda3/envs/ocnn/lib/python3.6/site-packages/tensorflow -l:libtensorflow_framework.so.1 -L../../octree/build -loctree_lib -lrply -fPIC -lcudart
/usr/bin/ld: cannot find -loctree_lib
/usr/bin/ld: cannot find -lrply
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'libocnn.so' failed
make: *** [libocnn.so] Error 1
Could you please tell me what environment do the code need?
I use python3.6 cuda10.0 and tensorflow-gpu14.0

How do u solve it？

authors: CRISZJ wang-ps zhDai

repo: microsoft/O-CNN


text:
Fix CodeQL in PTVS and pylance compliance pipelines

Apparently the guardian version of CodeQL isn't compliant. See https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/1761/Static-Analysis for more details.

[x] Fix in PTVS compliance pipeline

https://github.com/microsoft/PTVS/pull/7221

[x] Fix in pylance compliance pipeline

https://github.com/microsoft/pyrx/pull/2963

[x] Fix in debugpy release? pipeline @int19h

Add TSA upload steps for debugpy?

Now also done in debugpy.

repo: microsoft/PTVS


text:
After changing the settings it didn't work.

Describe the bug

Scenario 1
Steps to Reproduce

Check  "Automatically add brackets for functions" (Tools/Options/Text Editor/Python/Advanced)
Add "import os" to python file.
Write "os.getc", you'll see autocomplete for os.getcwd, selecting it, ensure:
a. Auto-complete adds os.getcwd() to the source code.

Additional context and screenshots
Only os.getcwd is added to the file.

Scenario 2
Steps to Reproduce

Without typeshed paths info:

Custom Typeshed path
a. git clone https://github.com/python/typeshed, enter the local path on disk where you cloned the repository

   b. Go to typeshed/stdlib/sys.pyi and change `def getallocatedblocks() -> int: ...` to `def getallocatedblocks() -> str: ...`

Additional context and screenshots
Nothing has changed.

@ttSpace Scenario 1 is by design, I can also repro in vscode so it's not a PTVS issue. For scenario 2, did you add the path to the typeshed path in options?

@StellaHuang95 I cannot repro in today's build 17.6.0 Preview 2.0 [33423.321.main], Python Package: 17.0.23047.1.
After changing the settings, it works.
Scenario 1 : Check "Automatically add brackets for functions" (Tools/Options/Text Editor/Python/Advanced).

Scenario 2：Enter typeshed path.


text:
Bookings connector initial checkin

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

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

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

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

Hello @vikailas,
I hope you are doing well.
Congratulations, your pull request is approved and merged. Please submit the files to ISV Studio using your latest commit id, please allow us up to 1-2 weeks to review your submission, and our Engineers will notify you in the “Activity Control” area in ISV Studio.
Please Create an environment in the Preview region. You will use this environment later to test your connector after Microsoft is done with the functional verification for your connector.
We expect all tests to be completed within 1-2 weeks.
If your connector passes all tests, the deployment process begins, and it typically takes up to 5 to 6 weeks to deploy your connector to all of our regions.
Please let me know if you have any questions.
Thank you very much for working with us.

authors: v-EgorKozhadei vikailas

repo: microsoft/PowerPlatformConnectors


text:
Moving Snowflake to certified folder

Moving Snowflake to certified folder for certification

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

[ ] 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.
[ ] I attest that the connector works and I verified by deploying and testing all the operations.
[ ] I attest that I have added detailed descriptions for all operations and parameters in the swagger file.
[ ] I attest that I have added response schemas to my actions, unless the response schema is dynamic.
[ ] I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
[ ] If this is a certified connector, I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff. If this is an independent publisher connector, I confirm that I am not submitting a connector icon.

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

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

@microsoft-github-policy-service agree company="Snowflake"


text:
Awake: Awake does not work from Tray Area

Microsoft PowerToys version
0.41.4
Running as admin

[X] Yes

Area(s) with issue?
Awake
Steps to reproduce

Fire up PowerToys (Administrator mode)
Go to the Awake tab
Enable Awake -> Switch to "ON"
Check for the "Awake" icon in the Tray area
Right-click on the icon
Select "Keep Screen On" Or Any options from it.

✔ Expected Behavior
Settings from the tray area should respond to user feedback.
❌ Actual Behavior
Awake options selection in the tray area does not respond to user feedback.
Other Software
No response

Duplicate of #12145

repo: microsoft/PowerToys


text:
Endless explorer.exe loop during install

Microsoft PowerToys version
0.47.1
Running as admin

[X] Yes

Area(s) with issue?
Installer
Steps to reproduce
begin update from within UI
message that certain apps must be halted, offers to close and restart them
apps listed:

Windows gadgets (expected)
Explorer.exe (not expected)
one other that I didn't catch the name of

accept offer to close and restart
goes along, restarts gadgets but not explorer
use task manager (accessed by cntl-shift-esc) to start explorer.exe
explorer starts but error message concerning 'fail safe' displayed, was unable to copy
when mouse cursor goes to error dialog, explorer crashes and restarts
same error message displays
cycle repeats
used 'restart' on addgadget Control System gadget
system restarts
all seems well -- PT shows ver 0.47.1 installed.
PowerToysReport_2021-10-14-15-01-31.zip
✔ Expected Behavior
That the apps auto closed would restart with no problems
❌ Actual Behavior
Listed above
Other Software
Might interact with 8gadgetpack v34. but my understanding is that it simply loads sidebar.exe and the various gadgets, then gets out of the way.

Same problem here, today, upgrading to 0.51.1 from UI.

Windows  10 x64, 10.0.19043 Build 19043

FYI, it's not a pleasant experience...
Steps

Trigger update via UI
Message that 2 apps can be auto-closed
Accept
Installer runs
Explorer closes (grey desktop background)
Installer warns it can't close all apps etc
Accept
After some time, installer window closes; grey desktop remains
Manually C A Delete > Task Manager > Run Explorer
Inifinite Cycle:

Explorer starts (Desktop icons and background show; Start bar does not)
Explorer immediately closes

Manually start task manager and kill PowerToys tasks, but has no effect
Manually reboot via task manager
System operational and Powertoys says it's updated

Event Log shows..
Restart Manager is unable to close apps:

Restart Manager: Application or service 'COM Surrogate' could not be shut down.
Restart Manager: Application or service 'Windows Explorer' could not be shut down.
Restart Manager: "Application 'C:\Windows\System32\dllhost.exe' (pid 10200) cannot be restarted - Application SID does not match Conductor SID.."
restart Manager: Application 'C:\Windows\explorer.exe' (pid 7496) cannot be restarted - Application SID does not match Conductor SID..

Later, explorer.exe goes into an infinite restart cycle:
Event 1000, Application error

Faulting application name: explorer.exe, version: 10.0.19041.1415, time stamp: 0x2d7da47f
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1387, time stamp: 0x0b9a844a
Exception code: 0xc0000602
Fault offset: 0x000000000010b302
Faulting process ID: 0x50f0
Faulting application start time: 0x01d80040b18df17f
Faulting application path: C:\WINDOWS\explorer.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: 2b5deabd-12ee-4ee1-9572-fb672d8f2561
Faulting package full name:
Faulting package-relative application ID:

Event 1001, Windows Error Reporting

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: explorer.exe
P2: 10.0.19041.1415
P3: 2d7da47f
P4: KERNELBASE.dll
P5: 10.0.19041.1387
P6: 0b9a844a
P7: c0000602
P8: 000000000010b302
P9:
P10:

Event 1002, Winlogon

The shell stopped unexpectedly and explorer.exe was restarted.

And today I had the identical problem while updating totally unrelated Teracopy to v3.9.  Same behavior.  What I have a difficult time understanding is why an install program would need to close explorer.exe

does the 0.55 or .53 installer this do this now a days?
@whawm1, depending on how things are changed, explorer needs a restart typically with explorer integration stuff.

/needinfo

0.53.3 installed with no issue,  Used DLed exe file.  And, just now, 0.55 installed, from exe, apparently successfully, again with no issue, and I think it was a bit quicker than with 0.53.3  Have not yet tested functionality.

53 and 55 have the fixes as they are leveraging the new bootstrapper.

authors: crutkas typpos whawn1


text:
Enhancement in Pin Module

Description of the new feature / enhancement

I was waiting for app pin feature, so Thanks devs!
Here's my Request ↓
As shown in the illustration/screenshot please add an option to show pin icon next to minimize button so instead of having a border showing pinned app icon shows that! also when unpinned by clicking on the icon pin with / is shown and pressing that will pin app.
Scenario when this would be used?
Borders which are used now are not that great as it uses the limited screen space we have also it's slightly buggy as I increase the thickness it increases the distance of border from the window also this is a more subtle and convenient way to pin and unpin apps.
Supporting information
No response

@crutkas Many people still think of this. We sure it isn't possible? Custom GUIs will allways be a pain, but maybe at least for "normal" window borders..?

/dup #15570, #15387, maybe #15401

Agreed tracked else where. Ultimately this is hard to inject correctly.

authors: Black-StellarSpectrum Jay-o-Way crutkas


text:
Pin Always on top

Description of the new feature / enhancement
Have a program (like calculator) always appear and be on top even when opening a new window.
Scenario when this would be used?
When frequently opening and closing you don't have to toggle Always on top.
Supporting information
No response

Especially useful for those of us who use the pop-up touchscreen keyboard. good suggestion.


text:
Add toggle switch to disable all File Explorer addons

Description of the new feature / enhancement
It seems that all of the other features of PowerToys have a convenient on/off toggle at the top of each of their settings page. This would be great to have for the File Explorer addons as well.
Scenario when this would be used?
I use alternative tools to generate thumbnails and it becomes tedious to uncheck each File Explorer addon on each of my installations. It would be sweet to have a simple toggle switch instead.
Supporting information
No response

@cinnamon-msft this could be a good first test implementation for a high level style grouping
Here is how stuff currently looks

Even with every available toggle disable, it still renders preview for .docx, .txt and other files, slowing down explorer.
This is more of annoyance than a feature.
Please add an option to disable it entirely.

Would I need to add a GPO for this enable switch?

Would I need to add a GPO for this enable switch?

Think this makes sense. But it's no must have.

@acekirkpatrick
Your contribution is welcome. Thank you for your work on this. Feel free to open a PR. If you have any further questions don't worry to ask them.

authors: RobbyMeeker acekirkpatrick alexb5dh crutkas htcfreek


text:
Next window/previous window don't work on any monitor but the mainy display

Microsoft PowerToys version
0.69.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce
Switch between windows in current zone only works on main window. Does not work otherwise.
✔ Expected Behavior
Switching between windows in current zone to work
❌ Actual Behavior
Nothing happens on non-main window zones.
Other Software
I'm using a monitor via displaylink, might interfere?

Suddenly started working after I turned it off and on (which I feel like I'd done before). Works on all but my displaylink monitor.


text:
Point help pages at Stable vs Master

Environment
Windows build number: [Version 10.0.18363.836]
PowerToys version: v0.17.0
PowerToy module for which you are reporting the bug (if applicable):

General settings

Steps to reproduce
open help link for windowwalker, page opens with 404.
https://github.com/microsoft/PowerToys/blob/master/src/modules/windowwalker
Expected behavior

Screenshots

We need to point the release at stable instead of master, master is our main working branch and WW is moving into launcher.

In retro spec, i think we should point here to the wiki versus the MD files for non-dev related docs.

Fixed in 0.19.0, please visit https://github.com/microsoft/PowerToys/releases/ for the latest release

authors: VirtualZen crutkas


text:
🔣 Add New Character to Power Accent  [↦,⇒,≔,⊂, ...]

Description of the new feature / enhancement
TLDR;
Here's another solution to my problem #31239, which I'll quickly summarize:
👉 I take daily notes on which I sometimes use scientific characters and I can't quickly access certain special characters.
Solution
I will list some character that I would like to access from other LetterKey

Problem : the LetterKey variable is more KeyWithSymbols because currently LetterKey.VK_PLUS and LetterKey.VK_EQUAL would be the same and for the next proposal LetterKey.VK_MORE_THAN and LetterKey.VK_LESS_THAN this would be complicated with the current solution.

🔹 > More Than : LetterKey.VK_OEM_102 + LetterKey.VK_SHIFT

LetterKey
Character
Code point
Character name

>
→
U+2192
RIGHTWARDS ARROW

>
↦
U+21A6
RIGHTWARDS ARROW FROM BAR

>
⇒
U+21D2
RIGHTWARDS DOUBLE ARROW

>
⇏
U+21CF
RIGHTWARDS DOUBLE ARROW WITH STROKE

>
↗
U+2197
NORTH EAST ARROW

>
↘
U+2198
SOUTH EAST ARROW

🔹 < Less Than : LetterKey.VK_OEM_102

LetterKey
Character
Code point
Character name

<
←
U+2190
LEFTWARDS ARROW

<
↤
U+21A4
LEFTWARDS ARROW FROM BAR

<
⇐
U+21D0
LEFTWARDS DOUBLE ARROW

<
⇍
U+21CD
LEFTWARDS DOUBLE ARROW WITH STROKE

⚠ If it's too complicated to do LetterKey.VK_OEM_102 + LetterKey.VK_SHIFT, we could use just only LetterKey.VK_OEM_102  and combine the two character arrays

🔹 C C : LetterKey.VK_C

LetterKey
Character
Code point
Character name

c
⊂
U+2282
SUBSET OF

c
⊆
U+2286
SUBSET OF OR EQUAL TO

c
⊄
U+2284
NOT A SUBSET OF

c
⊈
U+2288
NEITHER A SUBSET OF NOR EQUAL TO

🔹 = Equal : LetterKey.VK_ADD + LetterKey.VK_SHIFT

LetterKey
Character
Code point
Character name

=
≔
U+2254
COLON EQUALS

=
≜
U+225C
DELTA EQUAL TO

If not possible to do LetterKey.VK_ADD + LetterKey.VK_SHIFT we can add them on the actual LetterKey.VK_ADD

Other characters such as ⋂⋃ would be useful, but perhaps not as much as those presented here.

Scenario when this would be used?
👉 I want to write the → character quickly.
✅ I press > + space to open PowerToys Quick Accent and find our arrow

The problem is that there is no such thing as VK_LESS_THAN and VK_MORE_THAN.
The full list of key codes can be found here: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

Thanks for the link! Could we use VK_OEM_102 instead? I edit the Issue with this key code

I guess yes.

authors: Aaron-Junker QuentinDstl


text:
can't save Power Toys settings

Microsoft PowerToys version
0.81.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
Always run as administrator is selected
After windows re-start: modules, which I selected from the dashboard, are deselected // modules which I deselected are now selected // profiles added e.g. in Fancy Zones have disappeared; redirected key strokes in keyboard manager have disappeared etc.
Please note: in the main window of power toys (Dashboard) and in the submenus of the individual toys there is NO save setting button (in case, this shlo9ud be therem and is somewhow missing on my computer.
✔ Expected Behavior
I wpould expect PowerToys to restart with the settings I selected when it was last running, and not always to start like from scratch, with all individual setting lost.
❌ Actual Behavior
all individual setting aer lost; agter a windows re-start Power Toys restarts with the settings it was dinstributed with, and all individual settings are lost.
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/24339

authors: Martin-H-Spitzner cinnamon-msft


text:
Cannot install PT

Microsoft PowerToys version
UNKNOWN
Installation method
Microsoft Store, WinGet
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
PT not listed as installed,
System Win 10 , Ver 22H2, OS 19045.4651
✔ Expected Behavior
Tried to install via MS Store, and PS using Winget, both result in failure to install.
Log shows that it detects a previous version
❌ Actual Behavior
[1164:0FFC][2024-08-14T18:13:24]i101: Detected package: TerminatePowerToys, state: Absent, cached: None
[1164:0FFC][2024-08-14T18:13:24]i101: Detected package: WebView2, state: Present, cached: None
[1164:0FFC][2024-08-14T18:13:24]i101: Detected package: PowerToysUserSetup_0.83.0_x64.msi, state: Absent, cached: None
[1164:0FFC][2024-08-14T18:13:24]i052: Condition 'MinimumVersion >= DetectedPowerToysVersion' evaluates to false.
[1164:0FFC][2024-08-14T18:13:24]e000: PowerToys is already installed on this system for all users. We recommend first uninstalling that version before installing this one.
[1164:0FFC][2024-08-14T18:13:24]e000: Error 0x81f40001: Bundle condition evaluated to false: MinimumVersion >= DetectedPowerToysVersion
[1164:0FFC][2024-08-14T18:13:24]i199: Detect complete, result: 0x0
Other Software
No response

The error is it is saying you have a machine wide install of PowerToys already.  Could it have been installed via a different user maybe?  Does C:\Program Files\PowerToys exist?  /needinfo
this line is why i believe a machine wide was done and Store is a per-user only.
PowerToys is already installed on this system for all users. We recommend first uninstalling that version before installing this one.
WinGet should detect user vs machine wide however

Does C:\Program Files\PowerToys exist? / no
WinGet should detect user vs machine wide however . Winget downloaded PT but install fails with same error

When trying to install from link above, error
The older version on PowerToys Preview cannot be removed. Contact your technical support group.
Using reg scanner, no entries found relating to powertoys.

Fatal error during installation 0x80070643

Any help appreciated

on PowerToys Preview cannot be removed. Contact your technical support group.
Using reg scanner, no entries found relating to powertoys.

Do you have further details on the error message?
I had similar issues before where the installation got messed up. In such cases, I had to download the installer for the supposedly installed version again, extract the embedded MSI using dark.exe from WiX3, and then uninstalling using the MSI. (using: dark.exe <path to PT installer exe> -x . -> MSI is within folder AttachedContainer)
In these cases the installer log would show it could not find a MSI somewhere in %localappdata%\Package Cache\{some uuid}.
I guess this only works when there is at least some sort of trace left of the other version.
The Windows' installed apps screen does not show an entry for PT, right?

The Windows' installed apps screen does not show an entry for PT, right? Correct.
I tried the most up to date V and still the same, also tried installing via Choco, same result

authors: FlyBoru crutkas ttrafelet


text:
Mouse utilities problem

Microsoft PowerToys version
0.80.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Mouse Utilities
Steps to reproduce

✔ Expected Behavior
No response
❌ Actual Behavior
If the computer experiences a lag, the color block clicked on by the mouse will get stuck on the screen and will never disappear until the computer is restarted. May I ask if this issue can be resolved?
如果电脑出现卡顿，点击鼠标的色块就会卡在屏幕上，永远不会消失，直到重启电脑后才会消失。请问这个问题能否得到解决？
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/21099

authors: SONY-XPERIA davidegiacometti


text:
Color Picker -= More colour paste options please

Within the Color Picker, Appearance and BVehaviour section.
Can we have some more 'Copied color representation options please.

HEX - FFAA00 (without the # symbol)
RGBA - Even though the A may be unknown, so would default to it's maximum, would help us coders.
HSL ???

@clarkedesign Thanks for the suggestions We are tracking this in #5379. That would allow you to create custom color formats. Please review, and if you have any other ideas please leave your feedback there!


text:
Fancy Zones - Show window size and location in pixels when editing custom layouts

📝 Provide a description of the new feature
What is the expected behavior of the proposed feature?  What is the scenario this would be used?
Finally, a (sort of) tiling window manager for Windows! But you can't see how many pixels your zones will take up or where they are located exactly on the screen. I can't be the only one who needs to know this information?
If you'd like to see this feature implemented, add a 👍 reaction to this post.

Tracked by https://github.com/microsoft/PowerToys/issues/463

Tracked by https://github.com/microsoft/PowerToys/issues/463

authors: enricogior fahali


text:
RichCodeNavIndexer is unable to locate executable file in Npgsql repo

Hello!
A few years back RichCodeNavIndexer was added to Npgsql repo (npgsql/npgsql#3353) and it was working quite well for us.
Unfortunately, about 4 months ago it started failing with an error Error: Unable to locate executable file: C:\Program. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file..
Could you give us an idea if there is something wrong with our .yml config?
cc @roji

We apologize for the inconvenience! We've been doing a little bit of refactoring on our side. We believe this error should be resolved, but please re-open this issue if you continue to see this error!

Yeah, we've re-enabled it and it seems to work. Thank you!

authors: noellelc vonzshik

repo: microsoft/RichCodeNavIndexer


text:
fix: fix issue with interpret package in E2E tests

Related Issues/PRs

#xxx
What changes are proposed in this pull request?
Briefly describe the changes included in this Pull Request.
How is this patch tested?

[ ] I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

[ ] No. You can skip this section.
[ ] Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

[ ] No. You can skip this section.
[ ] Yes. Make sure you have added samples following below steps.

Find the corresponding markdown file for your new feature in website/docs/documentation folder.
Make sure you choose the correct class estimators/transformers and namespace.
Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
Make sure the DocTable points to correct API link.
Navigate to website folder, and run yarn run start to make sure the website renders correctly.
Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
Make sure the WebsiteSamplesTests job pass in the pipeline.

/azp run

repo: microsoft/SynapseML


text:
Strict equals false type guard doesn't work

Code
interface A {
  a: string;
}

interface B {
  b: string;
}

type MyType = A | B;

function isA(x: MyType): x is A {
  return "a" in x;
}

function someFn(x: MyType) {
  if (!isA(x)) {
    console.log(x.b);
    //            ^ <- works perfectly
  }

  if (isA(x) === false) {
    console.log(x.b);
    //            ^ <- here's the problem
  }
}

Expected behavior:
Being able to access x.b in this if statement:
if (isA(x) === false) {
  console.log(x.b);
}

Actual behavior:
Error: Property b does not exists on type A.
Playground Link:
Playground

Note that this is a duplicate of #9508 which was closed as "won't fix".  Not sure what changed between that and this, although the fact that this is languishing in the backlog might be functionally equivalent to "won't fix" 😅

authors: hansott jcalz

repo: microsoft/TypeScript


text:
Wildcard ambient modules declaration override rules

Search Terms
wildcard ambient module override
Suggestion
I could not find written anywhere how wildcard ambient module declaration precedence work in case of overlaps.
In the original pull request "prefix length" was used as the best fit criteria, but I could not locate where that function is located into current code.
Also, prefix length won't help in case of post-fixed *, but maybe that was just naming and it actually meant "longer match".
This feature should be better documented into its handbook page or, if it has been dropped after first implementation, it would be useful to know why so.
The most closely related question I found on StackOverflow doesn't have an answer.
Use Cases
I have a setup with Vue (Quasar actually) + TypeScript + Jest, using SFC.
I have to mount Vue components into Jest tests (which are written into .ts files), but importing SFC won't work (they are not TS files).
Using a shim for all Vue files (the official solution) partially solves this problem, because at least you get typings for the general Vue instance, but you won't get typings for that particular SFC (data, props, computed, etc).
I currently separated the TS script from the SFC to be able to get the typings by importing from the two different files. Now I'm trying to define shims for the component .vue to work by binding its name with a wildcard to it's TS counterpart.
Unluckily, when I import ./demo/QBtn-demo.vue, I still get *.vue shim instead of the specific component one, and nowhere seems to be found how can I force the override.
If I remove Vue shim, it works, but I'm forced to make a personal shim for every component.
I know it's possible by using triple slash references, but that's not the point of this issue.
Current workaround is to import both the .vue SFC and the TS script and then explicitly cast the SFC to the type of the specific instance.
Examples
shims-vue.d.ts
declare module '*.vue' {
  import Vue from 'vue';
  export default Vue;
}

component.d.ts
declare module '*/QBtn-demo.vue' { // <= works when general Vue shim isn't present
  import QBtnDemo from 'test/jest/__tests__/demo/QBtn-demo'; // <= this is the TS file
  export default QBtnDemo;
}

QBtn-demo.vue

<template>

{{ input }}

    {{ counter }}
    <q-btn id="mybutton" @click="increment()"></q-btn>

</template>

QBtn-demo.ts
import Vue from 'vue';

export default Vue.extend({
  name: 'QBUTTON',
  data: function(): { counter: number; input: string } {
    return {
      counter: 0,
      input: 'rocket muffin',
    };
  },
  methods: {
    increment(): void {
      this.counter++;
    },
  },
});

app,spec.ts
import { createLocalVue, mount } from '@vue/test-utils';
import { Quasar } from 'quasar';
import { VueConstructor } from 'vue';

import QBtnDemo from './demo/QBtn-demo.vue'; // <= Gets types as 'Vue' instead of 'QBtnDemo'

describe('Mount Quasar', () => {
  const localVue = createLocalVue();
  localVue.use(Quasar);

  const wrapper = mount(QBtnDemo, { localVue });
  const vm = wrapper.vm;

  it('has a created hook', () => {
    expect(typeof vm.increment).toBe('function'); // <= TS error: could not find 'increment'
  });

  it('sets the correct default data', () => {
    expect(typeof vm.counter).toBe('number');  // <= TS error: could not find 'counter'
    const defaultData = vm.$data;
    expect(defaultData.counter).toBe(0);
  });

  it('correctly updates data when button is pressed', () => {
    const button = wrapper.find('button');
    button.trigger('click');
    expect(vm.counter).toBe(1);  // <= TS error: could not find 'counter'
  });
});

app.spec.ts with casting workaround
import { createLocalVue, mount } from '@vue/test-utils';
import { Quasar } from 'quasar';
import { VueConstructor } from 'vue';

import QBtnDemoComponent from './demo/QBtn-demo.vue';
import QBtnDemo from './demo/QBtn-demo';

describe('Mount Quasar', () => {
  const localVue = createLocalVue();
  localVue.use(Quasar);

  const wrapper = mount(QBtnDemoComponent as typeof QBtnDemo, { localVue });
  const vm = wrapper.vm;

  it('has a created hook', () => {
    expect(typeof vm.increment).toBe('function'); // <= Infered correctly
  });

  it('sets the correct default data', () => {
    expect(typeof vm.counter).toBe('number'); // <= Infered correctly
    const defaultData = vm.$data;
    expect(defaultData.counter).toBe(0);
  });

  it('correctly updates data when button is pressed', () => {
    const button = wrapper.find('button');
    button.trigger('click');
    expect(vm.counter).toBe(1); // <= Infered correctly
  });
});

Checklist
My suggestion meets these guidelines:

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

Is there any progress of this issue? 🤔

authors: IlCallo kongmoumou


text:
Intl.ResolvedDateTimeFormatOptions is missing properties

lib Update Request
Configuration Check
My compilation target is ES2020 and my lib is the default.
Missing / Incorrect Definition
Intl.ResolvedDateTimeFormatOptions - the type returned by calling DateTimeFormat's resolvedOptions method - appears to be missing the following properties:

dateStyle
timeStyle
dayPeriod
hourCycle
fractionalSecondDigits

It looks like these items (along with calendar and numberingSystem) were added to  es2020.intl.d.ts's DateTimeFormatOptions however they were never added to ResolvedDateTimeFormatOptions.
It seems that calendar and numberingSystem are both present in es5.d.ts's ResolvedDateTimeFormatOptions. Because of this I am unsure if the absent options should be added to ResolvedDateTimeFormatOptions in es5.d.ts or es2020.d.ts.
https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties is the spec table of possible returned properties
Sample Code
Sample TS playground
console.log(new Intl.DateTimeFormat('en-US', { dateStyle: 'short' }).resolvedOptions().dateStyle)
console.log(new Intl.DateTimeFormat('en-US', { timeStyle: 'long' }).resolvedOptions().timeStyle)

console.log(new Intl.DateTimeFormat('en-US', { dayPeriod: 'narrow' }).resolvedOptions().dayPeriod)
console.log(new Intl.DateTimeFormat('en-US', { timeStyle: 'long', hourCycle:'h24' }).resolvedOptions().hourCycle)

console.log(new Intl.DateTimeFormat('en-US', { fractionalSecondDigits: 1 }).resolvedOptions().fractionalSecondDigits)

The above lines throw type errors saying the various properies on resolvedOptions do not exist
Documentation Link
https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties

Duplicate of #42577 which itself is duplicate of other issues.

This issue looks to be more thorough than #42577 - which does not mention the dayPeriod or fractionalSecondDigits.
#42577 has been marked as a duplicate of #35865 / #34399. In both cases that appears to be an incorrect diagnosis, as both of those issues are about improvements to DateTimeFormatOptions, NOT ResolvedDateTimeFormatOptions.

#35865 talks about strictening the types on DateTimeFormatOptions, changing them from string to specific values. This issue has been fixed as of TS 4.2 as that interface now uses unions of strings for those values.
#34399 talks about an omission of hourCycle from DateTimeFormatOptions. This issue has been fixed as of TS 4.2 when targeting es2020 per this interface

Yes, you are correct. Read by diagonal and missed that ResolvedDateTimeFormatOptions were not updated to match other options added to options.
Also looks like it's tricky question in which file definitions should go as https://github.com/microsoft/TypeScript/pull/42945 tries to "move" (in that case just removing) some of this properties of DateTimeFormatOptions to further versions.

I'm reasonably sure I've got all these covered and merged into main with in https://github.com/microsoft/TypeScript/pull/45647 - should be available in 4.5

Heya @orta,
I'm not sure if I'm reading that PR correctly but it looks like DateTimeFormatOptions was updated but I can't see any adjustments to ResolvedDateTimeFormatOptions, or any places where the return interface of resolvedOptions() got changed to something else.

Ping @orta, I've just tried on the nightly build playground and it still raises type errors.
I don't think this issue has been resolved as the types of ResolvedDateTimeFormatOptions don't seem to have been updated

Yep, I agree 👍🏻

Thanks @orta <3

authors: BPScott IllusionMH orta


text:
Type metadata / shadow types

Suggestion
🔍 Search Terms
type metadata info secondary
✅ 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
Create a type that in a union, has no effect on the result of the union (same as never), but can be retrieved using a special type (i.e. GetMetadata<T>).
type x = number | Metadata<unknown>; // type is: number
type metaX = GetMetadata<x>; // type is unknown

📃 Motivating Example
This can be used to document errors which a function may throw.
Currently, Typescript allows to do something like the below, but there's an issue in that the Throws<> type pollutes the function return type which has to be manually eliminated by type casting - not very practical.
This is a full example of what I'm aiming at, from my comment in the issue https://github.com/microsoft/TypeScript/issues/13219#issuecomment-928866237
type Throws<T> = { throws: T };

type GetThrow<T> = T extends Throws<infer R> ? R : never;
type GetResult<T> = T extends Throws<unknown> ? never : T;

type GetFunctionThrow<T extends (...args: any[]) => any> = GetThrow<ReturnType<T>>;
type GetFunctionResult<T extends (...args: any[]) => any> = GetResult<ReturnType<T>>;

type CalcError = {
    code: "calc_error"
    message: string
}

type DivisionError = {
    code: 'division_error'
    message: string
}

function divide(a: number, b: number): number | Throws<DivisionError> {
    if (b === 0) {
        throw { code: "division_error", message: "Cannot divide by 0" } as DivisionError;
    }

    return a / b;
}

function calc(a: number, b: number, operation: 'divide'): number | Throws<CalcError | DivisionError> {
    if (typeof a !== 'number' || typeof b !== 'number') {
        throw { code: "calc_error", message: "Required 2 number arguments" } as CalcError;
    }

    if (operation !== 'divide') {
        throw { code: "calc_error", message: "Unsupported operation" } as CalcError;
    }

    return divide(a,b);
}

let x: number;

try {
    // This casting makes this method hardly practical. If we had a metadata type, it would be a number by default.
    x = calc(5 ,6, 'divide') as GetFunctionResult<typeof calc>;
} catch (e: unknown) { // Catch-clause annotation must be any or unknown
    const err = e as GetFunctionThrow<typeof calc>; // CalcError | DivisionError
}

Playground
With the new special Metadata<T> utility type it would possible to store such information and access it with a special type GetMetadata<T> while the type like number | string | Metadata<unknown> would be just number | string.
💻 Use Cases

What do you want to use this for?
Documenting what types of errors a function may throw.

What shortcomings exist with current approaches?
It's possible to use a helper type to eliminate the metadata from the union, but it's too verbose to be practical.  It could also be stored in a separate type, but with classes, it would be away from the method body and also not practical enough to consider.

What workarounds are you using in the meantime?
I'm not documenting the types of errors a function may throw at all or I use tsdoc throws (but it does not allow to store type info).

i almost publish my lib https://github.com/kraftrio/kraftr/tree/develop/core/errors you can check it how i handled to store metadata, i created a eslint plugin too to enforce the usages (could have auto fix)

authors: mckravchyk mdbetancourt


text:
Incorrect assertion in quick fix code

Extracted from https://github.com/microsoft/TypeScript/issues/38062
// @noImplicitAny: true

type Rest = (...string) => void;
type Public = (public string) => void;

Request quick fixes for this code snippet.
Expected Correct quick fixes
Actual
Error: Debug Failure. add-name-to-nameless-parameter operates on identifiers, but got a DotDotDotToken
    at makeChange (TYPESCRIPT_DIR\lib\tsserver.js:145716:33)
    at TYPESCRIPT_DIR\lib\tsserver.js:145707:96
    at Function.ChangeTracker.with (TYPESCRIPT_DIR\lib\tsserver.js:143896:17)
    at Object.getCodeActions (TYPESCRIPT_DIR\lib\tsserver.js:145707:64)
    at TYPESCRIPT_DIR\lib\tsserver.js:145087:77
    at Object.flatMap (TYPESCRIPT_DIR\lib\tsserver.js:522:25)
    at Object.getFixes (TYPESCRIPT_DIR\lib\tsserver.js:145087:23)
    at TYPESCRIPT_DIR\lib\tsserver.js:159943:35
    at Object.flatMap (TYPESCRIPT_DIR\lib\tsserver.js:522:25)
    at Proxy.getCodeFixesAtPosition (TYPESCRIPT_DIR\lib\tsserver.js:159941:23)
    at IOSession.Session.getCodeFixes (TYPESCRIPT_DIR\lib\tsserver.js:171425:64)

Error: Debug Failure. add-name-to-nameless-parameter operates on identifiers, but got a PublicKeyword
    at makeChange (TYPESCRIPT_DIR\lib\tsserver.js:145716:33)
    at TYPESCRIPT_DIR\lib\tsserver.js:145707:96
    at Function.ChangeTracker.with (TYPESCRIPT_DIR\lib\tsserver.js:143896:17)
    at Object.getCodeActions (TYPESCRIPT_DIR\lib\tsserver.js:145707:64)
    at TYPESCRIPT_DIR\lib\tsserver.js:145087:77
    at Object.flatMap (TYPESCRIPT_DIR\lib\tsserver.js:522:25)
    at Object.getFixes (TYPESCRIPT_DIR\lib\tsserver.js:145087:23)
    at TYPESCRIPT_DIR\lib\tsserver.js:159943:35
    at Object.flatMap (TYPESCRIPT_DIR\lib\tsserver.js:522:25)
    at Proxy.getCodeFixesAtPosition (TYPESCRIPT_DIR\lib\tsserver.js:159941:23)
    at IOSession.Session.getCodeFixes (TYPESCRIPT_DIR\lib\tsserver.js:171425:64)

type Rest = (...string) => void;

@DanielRosenwasser Should TS suggest Parameter has name but no type. Did you mean 'arg0: string'? for rest params?

authors: DanielRosenwasser a-tarasyuk


text:
Any on recursive interfaces inside a generic on declaration

🔎 Search Terms
interfaces, generics, recursion, recursive interfaces, any on recursion.
🕗 Version & Regression Information

This is the behavior in every version I tried from 4.8 to 5.3

⏯ Playground Link
No response
💻 Code
type generic<T> = T;

type tree<T> = generic<{
  value: T;
  left: tree<T>;
  right: tree<T>;
}>;

type myTree = tree<number>;

const a: myTree = {} as myTree;
a.left.left.right.left.right; // this works fine
a.left.left.right.left.otherKey; // this give error so the type internally not is any but show it as any

🙁 Actual behavior
The leafs o the recursed value in this case 'left' and 'right' shows it as any but internally it have their correct types.
🙂 Expected behavior
'left' and 'right' should show it as "tree" instead of any
Additional information about the issue
No response

They do. Are you hovering in the wrong spot?

ohh, I see it only happens when noErrorTruncation is in the tsconfig.
{
  "compilerOptions": {
    "noErrorTruncation": true,
  },
}

but still is showing ... instead Tree<T> that is default behavior if you don't wrap it in a generic.

The … indicates that the type is infinitely recursive; if printed in its entirety it would literally go on forever.  Essentially you can read … as “insert the containing type here”

authors: Eythaann RyanCavanaugh fatcerberus


text:
Infer type parameters from indexes on those parameters

This alters the inference info to accumulate a set of partial inferences created by inferences to indexes on a type parameter. These partial inferences are then combined into one real inference when candidates are created. The partial inferences for S to T[K] take the form of a mapped type of {[Key in K]: S}. I'm unsure if the priority of such an inference needs modification in some way. Creating such a type without any backing parse tree nodes required some slight modification to how a handful of attributes of a mapped type were looked up (namely, adding a cache for anything normally looked up on the declaration).
@sandersn and @DanielRosenwasser and I were talking the other day about how inference like this allows you to replace a large list of type parameters with an unordered bag of type parameters, like so:
interface Args {
    TA: object,
    TY: object
}

function foo<T extends Args>(
    a: T["TA"],
    b: T["TY"]): T["TA"] & T["TY"] {
    return undefined!;
}

const x = foo({
    x: {
        j: 12,
        i: 11
    }
}, { y: 42 });

without this change, x is instantiated as the intersections of the base constraints on T["TA"] and T["TY"] and so is object; but with this change we infer {x: {j: number, i: number}} for T["TA"] and {y: number} for T["TY"], creating an aggregate inference for T of {TA: {x: {j: number, i: number}}, TY: {y: number}}, making the return type {x: {j: number, i: number}} & {y: number}.
This could be particularly useful in Vue, as then they could introduce a bag for the type parameters passed into their many generic functions. This would enable them to add more type arguments as needed for improved inference or for future features, without breaking existing consumers who are manually specifying a subset of parameters (simply make new arguments in the bag optional) and also allowing that bag to be extended (via interface reopening) by any vue plugins, such as vuex (which then enables them to add overloads to vue-core methods which can carry through the new type information they provide).
I'm sure there's a bunch of refinements to be made, but does anyone have thoughts on adding inference of this kind? It doesn't seem to obviously interact with or overwrite any other inferences we do (certainly no common ones).

I have greatly simplified the creation of the partial inference types by introducing a type alias that we just instantiate into the lib file. This also causes us to share instantiations between all partial inferences globally, which should be good for perf, and also allows it to have an alias symbol to name the somewhat complicated type by in declaration emit.
Additionally, I have altered the shape of the partial inference type to be much more precise (in exchange it's a bit more complicated). Previously it was, for some S to T[K], {[Key in K]: S}. Now it is {[SomeK in K]: {[OneK in SomeK]: S}}[K]. This means that if K is instantiated as "A" | "B" we now produce {"A": S} | {"B": S} instead of {"A": S, "B": S}, which is much more correct (we only know we have to fulfill one of those members with our inference, not all of them).
Lastly, I've added way more test coverage. They show that this approach gives some excellent results, even under complex higher-order conditions, while also showing that the basic T["A" | "B"] could use some work... (though that might be a cascading failure from the failing in higher order indexed access inference that there's another PR our for; in any case it begets looking-into)
@DanielRosenwasser as this currently is, can you see a way for the vue ecosystem to adopt a pattern involving inferences like this; do you know what such type definitions would look like, approximately (so they can be tested)?

this does not seem to work for me;
type Options = { k: "a", a: number } | { k: "b", b: string };
declare function f<T extends Options>(p: T["k"]): T;
const x = f("a");  // expect it to be `{ k: "a" }` but it is Options

@mhegazy In your example, x is inferred as Options because Ii can't infer just {k: "a"} because that doesn't satisfy the constraint on T. We actually do create that inference, we just have to toss it out because it alone isn't enough to satisfy the constraint. I could add constraint discrimination based on available partial inferences into getInferredType, if it interests you.

@mhegazy Done - a partial inference result which is not assignable to the constraint now discriminates the constraint based on the fields available in the partial inference, if possible, then creates a spread with the selected constraint and the partial inference. Pretty nifty, good idea.

I wonder why this never made it into the language, or if there was a reported issue it was meant to solve.  I occasionally see people trying this sort of inference and I don't know where to point them for a canonical answer as to why it doesn't work this way.

Uhh... No real reason other than lack of a driver, I guess? As you can see, there's no backing issue, so it never really got prioritized for discussion.

https://stackoverflow.com/questions/73519617/can-generic-indexed-access-parameters-be-constrained

Looks like this SO question is also running afoul of this, maybe

authors: jcalz mhegazy weswigham


text:
Fully replace fabricbot modified file checking with pull_request_target

This is a pull_request_target workflow which runs with secrets/perms on all PRs. Running with secrets on external PRs is normally insecure, but the trick is that this workflow kind runs from the base branch, e.g. main. This means that we're guaranteed to be running our version of the workflow (not some PR's version). As long as we never actually execute code from the PR, this is safe. And indeed, we don't even need to clone the PR at all to get info about which files it changes. The GitHub API is enough.
See also: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This new workflow should fully emulate what we were having fabricbot doing; it will check to see if it's already commented for the same issue before commenting again.
I did this all in the workflow file to keep things self-contained (no clone of any repo needed). Ppotentially we could simplify this into a specific action or something so we could write it in TS, but this seems okay for now and is unlikely to change.

I've updated this a little bit to fix things I've seen while staring at the script; it's basically impossible to test this entire thing without merging it.
I've also only made this work on main; theoretically someone can send a "bad" PR to a release branch, however in practice I haven't seen that happen and that is likely to be very annoying to manage as the workflow would be run from the release branch (not main), which will potentially contain an old revision.

Tested this locally with https://github.com/nektos/act and it seemed to work. Will merge and monitor.


text:
Mac: testShouldHandleFileOpEvent occasionally fails

We've see the failure below twice now, at a minimum we should add some extra logging/diagnostics to better understand what's happening next time this hits.
KauthHandlerTests
  testShouldHandleFileOpEvent, ((testVnodeFile.get() == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].vnode) is true) failed
  /Users/test/devel/VFSForGit/ProjFS.Mac/PrjFSKextTests/KauthHandlerTests.mm:471

  testShouldHandleFileOpEvent, ((testVnodeFile.get() == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].vnode) is true) failed
  /Users/test/devel/VFSForGit/ProjFS.Mac/PrjFSKextTests/KauthHandlerTests.mm:487

  testShouldHandleFileOpEvent, ((RootHandle_Indeterminate == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].virtualizationRoot) is true) failed
  /Users/test/devel/VFSForGit/ProjFS.Mac/PrjFSKextTests/KauthHandlerTests.mm:488

  testShouldHandleFileOpEvent, ((testVnodeFile.get() == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].vnode) is true) failed
  /Users/test/devel/VFSForGit/ProjFS.Mac/PrjFSKextTests/KauthHandlerTests.mm:505

  testShouldHandleFileOpEvent, ((rootHandle == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].virtualizationRoot) is true) failed
  /Users/test/devel/VFSForGit/ProjFS.Mac/PrjFSKextTests/KauthHandlerTests.mm:506

       Executed 92 tests, with 5 failures (0 unexpected) in 0.196 (0.229) seconds

I think I might have found the root cause of this issue.
In this commit:
https://github.com/microsoft/VFSForGit/commit/18d008771f1d50264ae59a7001b1663d2e9c620e
Some new scenarios (that use different vnodes) were added to the testShouldHandleFileOpEvent test above the failing check:
// KAUTH_FILEOP_OPEN
XCTAssertTrue(
    ShouldHandleFileOpEvent(
        &perfTracer,
        context,
        testVnodeFile.get(),
        nullptr, // path
        KAUTH_FILEOP_OPEN,
        false, // isDirectory,
        &rootHandle,
        &pid));
XCTAssertTrue(rootHandle == testRootHandle);
// Finding the root should have added testVnodeFile to the cache
XCTAssertTrue(testVnodeFile.get() == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].vnode);
XCTAssertTrue(rootHandle == self->cacheWrapper[ComputeVnodeHashIndex(testVnodeFile.get())].virtualizationRoot);

The new vnodes (e.g. repoRootVnode) could cause the above check to fail if they randomly hash to the same slot in the vnode cache as testVnodeFile (for the unit tests there are 64 slots).
Prior to adding the new scenarios the above check (after KAUTH_FILEOP_OPEN) was the always the first scenario tested and so it was guaranteed that there would be no cache collisions when inserting testVnodeFile.
I will work on cleaning this up (e.g. split the test up into separate tests that won’t interfere with each other).

repo: microsoft/VFSForGit


text:
Fix #98, Update build.bat, support for build tools and VS2022

Resolves issue #98

Thanks!

authors: benhillis srbala

repo: microsoft/WSL-DistroLauncher


text:
WSL2 won't launch even after troubleshooting with Hyper-V

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.3880
Expected Behavior
-WSL should install and work after fixing Hyper-V
Actual Behavior
-WSL2 thinks HyperV is not installed
I'm using WSL2
the Error:
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS.
Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
All the components i turned on are:
"Virtual Machine Platform"
"Windows Subsystem for Linux"
"Hyper-V"
and "WIndows Hypervision Platform"
I accidentally ran some weird looking .exe file that disabled Hyper-V and i had to get Hyper-V back, but even after Re-installing it, WSL2 won't launch
I even have Virtualization Enabled in my BIOS
and here are the logs:
WslLogs-2024-07-12_13-39-53.zip
does anyone know what i can do to fix this?

WslLogs-2024-07-12_13-39-53.zip

Hey,
Just faced the same problem. My issue was resolved by going into BIOS and enabling SVM mode.

Enter the BIOS setup screen on startup
Access the "Advanced CPU Core Settings" menu
Enable "SVM Mode"

Perhaps give this a go. As a sidenote, my WSL2 faced this error immediately after I updated my Windows. I had tried other solutions (including restarting "Virtual Machine Platform", "HyperV", etc..), but none seemed to work except this one.

@KerimKAintHere: Looking at the logs, I can see that the BCD doesn't boot with hypervisr:
hypervisorlaunchtype    Off

Can you try running (elevated command prompt):
bcdedit /set hypervisorlaunchtype auto

And reboot to see if that solves the issue ?

.

what is svm ?

.

what is svm ?

SVM refers to "Secure Virtualization Mode". Basically, enabling that option will enable virtualization, which WSL2 depends on.

authors: KerimKAintHere OneBlue ashish111333 hokeiiiching

repo: microsoft/WSL


text:
Network resource \wsl$\ is invalid according to .NET's System.Uri

I'm on Windows 10 version 1909 [build 10.0.18363.476] and have Ubuntu 18.04 running in WSL.
I've noticed that some Windows apps have issues when accessing Linux paths as network resource in the form of \\wsl$\Ubuntu-18.04\some\dir.
In my case, these apps are using the .NET API System.Uri to validate uniform resource identifiers (URI).
I made some tests and concluded the problem is very likely that \\wsl$\ is an invalid machine name:

On one hand, \\wsl$\Ubuntu-18.04\some\dir is accessible as any normal directory, e.g. from the Windows Explorer.
On the other hand, validation of \\wsl$\Ubuntu-18.04\some\dir with methods like System.Uri.TryCreate fails.
Formally, this result seems to be correct to me, since \\wsl$\ is effectively an invalid name for network resources.

Here's a minimal example for reproduction with .NET Core 3.0:
using System;

namespace NetCoreApp
{
    class Program
    {
        static void Main()
        {
            string[] dirs = { "\\\\wsl$\\Ubuntu-18.04\\some\\dir", // WSL network resource (escaped)
                              "\\\\wsl\\Ubuntu-18.04\\some\\dir"}; // removed the dollar sign
            foreach (string dir in dirs)
            {
                Uri.TryCreate(dir, UriKind.RelativeOrAbsolute, out Uri uriCreated);
                if (uriCreated != null)
                    Console.WriteLine("Created URI: " + uriCreated + " from string " + dir);
                else
                    Console.WriteLine("Could not create an URI from string " + dir);
            }
        }
    }
}

The output is:
Could not create an URI from string \\wsl$\Ubuntu-18.04\some\dir
Created URI: file://wsl/Ubuntu-18.04/some/dir from string \\wsl\Ubuntu-18.04\some\dir

I am aware of https://github.com/microsoft/WSL/issues/4308, which I think is describing the same issue.
However, the problem is not limited to Visual Studio, but probably affecting any .NET app using URIs.

This seems like a .NET issue, not a WSL issue.

As far as I know, a valid hostname may only contain letters a-z, numbers 0-9 and minus -. That's what .NET is checking for and I think it actually does the right thing, because it sticks to the relevant RFCs.
It's a WSL design decision to deliberately use an invalid hostname wsl$. Or at least that's what I understand from this blog post (in particular the Q&A at the end of the post) written by @craigloewen-msft.
In other words: WSL has opted for a non-standard hostname. This can create problems with any software working with hostnames and expecting strict standard conformity. This includes, but is not limited to, the .NET Framework itself as well as apps built on top of it.

https://github.com/dotnet/runtime/issues/36595#issuecomment-637788627 seems they are planning to change the hostname to something else which doesn't violates the spec.

According to the release notes, this has been fixed in build 20175:
- Change \\wsl$ prefix to \\wsl to support URI parsing. The old \\wsl$ path is still supported.

authors: BLumia DHowett-MSFT mast-eu


text:
I use the XXX.sh to install applications ,but it can't find the source,why?But I use the command "sudo apt-get install ",it can find the source

the shell script:
#!/bin/sh
sudo apt-get install wget
sudo apt-get install python3-pip
sudo apt-get install digikam
sudo apt-get install krita
It can't work
use command line ,type "sudo apt-get install python3-pip" ，work.

/template


text:
lockscreen makes WSL openssh-server unavailable

Windows Build Number
10.0.21387.1
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.16
Distro Version
Ubuntu 20.04
Other Software
openssh-server
Version: 1:8.2p1-4ubuntu0.2
Repro Steps
Enable ssh server
/etc/init.d/ssh start
(terminal windows are kept open to persist WSL session)
Lock Windows (WIN+L)
Expected Behavior
Successful ssh login
Actual Behavior
Access denied
However a simple HTTP server persists.
Diagnostic Logs
No response

This looks like an ssh issue.
Can you share logs from sshd and ssh ?

I believe I have narrowed it down to being an issue with interop command (e.g. all commands called from Windows).
Jun  2 16:17:16 hostname sshd[15864]: Connection from 172.16.64.1 port 51909 on 172.18.127.198 port 22 rdomain ""
Jun  2 16:17:17 hostname sshd[15864]: Accepted key ED25519 SHA256:VLRrNq0TyXymTc4N2OlizvQ73LG9xkJiyFXAMMOCaVo found at /home/foo/.ssh/authorized_keys:3
Jun  2 16:17:17 hostname sshd[15864]: Postponed publickey for foo from 172.16.64.1 port 51909 ssh2 [preauth]
Jun  2 16:17:17 hostname sshd[15864]: Accepted key ED25519 SHA256:VLRrNq0TyXymTc4N2OlizvQ73LG9xkJiyFXAMMOCaVo found at /home/foo/.ssh/authorized_keys:3
Jun  2 16:17:17 hostname sshd[15864]: Accepted publickey for foo from 172.16.64.1 port 51909 ssh2: ED25519 SHA256:VLRrNq0TyXymTc4N2OlizvQ73LG9xkJiyFXAMMOCaVo
Jun  2 16:17:17 hostname sshd[15864]: pam_unix(sshd:session): session opened for user foo by (uid=0)
Jun  2 16:17:17 hostname sshd[15864]: User child is on pid 15958
Jun  2 16:17:17 hostname sshd[15958]: Starting session: command for foo from 172.16.64.1 port 51909 id 0
Jun  2 16:17:17 hostname sshd[15958]: Received disconnect from 172.16.64.1 port 51909:11: NMSSH: Disconnect
Jun  2 16:17:17 hostname sshd[15958]: Disconnected from user foo 172.16.64.1 port 51909
Jun  2 16:17:17 hostname sshd[15864]: pam_unix(sshd:session): session closed for user foo

A simple echo always completes, as soon as .exe is into the mix and you have locked the screen, it does not execute.
I think its interop related.
I hope there's an explanation or solution :)

authors: OneBlue dezza


text:
WSL2 suddendly stopped to reach the network

Version
10.0.22000.348
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.60.1
Distro Version
any Distrib but i use Debian most of the time
Other Software
No response
Repro Steps
sudo ping google.com
Expected Behavior
send paquet to google
Actual Behavior
network unreachable with wsl2 but works fine with wsl1
Diagnostic Logs
Things i have tried
wsl --shutdown
ipconfig:
Carte réseau sans fil Wi-Fi :

Suffixe DNS propre à la connexion. . . :

Adresse IPv6. . . . . . . . . . . . . .: 2a04:cec0:1122:96c9:e4c4:5606:68f6:36ea

Adresse IPv6 temporaire . . . . . . . .: 2a04:cec0:1122:96c9:ad16:4324:978b:c5ee

Adresse IPv6 de liaison locale. . . . .: fe80::e4c4:5606:68f6:36ea%7

Adresse IPv4. . . . . . . . . . . . . .: 192.168.43.121

Masque de sous-réseau. . . . . . . . . : 255.255.255.0

Passerelle par défaut. . . . . . . . . : fe80::683f:a2ff:fe5c:72fb%7

192.168.43.1

Carte Ethernet Connexion réseau Bluetooth :

Statut du média. . . . . . . . . . . . : Média déconnecté

Suffixe DNS propre à la connexion. . . :

Carte Ethernet vEthernet (WSL) :

Suffixe DNS propre à la connexion. . . :

Adresse IPv6 de liaison locale. . . . .: fe80::6046:a673:811d:76ac%22

Adresse IPv4. . . . . . . . . . . . . .: 172.17.64.1

Masque de sous-réseau. . . . . . . . . : 255.255.240.0

Passerelle par défaut. . . . . . . . . :

netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
Reboot pc a lot of times

Disabled Ipv6 but nor windows nor wsl have reached network without IPv6
Disabled the windows firewall
disabled fast boot
Uninstall install WSL
Upgrade to Windows 11 (and i regret it...)
sudo nano /etc/resolv.conf
Remove line out the nameserver nameserver 17...
add this new line nameserver 8.8.8.8
sudo nano /etc/wsl.conf
Paste the following in

So i can't figure what is happening to my laptop, if you have any idea of what can i try to fix it I will appreciate it.

I'm having similar problem, which might be related. For me, what helps is to deactivate Windows Firewall. I've submitted it in separate issue on #7823

Unfortunately deactivate the firewall doesn't work for me.

This solution works, but every time wsl is restarted the nameserver is automatically regenerated. seems that the /etc/wsl.conf has no effect.

Have a look at the routing table, @jonascarfantan. Use route print. Make sure the default route for the IP assigned to the network inferface in your Linux distro is to the WSL virtual network adapter in Windows. Make sure the route with the lowest metric moves traffic to WSL virtual network adapter.
I wrote a long post about it https://janovesk.com/wsl/2022/01/21/wsl2-and-vpn-routing.html. In my scenario the route is messed up by a VPN. I don't know if you are running one, but double check the routing table.

@janovesk, your blog post saved me a ton of pain and suffering (and taught me something in the process). Thank you for the detailed description. I scripted it up here: https://github.com/Codym48/fix-wsl2-vpn

authors: Codym48 danchitnis dckface janovesk jonascarfantan


text:
git wsl documentation bug git credential manager core.exe not found

Version
10.0.19044.1526
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.16.3
Distro Version
Ubuntu  20.04
Other Software
git 2.25.1 on wsl
git 2.36.1 on windows
Repro Steps
Go here
https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git
and follow "Git Credential Manager setup" steps
Expected Behavior

git push

should be successful
Actual Behavior

git push
/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get: 1: /mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe: not found
Username for 'https://github.com': ^C

Diagnostic Logs
No response

The solution is to change the step to this:
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager-core.exe"
because they moved the exe to a different directory

Closing due to the issue being solved above

Closing due to the issue being solved above

Perhaps change the documentation as well?

Closing due to the issue being solved above

Page on this document still libexec/git-core/git-credential-manager-core.exe

This should be reopened to fix the documentation

https://github.com/MicrosoftDocs/WSL/pull/1556/files

I'm so confused: GCM tooling moved to new location. by pmartincic * Pull Request #1555 * MicrosoftDocs/WSL (github.com)https://github.com/MicrosoftDocs/WSL/pull/1555
From: Ben Hillis @.>
Sent: Tuesday, June 14, 2022 5:35 PM
To: microsoft/WSL @.>
Cc: Peter Martincic @.>; Assign @.>
Subject: Re: [microsoft/WSL] git wsl documentation bug git credential manager core.exe not found (Issue #8395)
For future reference - our docs are open source and we accept contributions. Thanks for the follow up!

Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWSL%2Fissues%2F8395%23issuecomment-1155846909&data=05|01|pmartincic%40microsoft.com|cde378da77cc42844a2b08da4e66d4d1|72f988bf86f141af91ab2d7cd011db47|1|0|637908500812284042|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=yhwvUaf8IeJxX%2BdolDhipo%2F6JxOSyBIemMw%2FO7tOZRY%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAYOPA4UOPJJWUDJTFKDNLNLVPEQJ5ANCNFSM5VPTRDKQ&data=05|01|pmartincic%40microsoft.com|cde378da77cc42844a2b08da4e66d4d1|72f988bf86f141af91ab2d7cd011db47|1|0|637908500812284042|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=5wBi9cqsBZZjyVkpcakgQVHgWgx4o4YmtyzamrmoNxE%3D&reserved=0.
You are receiving this because you were assigned.Message ID: @.***>

This was helpful for me in solving it.
https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/rename.md
I edited my ~/.config
This was the OLD
helper = /mnt/c/Program\\ Files/Git/mingw64/bin/git-credential-manager-core.exe
This is the NEW
helper =
  helper = /mnt/c/Program\\ Files/Git/mingw64/bin/git-credential-manager.exe

There is a blank helper on purpose. See the link above.

This might be related: Git Credential Manager Rename

For version 2.34.1 this worked for me.
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe"
To check for the directory of git credential manager on you system, Do the following.
Check for the version of your git using git --version
If GIT installed is >= v2.39.0

Open File Explorer
Open Local Disk (C:)
Open Program Files Folder
Open Git Folder
Open mingw64 Folder
Open bin Folder
search for git-creadential or any related file name with .exe extension

else if version is < v2.36.1 enter this command:

Open File Explorer
Open Local Disk (C:)
Open Program Files Folder
Open GIt Folder
Open mingw64 Folder
Open libexec Folder
Open git-core Folder
search for git-creadential or any related file name with .exe extension

authors: adthonb benhillis kozell owenschupp ozumahe pmartincic sys13 wnim zzJZzz


text:
Correct grammar and punctuation mistakes

I've used this free grammar checker and found some mistakes in the readme.md that I would recommend to fix. I also think there are a lot more in the individual sections, would be nice to have clean and mistake free course.
Possibly, there could be a lot of subtasks, one for the readme and others for the individual sections.

That's cool but few of these are mistakes, so please do a manual check if you find typos. We have done our best, including using Ale, to present a 'clean and mistake-free course'.
The mistakes I do see here are the possible omission of a period after 'template' and the omission of backticks for '/solutions'. Please PR actual typos if you do find them.

That's cool but few of these are mistakes, so please do a manual check if you find typos. We have done our best, including using Ale, to present a 'clean and mistake-free course'.
The mistakes I do see here are the possible omission of a period after 'template' and the omission of backticks for '/solutions'. Please PR actual typos if you do find them.

closing this; please PR any typos you find and I will merge them if appropriate.

closing this; please PR any typos you find and I will merge them if appropriate.

Thanks 👍

Thanks 👍

authors: GintasS jlooper

repo: microsoft/Web-Dev-For-Beginners


text:
Fixes some links from PT Translations

Some of the links in PT and PT-BR translations were not working properly.

@microsoft-github-policy-service agree