text:
Add async API via Project Reactor

In addition to the blocking interface, offer an async API that either uses Project Reactor or allows apps to adapt an async API to it.
Reference: https://projectreactor.io

@cgillum: it appears you may have more context on this one? Not immediately sure how to label this one.

This is a feature request by the Dapr project to add new functionality to the core Durable Task Java APIs.

Thanks. @kaibocai please look to triage this request with the DF Java team :)

Add related issues https://github.com/microsoft/durabletask-java/issues/3, https://github.com/microsoft/durabletask-java/issues/2

FYI, the dependency on Project Reactor is being reconsidered in the Dapr community in favor of CompletableFuture. See https://github.com/dapr/java-sdk/issues/964

authors: artursouza cgillum davidmrdavid kaibocai

repo: microsoft/durabletask-java


text:
Add ability to trace all functions in eBPF kernel drivers

Describe the feature you'd like supported
Performance investigation can benefit from accurate measurement of time spent in a particular function. This is especially important for hot execution paths called from eBPF extensions.

dtrace can be used to trace most user and kernel functions using Function Boundary Tracing (fbt). Fbt instrumentation uses unwind information from the pdata image section to get information about function prologue and epilogues; this is sometime unavailable for leaf functions not calling any imported API since they may not have unwind information.
The eBPF kernel drivers should be modified such that tracing tools such as dtrace can be used to trace all functions.
Proposed solution
The /allpdata linker flag forces inclusion of all functions in the pdata section, thus enabling FBT tracing of any function.
Additional context
No response

If dtrace is later implemented on top of ebpf, would this cause a circular dependency?
Or how would it work?   I.e., what happens if you try to trace the dtrace implementation with dtrace today?

If dtrace is later implemented on top of ebpf,
When I briefly discussed this with @Alan-Jowett, he mentioned that implementing dtrace with ebpf was proposed in the past. Seems like an interesting idea. I believe he mentioned the primary reasoning against this approach was concern about having an "interpreter" in the kernel, though don't know if that's still true today. Do you know if there is serious interest in this possibility today, or was your question more out of curiosity?

would this cause a circular dependency? Or how would it work? I.e., what happens if you try to trace the dtrace implementation with dtrace today?

Good question, I don't know, but I believe I saw something in the dtrace docs that excludes tracing its own impl. I'll look into this more deeply to understand this better and report back.

The /allpdata linker flag generates stack unwinding information that can be consumed by dtrace among other tools. This is not specific to dtrace.
The point about cyclic dependency will be considered if/when dtrace is implemented using eBPF.

Here is more information about pdata for reference:
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-pdata-section

source: gharchive/issue

authors: Alan-Jowett abeltrano dthaler shankarseal

repo: microsoft/ebpf-for-windows

license: MIT

license_type: permissive

license_source: github-api


text:
DRAFT

Description
Describe the purpose of and changes within this Pull Request.
Testing
Do any existing tests cover this change? Are new tests needed?
Documentation
Is there any documentation impact for this change?
Installation
Is there any installer impact for this change?

Successful test of the fix to hyper-v adapter vSwitch connection on the 'bad' runner host.
Uploaded 140MB artifact in under 2 min.
Not blazingly fast, but it works and is reasonable for our expected file sizes: KM dump 600MB, perf ETLs 1GB.
I'll follow up with a change to compress those files.

source: gharchive/pull-request


text:
Fix export _type

Description
When using _type with multiple resources no resources are exported.
Related issues
Addresses #1596
Testing
New unit tests
FHIR Team Checklist

[x] Update the title of the PR to be succinct and less than 50 characters
[x] Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
[x] Tag the PR with the type of update: Bug, Dependencies, Enhancement, or New-Feature
[x] Tag the PR with Azure API for FHIR if this will release to the managed service
Review squash-merge requirements

Semver Change (docs)
Patch (Bug)

Should we add an E2E test for this scenario? Seems like we could use a modification of GivenFhirServer_WhenGroupObervationDataIsExported_ThenExportedDataIsSameAsDataInFhirServer with multiple types instead of only Encounter. That should cover the above scenario

Should we add an E2E test for this scenario? Seems like we could use a modification of GivenFhirServer_WhenGroupObervationDataIsExported_ThenExportedDataIsSameAsDataInFhirServer with multiple types instead of only Encounter. That should cover the above scenario

authors: LTA-Thinking namadabu

repo: microsoft/fhir-server


text:
kigogl

kxkfkfl

closing Pull Request Failed Not Ihada stroke :(

@willchavez close as not planned

authors: magda290 nataliakeniganti ynyue

repo: microsoft/fluentui-emoji


text:
Improve FastParseCommand performance & readability

Modified the code to use utf8 literals for improved readability and switched to using binary tree approach for finding the correct command.
This is a big perf win for .NET 8 (disabled PGO to make sure to not have bias) but .NET 6 lacks a bit behind or regresses slightly but all seems acceptable to me.
| Method | Runtime  | Value                   | Mean      | Error     | StdDev    | Median    | Ratio | RatioSD | Code Size |
|------- |--------- |------------------------ |----------:|----------:|----------:|----------:|------:|--------:|----------:|
| Main   | .NET 6.0 | *1\r\n$7\r\nUNWATCH\r\n |  7.579 ns | 0.2431 ns | 0.7054 ns |  7.596 ns |  1.00 |    0.00 |   1,940 B |
| Pr     | .NET 6.0 | *1\r\n$7\r\nUNWATCH\r\n |  8.283 ns | 0.2940 ns | 0.8670 ns |  8.326 ns |  1.00 |    0.00 |   3,518 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 8.0 | *1\r\n$7\r\nUNWATCH\r\n |  7.018 ns | 0.4226 ns | 1.2327 ns |  7.036 ns |  0.93 |    0.18 |   1,924 B |
| Pr     | .NET 8.0 | *1\r\n$7\r\nUNWATCH\r\n |  4.047 ns | 0.1540 ns | 0.4540 ns |  4.083 ns |  0.49 |    0.08 |   2,610 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 6.0 | *2\r\n$3\r\nGET\r\n$    |  5.821 ns | 0.2053 ns | 0.5892 ns |  5.659 ns |  1.00 |    0.00 |   1,940 B |
| Pr     | .NET 6.0 | *2\r\n$3\r\nGET\r\n$    |  6.792 ns | 0.1738 ns | 0.4198 ns |  6.830 ns |  1.00 |    0.00 |   3,518 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 8.0 | *2\r\n$3\r\nGET\r\n$    |  6.305 ns | 0.1747 ns | 0.5041 ns |  6.280 ns |  1.09 |    0.14 |   1,924 B |
| Pr     | .NET 8.0 | *2\r\n$3\r\nGET\r\n$    |  3.869 ns | 0.1494 ns | 0.4407 ns |  3.885 ns |  0.57 |    0.08 |   2,610 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 6.0 | *3\r\n$6APPEND\r\n      |  7.055 ns | 0.1865 ns | 0.5469 ns |  7.144 ns |  1.00 |    0.00 |   1,940 B |
| Pr     | .NET 6.0 | *3\r\n$6APPEND\r\n      | 15.372 ns | 0.4516 ns | 1.3315 ns | 15.393 ns |  1.00 |    0.00 |   3,518 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 8.0 | *3\r\n$6APPEND\r\n      |  6.402 ns | 0.2331 ns | 0.6800 ns |  6.297 ns |  0.91 |    0.11 |   1,924 B |
| Pr     | .NET 8.0 | *3\r\n$6APPEND\r\n      |  3.608 ns | 0.1241 ns | 0.3660 ns |  3.627 ns |  0.24 |    0.03 |   2,610 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 6.0 | *3\r\n$6INVALID         |  7.586 ns | 0.2431 ns | 0.7130 ns |  7.526 ns |  1.00 |    0.00 |   1,940 B |
| Pr     | .NET 6.0 | *3\r\n$6INVALID         | 17.306 ns | 0.6646 ns | 1.9595 ns | 17.236 ns |  1.00 |    0.00 |   3,518 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 8.0 | *3\r\n$6INVALID         |  6.787 ns | 0.3323 ns | 0.9641 ns |  6.525 ns |  0.90 |    0.14 |   1,924 B |
| Pr     | .NET 8.0 | *3\r\n$6INVALID         |  3.440 ns | 0.1191 ns | 0.3360 ns |  3.446 ns |  0.20 |    0.03 |   2,610 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 6.0 | PING\r\n                |  2.073 ns | 0.0989 ns | 0.2854 ns |  2.051 ns |  1.00 |    0.00 |   1,940 B |
| Pr     | .NET 6.0 | PING\r\n                | 12.594 ns | 0.3338 ns | 0.9790 ns | 12.674 ns |  1.00 |    0.00 |   3,518 B |
|        |          |                         |           |           |           |           |       |         |           |
| Main   | .NET 8.0 | PING\r\n                |  2.067 ns | 0.0968 ns | 0.2809 ns |  2.061 ns |  1.02 |    0.22 |   1,924 B |
| Pr     | .NET 8.0 | PING\r\n                |  1.021 ns | 0.0690 ns | 0.1889 ns |  1.039 ns |  0.08 |    0.02 |   2,610 B |

Benchmark code:
public unsafe class Benchmark
{
    [Params("*2\r\n$3\r\nGET\r\n$", "*1\r\n$7\r\nUNWATCH\r\n", "PING\r\n", "*3\r\n$6APPEND\r\n", "*3\r\n$6INVALID")]
    public string Value;

    private GCHandle handle;
    private byte* bytePointer;

    [GlobalSetup]
    public void GlobalSetup()
    {
        byte[] bytes = Encoding.ASCII.GetBytes(this.Value);

        this.handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
        this.bytePointer = (byte*)this.handle.AddrOfPinnedObject();
    }

    [Benchmark]
    public RespCommand Main() => OldFastParseCommand(this.Value.Length, this.bytePointer);

    [Benchmark]
    public RespCommand Pr() => NewFastParseCommand(this.Value.Length, this.bytePointer);

    [GlobalCleanup]
    public void GlobalCleanup() => this.handle.Free();
}

@microsoft-github-policy-service agree

Failures seem to be unrelated, other PRs are failing with same tests related to the TLS handshake.

Was actually able to find small workaround for the small regression on .NET 6. This is now a perf win all across the board.

Great job! Thank you for your diligent work on this. There's definitely a lot of room for performance optimization in the parsing loop, and your approach seems spot-on.
However, I am holding off on merging this pull request for now. We're currently in the process of refactoring the parsing logic, and we have made changes to the semantics of the FastParseCommand() function (see PR #164). The new version you've proposed aligns well with the new interface, and I appreciate the improved readability.
If you have the time, I’d appreciate it if you could review the PR and provide any comments. Once #164 is merged, we can proceed with integrating this one.

PS: Thanks also for the benchmark! This is super useful. Once we have command parsing and execution separated, we should think about adding a proper parsing benchmark that follows your example.

I see, glad someone was already working on larger clean up on this. Looks like we had similar ideas already. Seems to be a very nice clean up :)

Updated the PR on top of main as #164 is merged now. I didn't touch any of the FastParseArrayCommand as the mileage varies on how much benefit you get from there with this pattern.

authors: aromaa lmaas

repo: microsoft/garnet


text:
Create Author Jim Bound

All_Requested_Model_Must_Input
Input_Dina_Elraddad

Today

If today == peace and respect
If not == I don’t know

[]_[Allowed, host]
dict_environ
(command-Header)
Start_Response
_Response_Header
('HeaderName', 'Header_Name')
_Response_Header_Name == 'Allowed'
_'Allowed' == 'Gadewis949@gmail.com'
if_further_change_code == excute
_getattr_gadewis949@gmail.com
run_String
_run_String-Content
Call
_Call_Str
Print(String-Content)
Print(+201112888935)
def_Date(Sunday, 17/06/2024)
def_Time(9AM)
_Call_StringBytes
Write
_Write_String-Content
_Write_StringBytes
start_Response
Response_headers
"Requsted_Methods" == "Input, Get"
_Get_Link.Url
_https == Url
_Get("http://bgm.uni-plovdiv.net:40158/copyright")
<nod id "13314303"
_changeset"18074"
timstamp "2024-06-17T18:94:04Z"
_Input_version"1"
_Get_Model " 1:3:3:1:4:3:0:3"
_Get_www.scribe.com
_Get_https: Support.com/hc/articles/21012
_nodes_all
_link_All_Model_Addressing-Type(IPv6-Addressing)
_link_Type(Unicast, Multicast, anycast)
Input_Model
All_Models_Must_Input
"the company"
input.info
"we"
"our"
"Us"
"Guidlines"
"You"
"your"
"User"
"Users"
"Subscription Content"
"EEA+"
"U.K"
"Scribd.Inc"
"the Company"
"Entity"
"You"
"Your"
"Trademarks"
"UGC"
"Content"
"User Content"
"Reference Sites"
"The Effects of Cancellation or Termination"
"Our Proprietary Rights"
"Idemnification"
"Disclaimers; No Warranties"
"Limiation of Liability and Damages,"
"Dispute Tesolution,"
"Miscellaneous"
"Materials"
"NAM"
"Dispute"
"Disputes"

repo: microsoft/generative-ai-for-beginners


text:
Fix missed error return in loadCipher

We were missing to return an error when a cipher algorithm could not be fetched. That error can only occur if there is something wrong in CNG itself or we call loadCipher with the wrong arguments, which we are not.
I haven't found a way to trigger this bug from the public API, so I'm not adding a test for it in this PR. I´ll submit a follow-up PR that simplifies all calls to loadOrStoreAlg so the caller doesn't have to do the error handling on the calling site.

In hindsight, should this have been caught in a test?

In hindsight, should this have been caught in a test?

It is not possible to trigger an error in that line of code using the public API (at least without mocking CNG itself), and we normally don't test implementation details (aka black box testing). In https://github.com/microsoft/go-crypto-winnative/pull/63 I've removed the offending lines, so this error shouldn't happen again.
Having said this, it is fine for me to add tests exercising code that is not reachable using the public API to aim for 100% of code coverage (the current coverage is 80%). We can discuss the priority of this in our weekly sync. The drawback would be less velocity, as existing code would be more difficult to refactor without breaking tests and new code would be slower to add because it would require more testing.

In hindsight, should this have been caught in a test?

It is not possible to trigger an error in that line of code using the public API (at least without mocking CNG itself), and we normally don't test implementation details (aka black box testing). In #63 I've removed the offending lines, so this error shouldn't happen again.
Having said this, it is fine for me to add tests exercising code that is not reachable using the public API to aim for 100% of code coverage (the current coverage is 80%). We can discuss the priority of this in our weekly sync. The drawback would be less velocity, as existing code would be more difficult to refactor without breaking tests and new code would be slower to add because it would require more testing.

I'd say its low priority in that case, thanks for the context!

authors: karianna qmuntal

repo: microsoft/go-crypto-winnative


text:
bump containerd version to v1.5.1

What this PR does / why we need it:
This PR bumps the containerd version to v1.5.1
Additional context
Link to the new release: https://github.com/containerd/containerd/releases/tag/v1.5.1
Signed-off-by: Priyanka Saggu priyankasaggu11929@gmail.com

cc: @dims

repo: microsoft/hcsshim


text:
HID Usage Tables V.1.3

Do you plan improve utility for HID Usage Tables V.1.3 (page 0x84/85)

Yes, I certainly plan to include all Usages from the new HUT1.3.
Currently, Waratah includes a copy of the HUT JSON.  The HUT1.3 PDF includes the .JSON as an internal attachment (HidUsageTables.json).  I plan to update Waratah to interrogate the PDF directly for this attachment, and for the user to configure which PDF to interrogate from.  This gives Waratah 'one-source-of-truth', which is the public spec.

I've recently (today) made a change where Waratah will interrogate the PDF directly.  I've also updated the embedded file to be the most recent PDF (HUT 1.3) which will address this Issue.
Closing as Resolved

repo: microsoft/hidtools


text:
IQ# - Fullstate Simulator V1 Output Format

Pass processor architecture into GenerateBitcode API. Use output format  instead of target to determine output format handling.

We are no longer pursuing this.

repo: microsoft/iqsharp


text:
Add SslEnabled option for RabbitMQ adapter

Motivation and Context (Why the change? What's the scenario?)
This option will add default SSL config in cases where RabbitMQ server uses SSL. Currently we can't connect to the most of remote RabbitMQ servers because of this, because secure connection is required.
High level description (Approach, Design)
Just one config is added SslEnabled which is boolean (false by default), when setting it to true, it will provide default SslOption to RabbitMQ.Client

LGTM, just one minor fix required before merging

✅ Done

repo: microsoft/kernel-memory


text:
serialization writer doesn't escape double quotes in strings

If a string value contains a single quote the serialization writer doesn't escape it and this produces an invalid JSON representation.
A good example of that is the OData etag field (when trying to serialize to storage after retrieving from the service)
"@odata.etag": "W/\"CQAAABYAAAAs+XSiyjZdS4Rhtwk0v1pGAAC5bsJ2\""

ends up producing
"@odata.etag": "W/"CQAAABYAAAAs+XSiyjZdS4Rhtwk0v1pGAAC5bsJ2""

Is this related to the PR awaiting review?
PR https://github.com/microsoft/kiota-serialization-json-go/pull/6

For the string part yes. For the byte one and the comma trimming no. The author hasn't replied to my initial clarification request and it's missing unit tests. Feel free to submit one focused on the quote issue. We'll resolve conflicts if the author replies.

repo: microsoft/kiota-serialization-json-go


text:
Fix WinHttp SSL validation and other small fixes

When SSL validation was added, it was only enabled for specific platforms, however there was one piece of code that was left without the platform check. This would break any other platform that doesn't use it. Original PR for reference: #517
Fixing C4701/C4703 for uninitialized variables

Hi folks,
Sorry for digging this up two months later, but how is this supposed to work?
#if HC_PLATFORM_IS_MICROSOFT && !HC_PLATFORM_UWP && !HC_PLAFTORM_XDK
HC_PLATFORM_UWP is defined as '2'. Always. So the above statement will always be false, regardless what platform you build on right? Or am I missing something?
Previous version was functionally correct:
#if HC_PLATFORM == HC_PLATFORM_WIN32 || HC_PLATFORM == HC_PLATFORM_GDK
Although it could be adapted to match the change like this:
#if HC_PLATFORM_IS_MICROSOFT && (HC_PLATFORM != HC_PLATFORM_UWP) && (HC_PLATFORM != HC_PLAFTORM_XDK)

I agree, this looks incorrect.  I will PR a fix for this and do a quick scan for other spots where it might have been messed up

In reply to: 990140683

@boczar Looks like this has since been fixed.

In reply to: 990227793

authors: boczar jgalvan jplafonta

repo: microsoft/libHttpClient


text:
Proposal:  RadialController injection input

Proposal: RadialController injection input

Summary

There is a preview API to inject HID input. Currently the input types are restricted to

keyboard
mouse
gamepad
pen

It would be great if RadialController (Surface Dial) input could be injected, too. This would enable making non-compatible devices act as RadialController devices via a user-space app instead of writing a driver.
Rationale

I put the request in this repository since the current preview API is in the Windows.UI.* namespace, and there is no good alternative where feedback feels heard
Would enable people to write e.g. emulators for RadialController without having to resort to driver development (which is a barrier)

Open Questions

If there is a better place to request this, please let me know. I just do not feel that feedback hub entries with API proposals are responded to, they seem to get lost in the stream of other feedback.

can you please file this issue in this repo ?

Done, please see https://github.com/microsoft/ProjectReunion/issues/54

authors: hansmbakker ranjeshj

repo: microsoft/microsoft-ui-xaml


text:
TextBlock text in AppBarButton.Flyout cannot be selected

Describe the bug
TextBlock text in AppBarButton.Flyout cannot be selected

Steps to reproduce the bug
<AppBarButton Content="Click me">
    <AppBarButton.Flyout>
        <Flyout>
            <TextBlock Text="The text cannot be selected" IsTextSelectionEnabled="True" />
        </Flyout>
    </AppBarButton.Flyout>
</AppBarButton>

Expected behavior
With IsTextSelectionEnabled="True", the text in textblock should be able to be selected.
Version Info
WinUI: 2.4
NuGet package version: Microsoft.UI.Xaml 2.4.3

Windows app type:

UWP
Win32

Yes
Not tested

Windows 10 version
Saw the problem?

Insider Build (20197)
Yes

May 2020 Update (19041)
Not tested

November 2019 Update (18363)
Not tested

May 2019 Update (18362)
Not tested

October 2018 Update (17763)
Not tested

April 2018 Update (17134)
Not tested

Fall Creators Update (16299)
Not tested

Creators Update (15063)
Not tested

Device form factor
Saw the problem?

Desktop
Yes

Xbox
Not tested

Surface Hub
Not tested

IoT
Not tested

Additional context

@hez2010 can you try setting the AppBarButton's AllowFocusOnInteraction property to True?

@YuliKl I've verified and it works. Thanks!

Sounds like the issue is resolved. Closing.


text:
Proposal: Support setting/changing Application.Current.RequestedTheme after app constructor (rather than throw exception)

Describe the bug
Setting Application.Current.RequestedTheme at run-time to alter the app's light/dark theme throws this exception:
System.NotSupportedException
  HResult=0x80131515
  Message=Specified method is not supported.
  Source=WinRT.Runtime
  StackTrace:
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.Microsoft.UI.Xaml.IApplication.global::Microsoft.UI.Xaml.IApplication.set_RequestedTheme(ApplicationTheme value)
   at Microsoft.UI.Xaml.Application.set_RequestedTheme(ApplicationTheme value)
   at TestApp.RootWindow.OnThemeMenuFlyoutItemClick(Object sender, RoutedEventArgs e) in S:\Code\TestApp\Views\RootWindow.xaml.cs:line 71
   at ABI.Microsoft.UI.Xaml.RoutedEventHandler.<>c__DisplayClass10_0.<Do_Abi_Invoke>b__0(RoutedEventHandler invoke)
   at WinRT.ComWrappersSupport.MarshalDelegateInvoke[T](IntPtr thisPtr, Action`1 invoke)
   at ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)

Setting the RequestedTheme property on the root Grid in my Window succeeds.  But I want to change it app-wide, not only on this window.
Steps to reproduce the bug

Use this code to reproduce:
Application.Current.RequestedTheme = ApplicationTheme.Dark;

Expected behavior

No exception and the app theme should toggle to the selected theme.
Version Info

NuGet package version:
[Microsoft.WinUI 3.0.0-preview4.210210.4]

Windows app type:

UWP
Win32

Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

October 2020 Update (19042)

May 2020 Update (19041)
Yes

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

@llongley @codendone as FYI

This is currently by design. It is a little hidden down in the Remarks section of the documentation:

The theme can only be set when the app is started, not while it's running. Attempting to set RequestedTheme while the app is running throws an exception (NotSupportedException for Microsoft .NET code). ...
You can change specific theme values at run-time after Application.RequestedTheme is applied, if you use the FrameworkElement.RequestedTheme property and sets values on specific elements in the UI.

The error message could certainly be better -- a problem we have for all errors right now. This error will be much easier to understand when the code is finally open source, since you'd then be able to see this code comment at the source of the exception:
    // RequestedTheme cannot be set after app.xaml has been loaded.

@codendone Thanks, I apologize I didn't see that remark before.  The more descriptive error message would certainly help prevent confusion on this, and as you said, error messages really need to be more detailed across the board.
I would really ask that you improve this to support app-wide theme changes without having to restart the app.  All popular modern apps support instant live theme changes between variations of light and dark themes without having to restart, and it's kind of an expected app capability at this point.  Not having support for that in a "modern" UI platform is very disappointing.  Thanks for listening!

I believe this restriction exists simply because way back in Windows 8 when the RequestedTheme support was implemented there weren't available resources to also support dynamic changes. Adding that support could be done in the future, so I'm marking this as a future feature proposal.

Thank you @codendone, much appreciated.

Guys, can you please please please add just a tad of description in the exception, when you throw it?
I wanted to bang my head against the wall on this one

A potentially dumb question: if runtime switching isn't supported, how does task manager do it? Or notepad? Both support runtime switching, and they're both using WinUI 3.

place this line of code inside your App's OnLaunched method to set m_isRequestedThemeSettable to true
*(bool*)(((IWinRTObject)this).NativeObject.As<IUnknownVftbl>(IApplicationIID).ThisPtr + 0x118U) = true;

(Tested and works in WASDK 1.6.3)

Additional Context:
https://github.com/microsoft/WindowsAppSDK/discussions/4710#discussioncomment-10741712

place this line of code inside your App's OnLaunched method to set m_isRequestedThemeSettable to true
(bool)(((IWinRTObject)this).NativeObject.As(IApplicationIID).ThisPtr + 0x118U) = true;
(Tested and works in WASDK 1.6.3)
Additional Context: microsoft/WindowsAppSDK#4710 (comment)

what is IApplicationIID ?

what is IApplicationIID ?

@ghost1372  My bad, you can find through looking the code decompiled by VS.
There is a Make___objRef_global__Microsoft_UI_Xaml_IApplication method in Application

And finally get this

what is IApplicationIID ?

@ghost1372 My bad, you can find through looking the code decompiled by VS.
There is a Make___objRef_global__Microsoft_UI_Xaml_IApplication method in Application

And finally get this

thank you now its working fine
complete code:
unsafe
{
(bool)(((IWinRTObject)this).NativeObject.As(IID).ThisPtr + 0x118U) = true;
}
public static ref readonly Guid IID
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference((ReadOnlySpan)new byte[16]
{
231, 244, 168, 6, 70, 17, 175, 85, 130, 13,
235, 213, 86, 67, 176, 33
}));
}
}

authors: Lightczx ajsuydam billhenn codendone ghost1372 jtorjo ranjeshj


text:
NavigationView Invalid Theme Resources

Describe the bug
WinUI 2.5
https://github.com/microsoft/microsoft-ui-xaml/blob/7b55398026652cc95e82d96dc5be1aae3ee1204f/dev/NavigationView/NavigationView_rs1_themeresources.xaml#L63-L75
This should be rather:
            <StaticResource x:Key="TopNavigationViewItemForeground" ResourceKey="TextFillColorSecondaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
            <StaticResource x:Key="TopNavigationViewItemBackgroundPointerOver" ResourceKey="SubtleFillColorTransparentBrush" />
            <StaticResource x:Key="TopNavigationViewItemBackgroundPressed" ResourceKey="SubtleFillColorTransparentBrush" />
            <StaticResource x:Key="TopNavigationViewItemBackgroundSelected" ResourceKey="SubtleFillColorTransparentBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundSelected" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundSelectedPointerOver" ResourceKey="TextFillColorSecondaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemForegroundSelectedPressed" ResourceKey="TextFillColorTertiaryBrush" />
            <StaticResource x:Key="TopNavigationViewItemBackgroundSelectedPointerOver" ResourceKey="SubtleFillColorTransparentBrush" />
            <StaticResource x:Key="TopNavigationViewItemBackgroundSelectedPressed" ResourceKey="SubtleFillColorTransparentBrush" />

I've removed the last entry and added Selected to the remaining last two entries. Currently you cannot style the background of a selected item hover effect.
I did not open a PR, as the new/correct themeresources must also be applied in the corresponding template, and I am not that deep into the code. It should be easy though.

@karenbtlai FYI

I'll look into this.

authors: AtosNicoS StephenLPeters chingucoding


text:
Hide ProgressBarTrack in IndeterminateError and IndeterminatePause

Description

Hide ProgressBarTrack in IndeterminateError and IndeterminatePause to match specs
Tweak ProgressBarTestPage to be more usable

Screenshots (if appropriate):

Error:

Paused:

/azp run


text:
Add instructions for integrating ESM version with snowpack

Can we have instructions on how to integrate the ESM version of Monaco with Snowpack?
As in here:
https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-esm.md
I'm currently trying different configurations and all seems to work except when workers are created.
If any one has a simple snowpack setup to share I can try it and have a PR to update the docs

except when workers are created

Do you by any chance get an "Unexpected usage" error? From what I understand this might be broken in ESM https://github.com/microsoft/monaco-editor/issues/2212

Yes! Basically I have this (unnecessary stuff left out for readability)
Main application typescript:
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
import 'monaco-editor/esm/vs/editor/editor.worker.js'
import 'monaco-editor/esm/vs/language/typescript/ts.worker.js'
import 'monaco-editor/esm/vs/editor/browser/controller/coreCommands.js';
import 'monaco-editor/esm/vs/editor/contrib/find/findController.js';
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution.js';
import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js';

self.MonacoEnvironment = {
	getWorkerUrl: function (moduleId, label) {
		if (label === 'typescript' || label === 'javascript') {
			return 'web_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js';
		}
		return 'web_modules/monaco-editor/esm/vs/editor/editor.worker.js';
	}
}

By just doing an import without using, Snowpack makes the module available under http://localhost/web_modules/monaco-editor/.... Monaco does load the file successfully with a 200. But then I get a SyntaxError: import declarations may only appear at top level of a module for the first line of ts.worker.js which is a sign that it is not loaded as a ESM module.
Not sure wether to solve this in my JS-file, Snowpack or Monaco..
Thanks for your suggestion, I will check your issue!

Steps to reproduce:
npx create-snowpack-app monaco-test --template @snowpack/app-template-blank-typescript --use-yarn
cd monaco-test
yarn add monaco-editor

edit: src/index.ts
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'
import 'monaco-editor/esm/vs/editor/editor.worker.js'
import 'monaco-editor/esm/vs/language/typescript/ts.worker.js'
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution.js';
import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js';

(self as any).MonacoEnvironment = {
    getWorker: function(moduleId:string, label:string) {
    console.log("Getting worker", moduleId, label)
    if (['javascript', 'typescript'].includes(label)) {
      return new Worker('web_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js', {
        type: 'module'
      })
    }
    else {
      return new Worker('web_modules/monaco-editor/esm/vs/editor/editor.worker.js', {
        type: 'module'
      })
    }
  }
}

const app = document.getElementById('app')
if (app !== null) {
  monaco.editor.create(app, {
    value: 'function x():void {console.log("Hello world!"); }',
    language: 'typescript'
  })
}

edit: public/index.html
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>Snowpack App</title>

    You need to enable JavaScript to run this app.

And then run with yarn start (this can take a while first time).

@jesperp I am doing the same exact thing so let us know if you found a solution.

I have just tried the sample from https://github.com/microsoft/monaco-editor/issues/2227#issuecomment-731578362 and it works for me (I just added one more import to 'monaco-editor/esm/vs/editor/editor.all.js'). There seems to be a problem with the font for icons, but things appear to work:

@alexdima Thanks for your comment! Could you add your full working example? I tried adding just import 'monaco-editor/esm/vs/editor/editor.all.js' to my index.ts file but doesn't seem to work. Same error as before
editor.worker.js:1
SyntaxError: import declarations may only appear at top level of a module

Hmm, so this may be a browser issue. I tried my initial example and alexdima's with the extra import in Chrome 86. It works as expected.
Firefox 83.0 fails:

Safari 14.0.1 fails:

I am struggling to get this to work well with a snowpack + Svelte application. Been trying the past three days but keep running into worker related issues. I'm not even able to get the AMD version (/package/min) working from a /vendor mount (didn't keep a good debugging log, so can't be specific rn).
The furthest I got was based off this working gist, but I have not been able to extend that config to support Svelte.
https://gist.github.com/mattpowell/221f7d35c4ae1273dc2e1ee469d000a7
HTH

I gave it another try, starting from create-snowpack-app. It managed to get it to work for snowpack dev but not snowpack build.
The web_modules folder is not populated with the modules from install.
See the readme here for more details https://github.com/wires/debugging-snowpack-svelte-monaco

Ha, okay, managed to get this to work, the problem was I wasn't referencing the modules.
See the updated readmed here for details https://github.com/wires/debugging-snowpack-svelte-monaco

@wires I don't suppose you've managed to get this working with Snowpack 3.x?

Here is my attempt to work with Snowpack 3.x. https://github.com/luma-dev/alt-json
It bundles worker js files into single file before the snowpack compilation with esbuild. It really compiles fast so you wouldn't feel any stresses in development. Even if using esbuild, Snowpack is still necessary to treat css and font assets files imported in monaco-editor.
Main point is that Snowpack v3.x is exposing local node_modules/ to //.../node_modules/... instead of //.../web_modules/.... But even so, Snowpack prepends the import ... statements for controlling and do not bundle, so it does not work with monaco Web Worker system. We  cannot use ESModule resolution in the worker context and should prepare worker js files in one file.

I think the example in #2605 solves this issue.

authors: LumaKernel Prinzhorn alexdima alexrp jesperp naknode remcohaszing wires

repo: microsoft/monaco-editor


text:
Better documentation about how to extend

I'm trying to extend the microsoft/mssql-server-linux image for a customized one to use in our deployment that automatically deploys a database backup, much like #120 . For specifics, I've made a new Dockerfile that looks like:
FROM microsoft/mssql-server-linux
COPY ./docker-entrypoint.sh /usr/src/app
COPY ./my_db_ backup.bak /usr/src/app
ENTRYPOINT ["/bin/bash", "/usr/src/app/docker-entrypoint.sh"]

with the docker-entrypoint.sh:
/opt/mssql/bin/sqlservr & \
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$SA_PASSWORD" -Q "RESTORE DATABASE MyDB FROM DISK = '/usr/src/app/my_db_backup.bak' WITH MOVE 'MyDB_Data' TO '/var/opt/mssql/data/mydb.mdf', MOVE 'MyDB_Log' TO '/var/opt/mssql/data/mydblog.ldf';"

This fails with the following error:
2018-01-05 22:16:26.87 Logon       Error: 18456, Severity: 14, State: 7.
2018-01-05 22:16:26.87 Logon       Login failed for user 'sa'. Reason: An error occurred while evaluating the password. [CLIENT: 172.1Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'sa'..
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

Point being that my example is what I consider to be a very basic extension use case - launch a MSSQL container and restore my database. However, it does not appear to be straightforward, and the documentation, as far as I can find, does not describe how to do this. Sure, your Docker hub explanation (https://hub.docker.com/r/microsoft/mssql-server-linux/) points to an extremely basic example of how to extend (https://github.com/twright-msft/mssql-node-docker-demo-app), but doesn't show how to manage passing the configured SA_PASSWORD to commands, nor how to effectively restore a backup. As a comparison point, the Postgres image (https://hub.docker.com/_/postgres/) will automatically run any scripts you put in a particular folder on container start. It makes it very easy to set up/restore a db.
I would love to see a more complete example of how to launch a MSSQL container that restores a database backup on start.

Is this a production ready bulletproof solution?

+1
I'm trying to derive an image which adds seeded data and would love to see a better solution.  The 90s timeout and chain of script files in CMD is pretty ugly.

Hey @shawmanz32na @mikebridge did you manage to extend the docker image?
I am doing this:
FROM microsoft/mssql-server-linux:2017-latest

ENV MSSQL_SA_PASSWORD=12345qwerASDF
ENV ACCEPT_EULA=Y

RUN /opt/mssql/bin/sqlservr --accept-eula & sleep 10 \
    && /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $MSSQL_SA_PASSWORD \
       -q "CREATE DATABASE MyFirstOwnDb;  CREATE DATABASE MySecondOwnDb;" \
    && pkill sqlservr

# CMD [ "/opt/mssql/bin/sqlservr" ]

But I keep getting the same timeout error when trying to connect with sqlcmd from outside the running container.

@tappoz  I couldn't find a good solution for creating an image with seeded data in one shot.  I seed a running image with a separate script.

@tappoz I was able to create an image that would seed our data, but it was overly complicated and required that I wait some amount of time during the image build and also later when starting the container. I've sanitized and posted my approach at https://gist.github.com/shawmanz32na/ee39c8aecdf643384e810d8dd4c8afae . Again, I'm not satisfied with it, but it's better than nothing.

@shawmanz32na You can optimize your workflow by installing netcat on the server image. I expanded on your approach in the final part of my getting started series.

@twright-msft Just wanted to check in again---have you made any progress on implementing anything to make this easier?  Being able to create, seed and migrate dockerized mssql databases for various environments would be very powerful, but the sticking point is having to use a work-around to make sqlserver block until it's initialized.  I am experimenting with using Kubernetes initContainers and docker two-stage builds to do this, and @shawmanz32a's gist helps but it would be nice to be able to have this run more cleanly.

I don't know the source anymore but this works quite well:
RUN ( /opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has started" \
    && /creation/createScript.sh

RUN ( /opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has started" \
    && /creation/createScript.sh

@Falco20019 - Does this insert the data at container startup time?  Or at image creation time?
Is it possible to insert the data at image creation time?   (So that the user of the container does not have to wait for the script to run.)

@Vaccano RUN commands are executed on image creation and create a new layer.
CMD / ENTRYPOINT are executed on the container.
So this is exactly what you are looking for :)

authors: Falco20019 IvanFarkas Vaccano mikebridge mindems shawmanz32na tappoz

repo: microsoft/mssql-docker


text:
SQLServerDataTable adding column meta data requires ordering

Driver version
8.3.0.jre8-preview
SQL Server version
Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64)
Jul 20 2019 21:42:29
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.3  (Build 9600: )
Client Operating System
Windows 10
JAVA/JVM version
"11.0.2"
Table schema
N/A
Problem description

Expected behaviour: I'm able to initialize in memory datatables with a different column order than the related custom sql Type
Actual behaviour: Casting errors are thrown from SQL server when the order of columns do not match

Potential resolution would be to update the documentation to clarify this requirement.
Reproduction code
public void example(DataSource ds) throws SQLServerException {
    //Given CREATE TYPE JavaTypes AS TABLE (name VARCHAR(MAX), pathId INT)
    //Version 8.3.0.jre8-preview
    var jdbc = new NamedParameterJdbcTemplate(ds);

    var dt1 = new SQLServerDataTable();
    dt1.addColumnMetadata("name", java.sql.Types.VARCHAR);
    dt1.addColumnMetadata("pathId", java.sql.Types.INTEGER);
    dt1.setTvpName("JavaTypes");
    dt1.addRow("someName", 42);

    var dt2 = new SQLServerDataTable();
    dt2.addColumnMetadata("pathId", java.sql.Types.INTEGER);
    dt2.addColumnMetadata("name", java.sql.Types.VARCHAR);
    dt2.setTvpName("JavaTypes");
    dt2.addRow(42, "someName");

    try {
        jdbc.queryForList("SELECT * FROM :dt", Map.of("dt", dt1));
    } catch (Exception e){
        System.out.println("Error running with first data table");
    }
    try {
        jdbc.queryForList("SELECT * FROM :dt", Map.of("dt", dt2));
    } catch (Exception e){
        System.out.println(("Error running with second data table");
    }
}

Hi @FrodoOf9Fingers ,
If you don't define source and destination mappings, the driver will assume the columns are mapped based on ordinal position. For this to work, source and destination schemas must match. If they don't match, you can use addColumnMapping() API do define the relationships between source and destination columns. The behaviour is already documented here, see ColumnMappings property.

Closing the issue. Please feel free to let us know if you have any other questions.

repo: microsoft/mssql-jdbc


text:
New-BCContainer Fails with Error: hcsshim::ImportLayer failed in Win32:  Operation did not complete successfully because the file contains a virus or potentially unwanted software.

When I try to create a container for BC 14 for an upgrade project I'm doing I get an error message saying there is a virus.
$containerName = 'develop'
$userName = 'xxx'
$password = 'xxx'
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$credential = New-Object pscredential $userName, $securePassword
$auth = 'UserPassword'
$artifactUrl = Get-BCArtifactUrl -type OnPrem -country "us" -version 14 -select latest
$licenseFile = 'C:\temp\xxx.bclicense'
New-BCContainer -accept_eula
-containerName $containerName -artifactUrl $artifactUrl
-licenseFile $licenseFile -credential $credential
-auth $auth -includeCSIDE -doNotExportObjectsToText
-updateHosts
OUTPUT:
BcContainerHelper is version 6.0.30
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Pro - 10.0.26100.2605
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 27.4.0
Docker Server Version is 27.4.0
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
Pulling image mcr.microsoft.com/businesscentral:ltsc2022
ltsc2022: Pulling from businesscentral
2534953f34d3: Pulling fs layer
90641eccc9d7: Pulling fs layer
ab19c56a466f: Pulling fs layer
5bc5d6fe39aa: Pulling fs layer
9030f3365144: Pulling fs layer
23ae0aad8d9e: Pulling fs layer
5bc5d6fe39aa: Waiting
14840cc18f80: Pulling fs layer
9030f3365144: Waiting
23ae0aad8d9e: Waiting
14840cc18f80: Waiting
d2288b51ebb0: Pulling fs layer
14fd42dc107e: Pulling fs layer
1ea1b2abbd17: Pulling fs layer
88474f1ca991: Pulling fs layer
7735e7924793: Pulling fs layer
142a0f3a5628: Pulling fs layer
2b26122ffa31: Pulling fs layer
d2288b51ebb0: Waiting
7735e7924793: Waiting
142a0f3a5628: Waiting
14fd42dc107e: Waiting
1ea1b2abbd17: Waiting
88474f1ca991: Waiting
2b26122ffa31: Waiting
ab19c56a466f: Verifying Checksum
ab19c56a466f: Download complete
5bc5d6fe39aa: Verifying Checksum
5bc5d6fe39aa: Download complete
9030f3365144: Verifying Checksum
9030f3365144: Download complete
23ae0aad8d9e: Verifying Checksum
23ae0aad8d9e: Download complete
14840cc18f80: Verifying Checksum
14840cc18f80: Download complete
d2288b51ebb0: Verifying Checksum
d2288b51ebb0: Download complete
90641eccc9d7: Verifying Checksum
90641eccc9d7: Download complete
1ea1b2abbd17: Verifying Checksum
1ea1b2abbd17: Download complete
88474f1ca991: Verifying Checksum
88474f1ca991: Download complete
2534953f34d3: Verifying Checksum
2534953f34d3: Download complete
7735e7924793: Verifying Checksum
7735e7924793: Download complete
142a0f3a5628: Verifying Checksum
142a0f3a5628: Download complete
2b26122ffa31: Verifying Checksum
2b26122ffa31: Download complete
14fd42dc107e: Verifying Checksum
14fd42dc107e: Download complete
2534953f34d3: Pull complete
New-BCContainer Telemetry Correlation Id: b95ab975-f0f5-4836-901c-5fd66065b37c
DockerDo : failed to register layer: re-exec error: exit status 1: output: hcsshim::ImportLayer failed in Win32:
Operation did not complete successfully because the file contains a virus or potentially unwanted software. (0xe1)
ExitCode: 1
Commandline: docker pull  mcr.microsoft.com/businesscentral:ltsc2022
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.30\ContainerHandling\New-NavContainer.ps1:742
char:13

        DockerDo -command pull -imageName $bestImageName | Out-Nu ...

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

It also triggers my Norton antivirus.

This error happens every time I've attempted creating the container.

Images are generated in secure environments and scanned before uploaded. I would be very surprised if they would contain a virus,
If you, in a command prompt, run: docker pull mcr.microsoft.com/businesscentral:ltsc2022
Do you get the same problem???

It popped the same Norton Antivirus threat window.
Microsoft Windows [Version 10.0.26100.2605]
(c) Microsoft Corporation. All rights reserved.
C:\Windows\System32>docker pull mcr.microsoft.com/businesscentral:ltsc2022
ltsc2022: Pulling from businesscentral
2534953f34d3: Pull complete
90641eccc9d7: Extracting [==================================================>]  791.7MB/791.7MB
ab19c56a466f: Download complete
5bc5d6fe39aa: Download complete
9030f3365144: Download complete
23ae0aad8d9e: Download complete
14840cc18f80: Download complete
d2288b51ebb0: Download complete
14fd42dc107e: Download complete
1ea1b2abbd17: Downloading
88474f1ca991: Download complete
7735e7924793: Download complete
142a0f3a5628: Download complete
2b26122ffa31: Download complete
dial tcp: lookup mcr.microsoft.com: no such host

and if you try: docker pull mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022

It looks like it finds something in the layer: 90641eccc9d7 which is part of the dotnet framework image - not the Business Central image. I would say that this is a false positive or something on your machine causing this,.

I thought it was a false positive as well but wanted to make sure that if it wasn't that we were ahead of the curve on the problem. I'll report it to Norton and try to find a way to tell Norton to ignore the run of the container creation.

It isn’t during container creation - it is when pulling the docker image
Sendt fra Outlook til iOShttps://aka.ms/o0ukef

Fra: DigiTecKid @.>
Sendt: Tuesday, December 31, 2024 8:06:30 AM
Til: microsoft/navcontainerhelper @.>
Cc: Freddy Kristiansen @.>; Assign @.>
Emne: Re: [microsoft/navcontainerhelper] New-BCContainer Fails with Error: hcsshim::ImportLayer failed in Win32: Operation did not complete successfully because the file contains a virus or potentially unwanted software. (Issue #3793)
I thought it was a false positive as well but wanted to make sure that if it wasn't that we were ahead of the curve on the problem. I'll report it to Norton and try to find a way to tell Norton to ignore the run of the container creation.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/navcontainerhelper/issues/3793#issuecomment-2566561051, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACSGUAYA6IZ36NT2ROP4JZD2IK6INAVCNFSM6AAAAABUNDQ47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGU3DCMBVGE.
You are receiving this because you were assigned.Message ID: @.***>

authors: DigiTecKid freddydk

repo: microsoft/navcontainerhelper


text:
[Question] Creating Database in Business Central with customized Base Application (On-Prem)

Hi,
I posted this question on dynamics365smb-devitpro-pb repository but I'm not sure it's the best place.
My question is close to navcontainerhelper, Publish-NewApplicationToBcContainer etc... context, on which I have already worked these last months.
So that's why I'm putting it back here, hoping a life-saving response.
I followed the Creating Databases in Business Central documentation to build a Dynamics 365 Business Central wave 2 On-Premises environment with my own customized Base Application (with own id).
I also used Provisioning the Business Central Server Service Account documentation to create my server instance, together with Setting Up Multiple Business Central Web Server Instances Using PowerShell documentation to create the corresponding web server instance.
I can access to this new environment with the WebClient, no problem.
Question:
Are these documentations recommended/enough for building this kind of environment with an own customized Base Application, or should I take into consideration others best practices / documentations ?
My environment works but as you can imagine, my database is empty, application tables (ex: Permission Set, only SUPER, etc...), business tables, and my own customized Base Application tables (ex: Customer, Item, etc...) have no data.
I would like to include data, as Cronus, but I didn't find any rapidstart package in the install DVD zip.
So I used those from the closest sandbox image.
Question:
What are the best practices / documentations to reach this goal (ex: full Permission Set list, etc... as Cronus, and Customer, Item, etc... as we can find in standard, evaluation or extended packages) ?
I hope you understand what I "expect", something like this really useful documentation, Publishing a New Base Application, but for an On-Premises context.
For the moment I only had technical local issues, but soon we will have to ask ourselves questions about customers environments (Dev, Test, Prod), apps dependencies (ex: APIV1, Intelligent Cloud etc...), then later on migration to V16 and more.
I know that extensions model is the only right way, but in my case, they don't give me the choice, so, as much do things right.
Thanks a lot for your feedback.
Cordially

If you are publishing a new base application for on-premises, you could just reuse name and appid from MS baseapp - and your data should still be there (an upgrade from MS base app to your base app).
It is kind of like importing a .fob file in the "old" days.
wrt rapidstart - everything on the docker images comes from the DVD - there should be a folder called configurationPackages on the DVD as far as I remember.

Hi Freddy,
Thanks for your feedback.
To be clearer, my company is part of Ready To Go (Mega App) Microsoft program.
Our ISV solution is already on Saas with a customized Base App.
This app has her own id, name, publisher (Microsoft recommandations).
So, do you mean if we want to install this .app "as is" for an On-Prem context, we only have to keep id, name and publisher from MS Base App ?
Cordially.

For SaaS we require own id, name and publisher.
For on-prem I don't think we do and it sounds like it would be easier to avoid. Having said that, if you already have the app for SaaS - wouldn't you have demo data there?

As far as I know the Object-range for OnPrem and SAAS cannot be the same.
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-object-ranges
So there is more to than just the ID, Name and Publisher..

You are right for normal apps.
If they have a code customized base app with added objects in the partner range - it could be the same.

Indeed, as it stands I could retrieve the demo data from the Saas through the configuration packages, for example.
But that doesn't solve the problem for application tables other than Permissions, Permission Sets, does it ?
But as you say, the easiest way is to manage the .app with the MS Base App id, name and publisher.
This seems to solve many problems in an On-Prem context.
Once again thanks a lot for your time and advices.

I think I also should look deeper into Application version for aliasing base application.

Yes, that will be released in 15.3 (soon to be delivered), but won't help you on the demo data.

We're also in the embed app program. For solving the data, I create a new demo company and then load in the (extended) CRONUS demo data using the Configuration Package API.
Freddy's blog covers this quite nicely: https://freddysblog.com/2019/12/09/having-demo-data-while-developing-business-central-apps-with-docker/
This will load all of the core data (customers, items, vendors, etc.) but not the out of box app data. That's my current struggle is how to get that sample data.
Having to change the base app ID has caused no shortage of struggles to our process. :(

authors: MikeGlue NAVspecialist freddydk g-franck


text:
Missed a comma.

https://github.com/YuqiData-UW/nn-Meter/blob/6cc1a40dab0b354abd4483028c237d37c1e10c3b/nn_meter/ir_converters/frozenpb_converter/shape_inference.py#L55
This bug led softmax ops failed to propagate

Thanks for your information! We will fix this soon.

authors: JiahangXu YuqiData-UW

repo: microsoft/nn-Meter


text:
Continuous Decoding and System Prompt Preprocessing

API Changes: Continuous Decoding and System Prompt Preprocessing
Overview
This PR introduces a flexible solution to enable continuous decoding and system prompt preprocessing. Continuous decoding supports multi-turn conversations, while system prompt preprocessing processes the application's system prompt before the user inputs their prompt. The following changes are proposed:
Changes

New Method: generator.append_tokens(List: token_ids)

Appends system/user tokens to internal input_ids.
Opportunistically runs computation on the given token_ids.
Replaces params.input_ids.

New Method: generator.rewind_to(int: n_tokens)

Rewinds the KV-cache state to n_tokens.
Allows for reuse of KV-cache memory.
Enables rewinding to the system prompt between generation cycles.

Deprecation: generator.compute_logits()

This method is deprecated as it is unnecessary and confusing for users to call manually.
The model will compute/run:

At the end of an append_tokens() call.
At the beginning of a generate_next_token() call.

Deprecation: generator_params.input_ids

Input IDs are deprecated, and their functionality is replaced by append_tokens. This way, tokens are added to the generator rather than the parameters.

Limitations

append_tokens: Continuous decoding and system prompt preprocessing only work for batch size == 1. When batch_size > 1, append_tokens can only be invoked once without error. For batch size == 1, append_tokens can be called arbitrarily to enable the application designer to create their own continuous decoding/system prompt preprocessing solution.
rewind_to: For batch size > 1, rewind_to can only rewind to index 0, resetting the generation state. For batch_size == 1, however, rewind_to can rewind to any point in the conversation.
Model types: Currently, append_tokens and rewind_to are not supported for multi-modal models like phi-3v and whisper. Please use generator_params.set_inputs() to provide inputs for these model types. In the future, this workflow will likely change.

Examples

Python example with continuous decoding and system prompt preprocessing

https://github.com/microsoft/onnxruntime-genai/blob/aciddelgado/continuous/examples/python/model-qa.py

Python example with batch_size > 1

https://github.com/microsoft/onnxruntime-genai/blob/aciddelgado/continuous/examples/python/model-generate.py

I have some questions:

For models such as Whisper where we want to run custom logic on the logits before generating the next token, how will this be done with the deprecation of generator.compute_logits()? Previously, users could do the following.

while not generator.is_done():
    generator.compute_logits()
    logits = generator.get_logits()
    ...
    # modify logits with custom logic
    ...
    generator.set_logits(logits)
    generator.generate_next_token()

Can model.generate() still be supported rather than deprecated? It is the highest-level API that is currently offered and it matches Hugging Face's model.generate() API. There are also several video tutorials that already use it. I think it is fine to not support this PR's features through model.generate() and we can print a message to encourage users to use the lower-level APIs instead for these features. For new users who want to quickly try out ONNX Runtime GenAI, model.generate() is the closest API to use when transitioning from Hugging Face's APIs that they may be more familiar with.

Can you fix the Whisper example so that the original sequence length is still passed into the CUDA kernels? I think we can support this PR's features for Whisper after my rewrite.

It appears that params_->batch_size is renamed to params_->search.batch_size. Does the genai_config.json need to have a batch_size entry now?

For multi-modal models, set_inputs() only works with NamedTensors produced by our pre-processors. For Phi-3 vision/Phi-3.5 vision, this is not an issue because the pre-processor prepares all of the inputs. However, this is not the case for Whisper. Since Whisper's pre-processor doesn't produce input IDs, the removal of params.input_ids would break it. For external users, can we add input IDs to Whisper's pre-processor so that set_inputs can be used? For internal users, params.input_ids will be calculated outside of ONNX Runtime GenAI. How should we set those inputs with the removal of params.input_ids since set_inputs only works for NamedTensors?

Is generator.generate_next_token() supposed to be called twice here? The comment says to check for the first token generated but two tokens will have been generated.

https://github.com/microsoft/onnxruntime-genai/blob/d1038f8ffc47dc20344790b13714c44b18e4309d/test/python/test_onnxruntime_genai_api.py#L345-L348

@kunal-vaishnavi
To answer your questions:

In order to implement the workflow described, this is how you could modify the code snippet given:
`generator.append_tokens(prompt_tokens)
while not generator.is_done():
logits = generator.get_logits()
...
modify logits with custom logic
...
generator.set_logits(logits)
generator.generate_next_token()`
This works because get_logits will automatically compute logits if they haven't been computed already.

As a team we had decided to remove model.generate(). The reason is that input_ids has been removed from generator_params. However, if the team decides it's a good idea to reimplement model.generate I can do so. We can pass the prompt tokens like so model.generate(prompt_tokens) or we can reimplement input_ids but I think the latter would be confusing.

Will discuss offline.

Yes, I will specify that in the PR description now that you mention it.

I'm not familiar with how Whisper works so we can discuss offline. However, to clarify, This PR intends to include two workflows. The first is for Decoder Only models (Phi-3, LLama, etc.) and uses the generator.append_tokens(prompt) API to add input ids. The second is for multi-modal models (Phi-3v, etc.) and uses parameters.set_inputs() API to add inputs. We can figure out how to support Whisper cooperatively.

Yes, this is because we are measuring how long it takes to compute the logits and generate the token. The first generate_next_token call simply runs a search on logits already generated by the previous append_tokens call. The second one actually runs the model and also runs a search.

All of this sounds great. Regarding model.generate(), I'm fine with deprecating it as well since the while loop approach is only an extra line of code and it gives much greater flexibility to the user. But I think we will need to update our documentation in a lot of places (this repo, ORT docs site, any blogs, etc.) to make this change very clear.
For example, the name of this repo is "ONNX Runtime generate() API" and we have the following sentence in the main README: "You can call a high level generate() method to generate all of the output at once, or stream the output one token at a time." Neither of these will be accurate since generate() won't exist anymore.

This breaks the provided examples throughout the documentation, because you've removed params.input_ids and generator.compute_logits

authors: aciddelgado kunal-vaishnavi tarekziade

repo: microsoft/onnxruntime-genai


text:
fix: informing about bad positional argument in node constructor #1984

Patch, proposed in
https://github.com/microsoft/onnxscript/issues/1984

About None, - this part must allow None, if my understanding correct:
if self._inputs **and self._inputs[-1]** and not isinstance(self._inputs[-1], (Value)):

(actually, it allows 0.0, and that's bad, needs to change that)
if self._inputs and self._inputs[-1] is not None and not isinstance(self._inputs[-1], (Value)):

About moving check outside, will research, probably after 01.01 :)

I see, you are right. Although this check should still be moved outside for performance reasons. Feel free to propose something, or I can take a look when I get a chance.

authors: justinchuby leshabirukov

repo: microsoft/onnxscript


text:
edger8r: emitter error with in/out size arguments.

The following yields trusted code that will not compile.
        oe_host_fd_t oe_posix_accept_ocall(
            oe_host_fd_t sockfd,
            [in, out, size=addrlen] struct oe_sockaddr* addr,
            [in, out, count=1] oe_socklen_t* addrlen,
            [out, count=1] int* err);

@andschwa Can you take a look at this?

From what I understand this construct is not supported by EDL.
It ought to error out if pointers are used as size parameters.
We should also consider if it is worth enhancing EDL to support this.

If there is a bug here, it's that we're not erroring sooner, but dereferencing a pointer for size/count attributes is not supported. Here's all Intel has to say:

The count may be either an integer constant or one of the parameters to the function.

Which doesn't actually address the type of the parameter...but if you look at their implementation they just use the variable directly, meaning no magic dereferencing if it happens to be a pointer (and also other problems if it's anything but an unsigned int or otherwise safely castable to size_t).

@mikbras Can you confirm if our edger8r correctly warns you that oe_socklen_t is not a size_t type? If so, we can close this, and if not, then there may be a bug in our warning system.

@andschwa Ideally the front end ought to be erroring out for non-integer size/count parameters.
Currently I have locked down scenarios where double/floats can be passed as size/count. We ought to be erroring out for those as well.

authors: anakrish andschwa mikbras

repo: microsoft/openenclave


text:
shared_pool_alloc: zero out allocated DMA buffers

DMA buffers are expected to be zeroed out upon allocation
MSFT#53036590

Rebasing on newest main

repo: microsoft/openvmm


text:
Set-PowerBIWorkspace unexpectedly throws HttpOperationException (Unauthorized)

I noticed unexpected behavior between the Get and Set commands PowerBI workspaces:

Authenticate with a service principal via Connect-PowerBIServiceAccount using ClientSecret & ClientID credentials
Run Get-PowerBIWorkspace (should successfully show a list of workspaces to which the SP has access)
Run Set-PowerBIWorkspace -WorkspaceId $workspaceId -CapacityId $capacityId -Scope Organization
Receive HttpOperationException: Unauthorized.

This doesn't appear to be a permissions issue as making a REST call via Invoke-PowerBIRestMethod to the https://api.powerbi.com/v1.0/myorg/groups/$GroupId/AssignToCapacity endpoint works fine (the SP is a capacity admin).  Additionally, the error is a 401 not a 403 so it appears to be authentication related rather than authorization
After sniffing traffic with Fiddler, it appears this command is calling the https://api.powerbi.com/v1.0/myorg/admin/capacities/AssignWorkspaces endpoint which does not appear in the API documentation for capacity.
Documentation does appear for this endpoint regarding the Power BI Admin REST API.  However, since this commandlet is part of MicrosoftPowerBIMgmt.Workspaces rather than MicrosoftPowerBIMgmt.Admin I would expect it to use non-admin endpoints like the one referenced above such that it can accomplish the same task with more limited permissions, as well as keeping these commandlets in line with the principle of least-surprise for other devs.
TLDR: Workspace-level capacity setting functionality should not unnecessarily rely on admin endpoints when group/workspace-specific capacity assignment endpoints exists, unless I'm missing something.

In retrospect, this is probably a larger consideration of groups vs. workspaces, which seems pretty blurred right now in documentation / the state of the API, though I do think the behavior is unexpected.

repo: microsoft/powerbi-powershell


text:
Add UniqueName as column when listing environments

It would be very useful to get the uniqueName of the Dataverse environment when executing "pac admin list".
UniqueName has the form of "org*" or "unq*" and is still used in many places. For example when reviewing the installed D365 Marketing applications which have the UniqueName instead of the environment guid.

@orangetoken we're taking this under consideration, and if approved, we'll apply the same logic to pac org list
while the code change in pac CLI is trivial in itself, the challenge is we're already showing too many columns, resulting in an unwieldy long text line per env

@sanjeev40084 your proposed syntax would work if the pac CLI were a PS module, which it is not for the time being.
Note that in recent pac CLI releases (1.16.x or newer?), pac org list does include a column w/ the unique name as well

authors: davidjenni orangetoken

repo: microsoft/powerplatform-vscode


text:
[Contribution Request] Update License for promptflow-tools to Match promptflow

Is your contribution request related to a problem? Please describe.
Since the promptflow package and the -tools package both roll up to an MIT license, it would make sense that the wheel for the -tools would have the same license information as the non-tools package.
Detail the functionality and value.
Prompt flow's metadata/license on pypi.

Prompt flow tools metadata/license on pypi.

Additional context
Add any other context or screenshots about the contribution request here.

(incoming PR)

#1798

The change looks good to me! Thanks a lot @mindlessroman

authors: chjinche mindlessroman

repo: microsoft/promptflow


text:
pylance not showing docstrings for the builtin decimal module's functions

Environment data

Language Server version: 2021.5.4-pre.1
OS and version: ubuntu 21.04
Python version: 3.9.4 64-bit

Expected behaviour
pylance showing the docstring of the builtin decimal module's functions
Actual behaviour
not showing docstrings which are available in the pythons website in the documentation section about the library
Code Snippet / Additional information
from decimal import Decimal
Decimal(3.14).min()

This is a unique case, as decimal is stubbed in typeshed differently than exists in the real code. The real code forwards to the _decimal or _pydecimal modules, but there's no stub for that. We try and extract info from decimal.py but find nothing.

The next version of Pylance should support decimal's docstrings.

repo: microsoft/pylance-release


text:
Dict .get Type Checking

Hey guys,
I reviewed my code and am pretty confident my typing implementation is correct. I have a dictionary with keys bound to type str | int and values bound to a generic type var _S which is further bound to 3 python object models. I defined a getter for getting an element from the dictionary and typed the return as follows:
def get(self, _id: KeyTypes) -> Optional[_S]:
    return self.registry.get(_id)

However pylance yields the following error on the return line:
Expression of type "_S@Registry | None" cannot be assigned to return type "_S@Registry | None"
  Type "_S@Registry | None" cannot be assigned to type "_S@Registry | None"
    Type "Tower*" cannot be assigned to type "_S@Registry | None"
      Type "Tower*" cannot be assigned to type "_S@Registry"
      Type cannot be assigned to type "None"
    Type "Protocol*" cannot be assigned to type "_S@Registry | None"
      Type "Protocol*" cannot be assigned to type "_S@Registry"
      Type cannot be assigned to type "None"
    Type "User*" cannot be assigned to type "_S@Registry | None"

See the full code snippet at the bottom of the issue. Cheers.
Environment data

Language Server version: Pylance language server 2021.10.0 (pyright d5878534)
OS and version: MacOS Big Sur 11.2.3 (20D91)
Python version (& distribution if applicable, e.g. Anaconda): python3.9

Expected behaviour
Should produce no error
Actual behaviour
yields the following error:

Logs

XXX

Code Snippet / Additional information
KeyTypes = Union[str, int]
RegistryTypes = Union[Tower, Protocol, User]
_S = TypeVar('_S', bound=RegistryTypes)

class Registry(Generic[_S]):

    def __init__(self) -> None:
        self.registry = {}

    @property
    def registry(self) -> Dict[KeyTypes, _S]:
        return self.__registry

    @registry.setter
    def registry(self, registry: Dict[KeyTypes, _S]) -> None:
        self.__registry = registry
        self.initialized = True

    def get(self, _id: KeyTypes) -> Optional[_S]:
        return self.registry.get(_id)

This will be fixed in the next release.

This issue has been fixed in version 2021.10.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#2021100-6-october-2021

authors: bschnurr cSDes1gn erictraut


text:
Autocompletion/Intellisense bug on Process object method

Environment data

Language Server version: v2022.2.1
OS and version: Ubuntu 20.04.3
Python version (& distribution if applicable, e.g. Anaconda): 3.8.10 (from Ubuntu distro)

Expected behaviour

This shows what I would expect from auto-completion, in this case I am using Jedi language server(it can be noted from the different code highlighting). Jedi is able to recognize that p is of type Process and suggests related methods.
Actual behaviour

This shows what I get from auto-completion when using Pylance. Pylance is not able to give any hints in this case. This lack of auto-completion has happened to me several times with Pylance.
Logs

None

Code Snippet / Additional information

from multiprocessing import Process
import os
import time as time

processes = []
num_processes = os.cpu_count()

def square_numbers(a):
    for i in range(a * 10):
        b = i ** 2
        print(b)
        time.sleep(0.1)
    print("Process Done")

# Create processes
for i in range(num_processes):
    p = Process(target=square_numbers, args=(i,))
    processes.append(p)

for p in processes:
    p.start()

for p in processes:
    p.join()

print("All processes Done!")

I would like to know how to solve this behavior of Pylance.

This is related to the type inference rules in Pyright, the static type analyzer that underlies Pylance. In this case, the type of the variable processes is inferred to be list[Any] because of the assignment processes = []. For situations like this, you can provide a type hint, like this: processes: list[Process] = []. If you're interested in more of the technical details, you might want to check out this documentation.

I added the type hinting and Pylance is able to suggest a completion.
I was going through your suggested documentation type-concepts and I have found something odd. If I use reveal_type() to check the type of p
for p in processes:
    reveal_type(p)

the result is Runtime type is 'Process' both if I use type hinting:
processes: List[Process] = []

and if I do not:
processes = []

So why Pylance cannot recognize that the type is Process when the typing extension can without problems?

I have slightly modified the previous code to test reveal_type. I have added reveal_type to the code. This is the new code:
from multiprocessing import Process
import os
import time as time
from typing_extensions import reveal_type

processes = []
num_processes = os.cpu_count()

def square_numbers(a):
    for i in range(a * 10):
        b = i ** 2
        print(b)
        time.sleep(0.1)
    print("Process Done")

# Create processes
for i in range(num_processes):
    p = Process(target=square_numbers, args=(i,))
    processes.append(p)

for p in processes:
    # Start code change
    # p.start()
    reveal_type(p)
    exit()
    # End code change

for p in processes:
    p.join()

print("All processes Done!")

If I now run this code, the output is Runtime type is 'Process' both if I use type hinting:
processes: List[Process] = []

and if I do not:
processes = []

Is that consistent with what you're seeing?

Yes it is consistent. If I insert reveal_type without running the code what you described is what I see. What I do not understand is the different behavior of reveal_type at runtime. In that case it is able to recognize the type even without type hinting.

Type annotations (aka "hints") do not have an impact at runtime. The code will run the same regardless of whether a type annotation is present. Annotations are meant as a way for developers to statically declare the types of variables for static analysis tools (like Pylance). In cases where type annotations are absent, a static analysis tool needs to "infer" the type of a variable. It uses various heuristics to do so, but there are times when the type of a variable cannot be inferred because there is insufficient information or the inference heuristics lead to ambiguous results. By adding a type annotation in a case like this, you remove the ambiguity.
The reveal_type call doesn't exist at runtime, so if you insert this into your code and attempt to run it, you'll see a runtime crash.

Thank for the explanation, I didn't know that.

The reveal_type call doesn't exist at runtime, so if you insert this into your code and attempt to run it, you'll see a runtime crash.

The only thing that still seems strange is that I can actually run that code without crashing and reveal_type prints on the console Runtime type is 'Process'.

Ah, are you importing that symbol from typing_extensions? Runtime support for reveal_type was added to the latest version of the typing_extensions published just last week. So if you're using the absolute latest version, then that would explain why it's not crashing at runtime. Prior to last week, that would have crashed. :)

Ah, yes I imported from typing_extensions import reveal_type. Now it makes sense, I didn't know it was added last week.
Thank you for your time, you clarified my concerns, so for me the issue can be closed.

authors: Nicolacarrino erictraut


text:
Ignored modules do not appear in quick fix

Environment data

Language Server version: Pylance language server 2022.10.10 (pyright 59bdc42e)
OS and version: MacOS 12.6 M1 Pro
Python version: Python 3.10

Repro Steps
Setting a directory as ignored in pyright configuration, has the effect of disabling any auto-import (quickfix) to that directory
pyproject.toml
[tool.pyright]
pythonVersion = "3.10"
ignore = [
    "common/models"
]

models/model.py
class Main:
    ...

test.py
Main # quick fix will not suggest auto-importing Main from models

Expected behavior
Quick fix works as usual. Pyright documentation states
 Paths of directories or files whose diagnostic output (errors and warnings) should be suppressed even if they are an included file or within the transitive closure of an included file
I expect the directories to still be analyzed and used by qui-fix. I suppose that why pyright makes a difference between the exclude and ignore parameters.
This particularly important for me, since i use SQLAlchemy which today produces a large amount of errors when basic type checking is enabled. So I want to silence these errors, but still benefit from quickfix.
Actual behavior
quickfix not working
Logs
(895) Background analysis message: getDiagnosticsForRange

国际化2022-10-05(1).docx
23232

This is by design, when the folder is excluded, and we will not have the diagnostic and therefore the quickfix will not work.

@mehdigmira, this was a typo. @judej meant ignored not excluded. Fixes are for diagnostics. Since ignored files don't show diagnostics, there's nothing to fix and therefore the quick fix is not available.

I see, I wan't aware this was the way fixes worked. But it makes sense. Thanks for the swift replies.

authors: debonte judej mehdigmira yanjintao


text:
Error: Debug Failure. False expression: Check called before binding

pyright 1.1.334
Error: Debug Failure. False expression: Check called before binding
at assert pyright-internal/src/analyzer/sourceFile.ts:781:8
at callback pyright-internal/src/common/logTracker.ts:57:19
at log pyright-internal/src/analyzer/program.ts:1874:32
at callback pyright-internal/src/analyzer/typeEvaluator.ts:590:19
at callback pyright-internal/src/common/timing.ts:44:27
at runWithCancellationToken pyright-internal/src/analyzer/program.ts:1045:40
at _runEvaluatorWithCancellationToken pyright-internal/src/analyzer/program.ts:638:20
at analyze pyright-internal/src/analyzer/analysis.ts:52:32
at this pyright-internal/src/backgroundAnalysisBase.ts:484:12
at handleResumeAnalysis pyright-internal/src/backgroundAnalysisBase.ts:336:21
at None pylance-internal/src/commands/commandController.ts:83:32
at onMessage pyright-internal/src/backgroundAnalysisBase.ts:630:24
at func (node::735:20)
at func (node::23:28)

Should be in the next version of Pyright. Our next prerelease we should be able to check for the crash again.

This issue has been fixed in prerelease version 2023.11.13, which we've just released. You can find the changelog here: CHANGELOG.md

authors: bschnurr judej rchiodo


text:
Different highlight colors for the same type when using the Tokyo Night Storm theme in VS Code

Environment data

Language Server version: v2024.2.3
OS and version: Windows 11
Python version (& distribution if applicable, e.g. Anaconda): 3.11.4

Code Snippet

for index, (code, language) in enumerate(LANGUAGES.items()):
    column_width[index % columns] = max(
        column_width[index % columns], len(f"{code}: {language}  ")
    )

lang_lines = []
line = ""
for index, (code, language) in enumerate(LANGUAGES.items()):
    if index % columns == 0:
        lang_lines.append(line)
        line = ""

    lang_lines = []
    line = ""
    code_lang_str = f"{code}: {language}"
    line += code_lang_str + ' ' * (
         column_width[index % columns] - len(code_lang_str)
    )

Repro Steps

set "editor.semanticHighlighting.enabled": true, in settings.json
and select theme Tokyo Night Storm

Expected behavior
index, (code, language) should be the same color in the photo below
Actual behavior

info of the tokens using Developer: Inspect Editor Tokens and Scopes

As with #5570, this is by design. Pylance is behaving correctly here.
The theme has chosen to display the declaration (#bb9af7) and subsequent usages (#c0caf5) of variables in different colors.
"semanticTokenColors": {
    ...
    "variable.declaration": {
        "foreground": "#bb9af7"
    },
    "variable": {
        "foreground": "#c0caf5"
    }
},

In Python, loop variables are accessible after the loop exits. So the index in the second loop is the same variable as the index in the first loop.

In Python, loop variables are accessible after the loop exits. So the index in the second loop is the same variable as the index in the first.

I understand now. Thanks!

authors: LifeAdventurer debonte


text:
Support the submission of Q# projects with azure.quantum API

I want to propose an enhancement to the azure.quantum python API: support Q# Jobs submission to Azure Quantum.
Currently, the official ways to submit Q# jobs to Azure Quantum are:

Python: use the qsharp python package
Jupyter Notebook: %azure.execute magic command
CLI: az quantum

1 and 2 use the same technology (IQ#), while 3 is written in Python:
https://github.com/Azure/azure-cli-extensions/tree/main/src/quantum
The proposal is to take the relevant parts from az quantum Python code and add them to azure.quantum (qdk-python).
https://github.com/Azure/azure-cli-extensions/blob/3b632bb2e04244d662ca724c88da0b8034d5ef60/src/quantum/azext_quantum/operations/job.py#L85-L86
https://github.com/Azure/azure-cli-extensions/blob/3b632bb2e04244d662ca724c88da0b8034d5ef60/src/quantum/azext_quantum/operations/job.py#L162-L163
The azure.quantum Python API is more natural in Python code (does not require Jupyter server with an IQ# kernel) and can manage multiple accounts simultaneously (unlike az CLI).
Naively, all needed is to change the submit method of the QsharpJob class (which will inherit from Job class).

@jond01, thanks for the suggestion. This would require azure-quantum to depend on qsharp which currently needs to be installed either via conda or manually using pip and dotnet. We could take it as an optional dependency, though.

@jond01, I think the context that you're missing here is that we don't send the Q# code to the service but it actually needs to be compiled into QIR or other binary formats, which is why we have the dependency on the qsharp (and indirectly iq# and .Net).
Users would still need to create an external Q# project and be able to compile it from the command line (notice the az quantum basically just starts an external process to do this) so not sure if a lot of value on it.

authors: anpaz guenp jond01

repo: microsoft/qdk-python


text:
请问一下qlib支持pytorch的哪些版本呢？

如题

qlib is a framework and it does not impose any restrictions on the versions of PyTorch

authors: panshuaiyin you-n-g

repo: microsoft/qlib


text:
Warn when both release and pre-release QDK are installed. Also, improve warning message for old QDK

This PR addresses the other feedback in #696. I'd like to get some confirmation from @billti on the name of the release extension before merging this.

Love it. Looks great. Thanks!

authors: billti sezna

repo: microsoft/qsharp


text:
Use src dir for Q# projects

This PR updates qsc_project logic so Q# projects:

Default to /src/**/*.qs (instead of all sibling files)
Ignore all dot entries
Don't support exclude files and regexes

Aside: This PR nicely proves that our project logic is indeed centralized. We only need to update qsc_project, and we get project
logic updates in Python, qsc, qsi, notebooks, and VS Code.

switch to reading src dir in projects
rewrite tests for new project system; remove exclude list tests
bugfix for src dir
bugfix for src dir

What's supposed to happen in this setup? This doesn't look quite right to me.

Good catches with the behavior of searching up for the containing folder. I ran this through some tests manually on my end, and the behavior of the extension looks good to me.

authors: minestarks sezna swernli


text:
MAD: enable switch between scatter plot and table with toggle in individual feature importances  sub-tab

Also add a dropdown in the table view instead of the radio buttons

repo: microsoft/responsible-ai-widgets


text:
Pagation

Steps to reproduce
Run the following query against a partner tenant with more than 100 contracts
let
    Source = SecMgmtInsights.Contents(null),
    Contracts1 = Source{[Name="Contracts"]}[Data][customerId]
in
    Contracts1

Expected behavior
The connector should return all of the customer identifiers and not be limited to 100
Actual behavior
Only a subset of the entire set is returned.
Diagnostic logs
Reviewing the diagnostics for the step the request for the additional pages is not being made
Environment

Power BI Desktop
Security and Managements Insights connector version 2.0

This issue was resolved with PR #130. An updated version of the connector will be published today.

repo: microsoft/secmgmt-insights-connector


text:
Minor issues in Introduction to Git

Describe the bug
There are two minor issues in the steps of unit Exercise - Try out Git:
Initializing git repository for git 2.28.0+ it says:
Issue 1

If you're running Git version 2.28.0 or later, use the following commands:
git init --initial-branch=main
git init -b main

As far as I see, only one of those should be used, as they do the exact same thing:
Issue 2
Later the whole unit mentions master as the branch name. It should be main according to the init parameters.
To Reproduce

Go to  Exercise - Try out Git
Go through the exercise steps

Expected behavior
Command to init git repo should look something like:
git init --initial-branch=main
# OR
git init -b main

main should be used instead of master in the remaining part of the unit.
Screenshots
N/A
Desktop (please complete the following information):

OS: N/A
Browser N/A
Version N/A

Smartphone (please complete the following information):

Device: N/A
OS: N/A
Browser N/A
Version N/A

Additional context
N/A

🎓 Add a tag to this issue for your current education role: student, Student Ambassador or educator.
Student Ambassador

I haven't noticed it's a duplicate of https://github.com/microsoft/studentambassadors/issues/32

repo: microsoft/studentambassadors


text:
Opening from File Explorer Ignores User Path Environment Variable

Windows Terminal version
1.11.3471.0
Windows build number
10.0.22000.0
Other Software
No response
Steps to reproduce

Add a directory to the current user's path using the OS tools
Reboot the machine (not sure if this is necessary but I did it because I'm unclear on when Terminal picks up things like environment variables)
Right click on a folder in File Explorer and select Open in Windows Terminal
Check the path variable (e.g., $env:path under PowerShell)

The path you entered for the current user won't be there.
Repeat the steps but add the new folder to the global/system path variable and it will appear
Expected Behavior
The user path variable should be part of Terminal's path "environment" when the user opens a Terminal window from a File Explorer instance "owned" by that same user
Actual Behavior
Paths defined in the user environment do not show up. Paths defined in the system/global environment do, as expected

/dup #12602

authors: markolbert zadjii-msft

repo: microsoft/terminal