text:
Mypy not installing

 Environment data

Language Server version: 2024.3.2
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda):
python.analysis.indexing: true
python.analysis.typeCheckingMode: off

 Code Snippet

XXX

 Repro Steps

XXX

 Expected behavior
XXX
 Actual behavior
XXX
 Logs

XXX

Thanks for the report. Unfortunately, this is not enough information for us to investigate this issue.
If this continues to be a problem, would you please reopen the issue and add the information described in the troubleshooting guide?

source: gharchive/issue

authors: Ahmedewa debonte

repo: microsoft/pylance-release

license_type: permissive

license_source: github-api


text:
Intrusive Intellisense in Interactive Window

It is great that Pylance provides in terms of providing Intellisense and Syntax highlighting for interactive window users. (Now experimental new VS Code specific Python REPL as well which uses interactive window as a backbone excluding some of the features like cell indexing)
Users from user studies testing out the new REPL and the interactive window(provided by Jupyter extension) has came across this glitch in the text input box of the interactive editor where same function definition/hints are provided multiple times without taking regards to the actual small size of the text input box in the interactive editor as a whole.
/cc @cwebster-99
Is this a regression?

I believe this is by design. There are a bunch of overloads for the parse function and it's showing all of them. VS code itself would be responsible for making the UI smaller (or adding a scroll bar).


text:
Build for code-server

I'm using code-server, and found that there is no build of Pylance for code-server. Maybe a build for code-server can be provided on the plugin market?

Pylance is intentionally only supported on official builds of VS Code. Instead of Pylance you could use Pyright, the open-source language server that Pylance is based on, which is supported in other IDEs.

authors: JunzheShen debonte


text:
Fixing "Bash exited with code '5' " for Azure Pipeline run - for #25

This is a fix for #25
Problem:
Running the sample with Azure DevOps Pipeline leads to an error (Bash exited with code '5') and the build run fails for testing.
Cause:
pytest cannot find any tests defined and exits therefore with "collected 0 items" (empty).
This leads to the exit code. It's related to this discussion.
Solution:
Write a sample or placeholder test. There is no reason, having a test_test1.py when nothing is tested. At least the idea of a test should be implemented.
I added this part, so the build pipeline is able to pass, without to much configuration in pytest.

closed, because of duplicate #24

source: gharchive/pull-request

license: MIT


text:
expression using qlib.data.ops.features get different results

❓ Questions and Help
>> from qlib.data import D
>> data = D.features(["sh600519"], ["(($high / $close) + ($open / $close)) * (($high / $close) + ($open / $close)) / ($high / $close) + ($open / $close)"], start_time="20200101")

from qlib.data.ops import *
f1 = Feature("high") / Feature("close")
f2 = Feature("open") / Feature("close")
f3 = f1 + f2
f4 = f3 * f3 / f3
data = D.features(["sh600519"], [f4], start_time="20200101")
data.head()

I follow the instruction here: https://qlib.readthedocs.io/en/latest/start/getdata.html
Very strange two expressions get different results. I don't know if this is a bug or not.

Is this what you want?
I think one pair of parentheses is missing.
"(($high / $close) + ($open / $close)) * (($high / $close) + ($open / $close)) / ( ($high / $close) + ($open / $close) )"

Is this what you want? I think one pair of parentheses is missing.
"(($high / $close) + ($open / $close)) * (($high / $close) + ($open / $close)) / ( ($high / $close) + ($open / $close) )"

Oh！ I didn't notice that. Thanks. I thought these two expression is the same. Apparently it's not.
Thank you very much.
And I think the tutorial author better fix it. It's kind of confusing....HH

Thanks.  It is fixed now.
Your contribution is also welcome :)

authors: SpacedDot you-n-g

repo: microsoft/qlib


text:
用标准化后的标签还是原始收益率标签来生成累计收益率图表？

在例子文件workflow_by_code.ipynb生成累计收益率图表的代码是：
label_df = dataset.prepare("test", col_set="label")
label_df.columns = ['label']
pred_label = pd.concat([label_df, pred_df], axis=1, sort=True).reindex(label_df.index)
analysis_model.model_performance_graph(pred_label) # 生成累计收益率图表
我的问题是，这里label_df 取得的标签label是预处理后（比如经过标准化处理）的推理数据集标签，并不是原始的收益率，那么据此生成累计收益率图表是不是不合适，我觉得应该采用原始label（代表未经标准化处理的原始收益率）来生成累计收益率图表。
不知我的理解对否？

model_performance_graph不生成累计收益率相关的图吧

为何是经过预处理的呢,prepare的data_key用于指定预处理方式,你这里并没有指定,我认为并未预处理,不想下面这种:
dataset.prepare("test", col_set=["feature", "label"], data_key=DataHandlerLP.DK_I)

data_key默认就是DK_I吧

authors: fyc0707 lerit quantcn


text:
Question over installing from source

❓ Questions and Help
We sincerely suggest you to carefully read the documentation of our library as well as the official paper. After that, if you still feel puzzled, please describe the question clearly under this issue.
As I saw from some issues before, when I install from source so I can adjust models from local qlib folder, it doesn't allow me to import qlib packages with the following information:
Do not import qlib package in the repository directory in case of importing qlib from . without compiling
Then what should I do if I want to adjust the model? Thanks!

@TompaBay Hi，
You can refer to this solution：https://qlib.readthedocs.io/en/latest/FAQ/FAQ.html#modulenotfounderror-no-module-named-qlib-data-libs-rolling

If the error occurs when importing qlib package with command python ,  users need to change the running directory to ensure that the script does not run in the project directory.

I think there is bug due to the difference between install from source and pip. When I installed from pip, everything is fine.  But when I installed from source, for same configuration file, I'll get bug from ops.py saying two np arrays for np.divide have different dimension. I wonder if I wanted to change the given models, is there any method that I can change it even though I installed from pip? Thanks!

I think there is bug due to the difference between install from source and pip. When I installed from pip, everything is fine. But when I installed from source, for same configuration file, I'll get bug from ops.py saying two np arrays for np.divide have different dimension. I wonder if I wanted to change the given models, is there any method that I can change it even though I installed from pip? Thanks!

Hi, already fixed in this PR:https://github.com/microsoft/qlib/pull/685
Thank you for your feedback!

authors: TompaBay zhupr


text:
Q# callables should not have same fully qualified name as another namespace

This issue is copied from https://github.com/microsoft/qsharp-runtime/issues/245.
When a Q# callable has a fully qualified name that exactly matches the name of another namespace, it becomes very hard to disambiguate them. This specifically causes problems in C# generation, but is really more a generally bad thing to do. We should detect and flag this in the compiler so that developers know early that the given name will not work.
For example, this code is currently accepted by the compiler:
namespace Foo {
    function Bar() : Unit { }
}

namespace Foo.Bar {
    function Hello() : Unit { }
}

But the function Bar has the fully qualified name Foo.Bar which collides with the namespace of the same name. This should not be allowed.

namespace Baz {
    function Bar() : Unit { }
}

namespace Foo.Bar {
    open Baz as Foo; // is this bad as well?
    function Hello() : Unit { }
}

@cgranade No, that is fine, since everything is resolved to fully qualified names upon compilation the issue only arises if the clash is with the full name.

Fixed with #647.

authors: bettinaheim cgranade swernli

repo: microsoft/qsharp-compiler


text:
Simplify dependencies handling for exercises in katas

Is your feature request related to a problem? Please describe.
Currently each exercise in each kata has a field qsDependencies that lists files that need to be compiled together with the files of that specific exercise.
@[exercise]({
    "id": "marking_oracles__kth_bit",
    "title": "K-th Bit",
    "path": "./kth_bit/",
    "qsDependencies": [
        "../KatasLibrary.qs",
        "./Common.qs"
    ]
})

This is very repetitive, leads to hard-to-debug issues when contributing to the katas, and unnecessary, since the logic of including the files is the same across all katas.
Describe the solution you'd like
I'd like to drop this field and instead, when an exercise is created, to include the files using the following logic:

Always include KatasLibrary.qs.
If the kata to which this exercise belongs has a Common.qs file, include it.

Describe alternatives you've considered
We can keep the current approach.

@tcNickolas
I have few clarifying questions:

Does it make sense to assume that KatasLibrary.qs is always 1 level above index.md (as of now)?
If not, the logic could be adjusted to "If the kata to which this exercise belongs has ../KatasLibrary.qs (1 level up) file, include it".
After this change, qsDependencies will be optional property, right?

May I work on this issue?

Yes, looking at the current infra, including katas placed elsewhere into it would take significant changes, and we're not planning to do that. It's probably a good idea not to fail if the file doesn't exist, but we don't need to account for a possibility of it existing two levels up or in a completely different folder.
We shouldn't need qsDependencies property at all! It was designed with just the first small set of katas as pilots, and now that we've added a lot more katas, we can see that we don't need to over-complicate their definitions, since they all follow the same structure easily.

Yes, absolutely!

Clarification for question #2
Am I correct that I should remove processing of qsDependencies property completely and remove all it's references from index.md's?

Yes please!

@tcNickolas
I have the fix. What upstream branch should I use to track the changes?
I do not have access to create remote branch.

You'll need to fork the microsoft/qsharp repository to your account, and then you will be able to create a branch in ggridin/qsharp repository and send the pull request from that branch to the main repo.

authors: ggridin tcNickolas

repo: microsoft/qsharp


text:
tool: update kapinger to make random dns queries

Description
Update kapinger to make random dns queries
Related Issue
If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.
Checklist

[ ] I have read the contributing documentation.
[ ] I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
[ ] I have correctly attributed the author(s) of the code.
[ ] I have tested the changes locally.
[ ] I have followed the project's style guidelines.
[ ] I have updated the documentation, if necessary.
[ ] I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.

Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

What is the intention of this PR? This looks like it issues DNS queries for 'random' domain names? What is the scale? 1, 10, 100, 1000, 10000? After these queries are executed what is the consumer? Are we measuring something? This sounds like the consumer doesn't have a great means of testing.

What is the intention of this PR? This looks like it issues DNS queries for 'random' domain names? What is the scale? 1, 10, 100, 1000, 10000? After these queries are executed what is the consumer? Are we measuring something? This sounds like the consumer doesn't have a great means of testing.

The idea is to generate random DNS queries. This will be used to scale test retina which will be generating metrics for traffic on the cluster (both these DNS queries and other traffic generated). This was requested as part of https://github.com/microsoft/retina/issues/1040

@MikeZappa87 pursuant to our earlier concerns about the external DNS traffic this might generate, it looks like .test is configured to black hole requests. The SOA record lists localhost as the resolver for .test:
; <<>> DiG 9.18.28 <<>> @4.2.2.2 test SOA
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52782
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;test.                          IN      SOA

;; ANSWER SECTION:
test.                   10800   IN      SOA     localhost. nobody.invalid. 1 3600 1200 604800 10800

;; Query time: 10 msec
;; SERVER: 4.2.2.2#53(4.2.2.2) (UDP)
;; WHEN: Mon Nov 25 15:17:24 EST 2024
;; MSG SIZE  rcvd: 92

What is the intention of this PR? This looks like it issues DNS queries for 'random' domain names? What is the scale? 1, 10, 100, 1000, 10000? After these queries are executed what is the consumer? Are we measuring something? This sounds like the consumer doesn't have a great means of testing.

The idea is to generate random DNS queries. This will be used to scale test retina which will be generating metrics for traffic on the cluster (both these DNS queries and other traffic generated). This was requested as part of #1040

The concern is that this could be hitting DNS servers that we don't own nor do we have an agreement to do this. It probably makes more sense to stand up a DNS server we control to do this or come up with a design change to test retina without doing this.

@MikeZappa87 I did some more research, and it depends very much on the resolver you ask. Cloudflare (1.1.1.1) and Google (8.8.8.8) both forward the request to the root servers, and they are the ones that respond with NXDOMAIN. Needless to say, flooding the root servers is A Very Bad Thing for the reasons you outline.
On the other hand, Level 3 (4.2.2.2) and Quad 9 (9.9.9.9) black hole the .test TLD in the way that I showed earlier (that request was to Level 3).
I agree though... even though this is the TLD to use, it's clear that resolvers handle it inconsistently (and probably shouldn't be trusted to consistently handle it). We should just stick BIND or CoreDNS in there to field all this traffic.

authors: MikeZappa87 alexcastilio timraymond

repo: microsoft/retina


text:
Generate Popup from Xaml

Description
Add support to load raw Xaml string from Sarif results and render the Xaml UI element dynamically show it in the related locations.
User can click on the Sarif result in the error list to navigate to the corresponding portion of the source file. The portion is highlighted with squiggles, when user hover over the portion, a tooltip popup. If the Sarif result contains a valid Xaml property, the extension renders the Xaml content into WPF UI element and show it in the popup, otherwise it keeps current behavior, show the result's message text as tooltip.
The screenshot is what the popup looks like, the Xaml content is from a sample DevCanvas Sarif log.

The CodeQL alert should be a false positive error:

SarifErrorListItem.cs(102,34): error CS0165: Use of unassigned local variable 'value'

https://github.com/microsoft/sarif-visualstudio-extension/blob/bb8f4fe26f88936171d193bfd698df6d3f636fac/src/Sarif.Viewer.VisualStudio.Core/Models/SarifErrorListItem.cs#L100-L103

repo: microsoft/sarif-visualstudio-extension


text:
Adding load balancing for Services

With many Azure OpenAI Endpoints available to Azure customers, with each having a limited number of Tokens per Minute (and possibly other vendors in the future as well), being limited to one endpoint at a time in SK can lead to an exhaustion of available token quotas.
The idea is to extend the KernelBuilder or Kernel with an attribute named "EnableLoadBalancing". In the Kernel GetRequiredService currently only the last Service is returned. This can easily be modified to return a random service, hence adding load balancing when multiple are registered in the Kernel.
I would take on the development myself

In the Kernel GetRequiredService currently only the last Service is returned. This can easily be modified to return a random service, hence adding load balancing when multiple are registered in the Kernel.

Can you use GetAllServices and just pick one based on whatever policy you want? e.g.
IEnumerable<T> services = kernel.GetAllServices<T>();
T service = services.ElementAt(Random.Shared.Next(services.Count()));

We also have an IAIServiceSelector abstraction which will allow you to control which service gets used when executing a prompt. This example Example62_CustomAIServiceSelector shows how you would implement this.

We also have an IAIServiceSelector abstraction which will allow you to control which service gets used when executing a prompt. This example Example62_CustomAIServiceSelector shows how you would implement this.

If the IAIServiceSelector is invoked every time a ChatCompletionService is requested from the Kernel (by Planners or other call to InvokePromptAsync  that you can not influence) then this is the solution, thank you! I will look into it. Will close the issue

repo: microsoft/semantic-kernel


text:
Python: strings don't have contains method in python

Motivation and Context

I changed the substring in string check to the proper method for python.
Contribution Checklist

[X ] The code builds clean without any errors or warnings
[ X] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[ X] All unit tests pass, and I have added new tests where possible
[ X] I didn't break anyone :smile:

@kevin-m-kent Thank you for fixing this! I tried to reproduce the problem, but I'm not sure at the moment how to achieve that second condition and verify how it's working. Looks like the test you added works with first condition only. Would be nice to add test at some point to check second condition as well.
Thanks again!

no problem!
Are you referring to these conditions?
        final_answer_match = re.search(S_FINAL_ANSWER_REGEX, input)

        if final_answer_match:
            result.final_answer = final_answer_match.group(1).strip()
            return result

        # Extract thought
        thought_match = re.search(S_THOUGHT_REGEX, input)

        if thought_match:
            result.thought = thought_match.group(0).strip()
        elif ACTION not in input:
            result.thought = input
        else:
            raise ValueError("Unexpected input format")

I thought the 'My thought' input would trigger the second condition there since it doesn't have [FINAL ANSWER] or [THOUGHT] or [ACTION]?

Are you referring to these conditions?

Yes, that's correct.

I thought the 'My thought' input would trigger the second condition

I tried to debug your test and it appeared that the second condition is not triggered, instead it triggers the first one. But I'm not sure at the moment, what would be the right test for second condition, need to investigate it further.

authors: dmytrostruk kevin-m-kent


text:
Expand/Collapse links are inverted

Hi SF team, I think this new version is really good. I noticed the expand and collapse are inverted it should be when contracted ▼ and when expanded ▲. Hope this helps, I kind of noticed is on purpose to use the same icon "▼" you have in the old version but for me should be the other way around just to follow existing conventions. Is a minor thing and It can stay that way, you can close this issue, is not a deal breaker but I noticed and I wanted to give you guys my feedback.

Hey, @javierdpt you are referring to the tree navigation right? I do agree that those should be flipped because it does go against convention. Right now it is following the previous versions, but this might be the best opportunity to flip them without people really thinking about it. Good thing to point out.

repo: microsoft/service-fabric-explorer


text:
Added Qualys and other scripts

Added new app: Qualys.
Also added few new custom attributes.

Thanks!

authors: janparttimaa theneiljohnson

repo: microsoft/shell-intune-samples


text:
Added way to get the names of all feature flags

Description
Added method to retrieve all feature flag names. Addresses Issue #616

Codecov Report

Merging #620 into master will increase coverage by 0.09%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #620      +/-   ##
============================================
+ Coverage     51.99%   52.08%   +0.09%
  Complexity      683      683
============================================
  Files           179      179
  Lines          3112     3114       +2
  Branches        227      226       -1
============================================
+ Hits           1618     1622       +4
+ Misses         1371     1370       -1
+ Partials        123      122       -1

Impacted Files
Coverage Δ
Complexity Δ

...e/spring/cloud/feature/manager/FeatureManager.java
64.06% <100%> (+4.38%)
14 <1> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

repo: microsoft/spring-cloud-azure


text:
Ubuntu profile does not start in "Starting directory" on first use.

Windows Terminal version (or Windows build number)
1.7.1033.0
Other Software
Ubuntu 20.04 WSL2
Steps to reproduce
Set the Ubuntu profile's "Starting directory" to some location, eg: \wsl$\Ubuntu\home\username to start in the home folder.
Open a Ubuntu tab in Windows Terminal.
Expected Behavior
The Ubuntu tab should open with the current directory set to that specified in the "Starting directory" setting for the Ubuntu profile.
Actual Behavior
The Ubuntu tab opens with the current directory set to %userprofile% ("C:\Users\User Name"). This is the default setting for the starting directory.
Note that this occurs on the first launch of a new Ubuntu tab. On subsequent tabs (either in the same window or a new window or after closing and restarting Windows Terminal) Ubuntu tabs DO open the specified directory. However, after some period of time (several minutes), the first opening of a Ubuntu tab again starts in the %userprofile% directory rather than the specified directory. Subsequent openings (if not too long after) open in the correct folder. Also, if I open Ubuntu from a different shell first, then the first opening of a Ubuntu tab in Windows Terminal does open to the correct location.
I've deleted the json settings file and even uninstalled the reinstalled the Ubuntu distribution for WSL2 but this did not correct the problem. I also only experience this on one computer, but not on my other computer.

i just had this problem too!
if you want a simple fix, go into the settings menu, and in the ubuntu pane in field "command-line" it should say
wsl.exe -d Ubuntu
just edit this to be
wsl.exe -d Ubuntu --cd ~

Weirdly enough, we've seen this before. There's more discussion over in /dup #7197

authors: DrRZ jamesfranklinnetsec zadjii-msft

repo: microsoft/terminal


text:
startingDirectory and splitMode ignored in settings file

Windows Terminal version
1.14.1962.0
Windows build number
10.0.19042.0
Other Software
No response
Steps to reproduce
{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions":
    [
        {
            "command":
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command":
            {
                "action": "splitPane",
                "split": "down",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+minus"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{dd06fdc4-e3c7-404a-ba9c-ead0245d608b}",
    "profiles":
    {
        "defaults": {

		},
        "list":
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "commandline": "pwsh.exe -ExecutionPolicy ByPass -NoExit -Command \"& C:\\Users\\amine.aboufirass\\miniconda3\\shell\\condabin\\conda-hook.ps1 ; conda activate C:\\Users\\amine.aboufirass\\miniconda3\"",
                "guid": "{db6044f2-9daa-458b-afd6-20cbd1db506d}",
                "hidden": false,
                "name": "Anaconda Powershell Prompt"
            },
            {
                "commandline": "\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\" -noe -c \"&{Import-Module \"\"\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell f47eb35f}\"",
                "guid": "{dd06fdc4-e3c7-404a-ba9c-ead0245d608b}",
                "hidden": false,
                "name": "Developer Command Prompt VS2019",
				"startDirectory": "D:/Dev"
            }
        ]
    },
    "schemes":  [...]
}

The opened default prompt (Developer Command Prompt VS2019) Does not open in the directory listed under startDirectory
When attempting to split a pane horizontally using shift+alt+- the new pane does not replicate the same directory, unless it is the home directory

Expected Behavior
I expect splitMode="duplicate to start any new panes in the directory of the parent pane.
I expect startingDirectory="D:/Dev" to open the profile in D:/Dev
Actual Behavior
splitMode="duplicate to starts any new panes in home directory regardless of which directory the parent pane is in
startingDirectory="D:/Dev" does not affect the default directory when opening the terminal

startingDirectory or startDirectory in YOUR settings.json?

@237dmitry  I tried both. Neither works.

Firstly, yea it's startingDirectory.
Second, did you configure your shell to actually tell the Terminal about it's CWD/?

@zadjii-msft I added the following to my Powershell profile based on the link you provided:
function prompt {
  $loc = $($executionContext.SessionState.Path.CurrentLocation);
  $out = "PS $loc$('>' * ($nestedPromptLevel + 1)) ";
  $out += "$([char]27)]9;9;`"$loc`"$([char]27)\"
  return $out
}

Then I double checked that my settings included startingDirectory, which they were.
The behavior unfortunately persists. I still have the same problem.

Hmm. Maybe the cwd sequence is getting lost.
Can you try opening this profile with the debug tap to get a trace of all the input and output/? Once it's open, cd once, just to make sure that CWD changes propagate out. Send us a screenshot and we might be able to figure out what the Terminal thinks it's getting here.

Alternatively, maybe it's the `"alt+shift+minus"` that's tripping up the keybindings. Those ones are sometimes a little wonky, esp on other keyboard layouts. As a sanity check, try binding that to something like, `f1` instead.

Here's the output from the debug tap:

Using "f1" instead of "alt+shift+minus" in the keybinding does not make a difference.

I changed the relevant part in settings.json to
{
            "command":
            {
                "action": "splitPane",
                "split": "horizontal",
                "splitMode": "duplicate"
            },
            "keys": "shift+alt+-"
        }
}

And now it seems to duplicate the profile and CWD in all profiles except for the Visual Studio Developer command prompt. That seems to indicate that Windows Terminal works fine, and there's something about the way I've set up the Visual Studio profile which causes it to behave this way. Closing.

Huh. Interesting! I know there have been issues with that in the past with ubuntu.exe as well. Maybe  Enter-VsDevShell always switches the CWD to %USERPROFILE%\source\repos, regardless of the starting directory.
Glad you (sorta) figured it out!

Sorry, I have to reopen this. I tried using the same settings file on another machine and got the same unwanted behavior. So I'm leaning more towards the idea that this is definitely Windows Terminal related.

got the same unwanted behavior

Like, got the same behavior with cmd/powershell? I thought we had debugged this down to an issue with Enter-VsDevShell/?

@zadjii-msft  We hadn't debugged anything, really. I submitted the debug tap like you asked and then closed the issue before you had a chance to respond when I (incorrectly) concluded my issue was resolved.
I'm not sure what Enter-VsDevShell is, but I don't think we had gotten far enough to determine the root cause of this issue. I would kindly refer you back to the debug tap I submitted a couple of days ago.

I'm sorry for the radio silence here! Thanks for your patience.
Based on the symptoms and your configuration here, it seems like there are two issues:

If you have not configured cmd/powershell to "tell" terminal about their starting directory, duplicate doesn't work properly. This is an unfortunate but documented consequence of how processes on Windows work.
the VS dev shells are impacted explicitly, even if you follow the above docs

For 1, the docs reign supreme. For 2, however... every VS dev shell profile is configured to use a Visual Studio command Enter-VsDevShell. That command(let) explicitly overrides any starting directory, which is somewhat frustrating. You can fix this by adding -SkipAutomaticLocation to the commandline for any VS Dev Shell profile. We should document or fix this.

Does that help at all?

Thanks for confirming!
Personally, I'd love to add that for everyone . . . @heaths, how integral to the continuity of "dev shell" is that it ignore the user's starting directory? I know that the start menu shortcuts work one way, but perhaps we can change that contract a bit?

I doubt it's needed. I imagine it was probably maintained for legacy reasons, but since env vars like PATH are updated I see little reason to maintain it i.e., just blindly add -SkipAutomaticLocation to each profile going forward. Let me track down an owner for the scripts and see if they'll comment otherwise.

@heaths did you have any luck?

@trippwill indicated in email with @DHowett and I that it should be safe to add. It's been available since the PowerShell dev prompt was added, which I seem to recall this code assumes already.

Oh, I just realized that you're not even using the automatically generated VS profiles! Hah!
It also turns out that our automatically-generated VS PowerShell profiles already use -SkipAutomaticLocation.
I'm gonna close this out, but I have made sure that the CMD version of these profiles does the same thing in #15035.

authors: 237dmitry DHowett amine-aboufirass carlos-zamora heaths zadjii-msft


text:
Automatically copy selection to clipboard is no longer working correctly with tmux

Windows Terminal version
1.15.2875.0
Windows build number
10.0.22621.819
Other Software
tmux

3.3a in Fedora Remix WSL
1.8 when SSHed into CentOS 7
3.2a on Ubuntu 22.04 WSL

Steps to reproduce

Enable "Automatically copy selection to clipboard"

    "copyFormatting": "all",
    "copyOnSelect": true,

Start tmux
I use the mouse to Scroll. If you need help it's: Ctrl + b then : and type set-window-option -g mouse on and press enter (Unless you are on tmux 1.8 and it's a lot more complicated)
Scroll up in tmux buffer
Press Shift + Left Click and drag on the text you want to Select. Holding Shift is important because this is doing a normal terminal "select" not a fancy Tmux select (which copies to tmuxes internal clipboard, not the real Windows one)

Scroll back down to the bottom so you can get out of scrolling mode

Paste in terminal (Shift right click)
Now paste in terminal or any other application, and you will have the wrong text pasted

In this case it will paste 85, not the 10 I actually selected
Expected Behavior
This used to work, it was beautiful, and everything was bearable. The text I selected before scrolling back down was in my clipboard, and it pasted correctly. Now the "selection" was in same physical space but no longer over the text I initially selected, but this never mattered and not something I'd expect to change behavior
I expect it to paste 10 like it was until very recently
Actual Behavior
It pasted 85
Terminal is deciding to copy again at paste time.
Step 4 is important. Before step 7, if you paste outside of terminal, you will see that after step 5, the text in the Windows Clipboard is indeed correct, even after step 6. But as soon as I go to paste in Terminal, it "re copies" where the select text is and breaks everything.
It's also important

Huh, this seems coincidentally timed with #14462 which was also literally just filed.~ I wonder if they're the same regression. I wouldn't be surprised. Weird to me that the selection in your screenshot seems anchored to the viewport.....~
Oh I wonder if I know what's happening. We're not dismissing the selection on the "scrolling" happening in the alt buffer. The selection remains anchored to where it was, but the content changes, and {something} is triggering us to re-copy the contents.
I bet this is different after all.

This is the suspicious code IMO
https://github.com/microsoft/terminal/blob/2d66dc44f5abef975bed86af12cb5facb6729a1a/src/cascadia/TerminalControl/ControlInteractivity.cpp#L256-L267
This is the PointerPressed handler. In this case, at step 6 it seems to me like

we've already copied the text once, at step 4, in our PointerReleased handler.
_selectionNeedsToBeCopied=false at this point.
We get the mousedown and try to copy the selection.

Most of the time, this no-ops!
In the normal buffer, this really doesn't matter. In the normal buffer, the text contents (rarely) shift underneath the selection itself. So re-copying the selected text would just copy the same thing.
In this case however, the text did change from the time of the selection. So trying to copy again will copy the new text (in this case, 85).

Then we request a paste from the clipboard. Here things get a little tricky - I'm guessing the async nature of our copy handler means that the copy actually gets queued for after the pointerpress event, so we end up pasting the original contents.

Methinks that we can gate the copy on _selectionNeedsToBeCopied || !_core->CopyOnSelect(). Then we'll only do the first copy when we're not in copyOnSelect, or when we're in copyOnSelect, but we haven't yet copied.

authors: andyneff zadjii-msft


text:
Local tests are failing again

Windows Terminal version
Commit 547349af77df16d0eed1c73ba3041c84f7b063da
Windows build number
10.0.19044.2364
Other Software
No response
Steps to reproduce

Check out a recent version of the project.
Build it.
Run the unit tests.

Expected Behavior
All tests should pass.
Actual Behavior
A number of the local tests are failing:
TerminalAppLocalTests::TabTests::TryInitializePage [Failed]
TerminalAppLocalTests::TabTests::TryDuplicateBadTab [Failed]
TerminalAppLocalTests::TabTests::TryDuplicateBadPane [Failed]
TerminalAppLocalTests::TabTests::TryZoomPane [Failed]
TerminalAppLocalTests::TabTests::MoveFocusFromZoomedPane [Failed]
TerminalAppLocalTests::TabTests::CloseZoomedPane [Failed]
TerminalAppLocalTests::TabTests::SwapPanes [Failed]
TerminalAppLocalTests::TabTests::NextMRUTab [Failed]
TerminalAppLocalTests::TabTests::VerifyCommandPaletteTabSwitcherOrder [Failed]
TerminalAppLocalTests::TabTests::TestWindowRenameSuccessful [Failed]
TerminalAppLocalTests::TabTests::TestWindowRenameFailure [Failed]
TerminalAppLocalTests::TabTests::TestPreviewCommitScheme [Failed]
TerminalAppLocalTests::TabTests::TestPreviewDismissScheme [Failed]
TerminalAppLocalTests::TabTests::TestPreviewSchemeWhilePreviewing [Failed]
TerminalAppLocalTests::TabTests::TestClampSwitchToTab [Failed]
SettingsModelLocalTests::SerializationTests::CascadiaSettings [Failed]

If I had to blind guess, I'm guessing this is from us removing the XAML Toolkit application but not from the tests. Just a guess.

... How exactly are they failing for you? I've got a fix for the SerializationTests::CascadiaSettings test ready, but I can't get the others to fail, other than in one-off edge cases. Those are always some sort of closing race condition in accessing the Control's Dispatcher, so I'm not too worried about those (of course the test app lifetime is gonna be even worse than the main app's).

I can't get the others to fail, other than in one-off edge cases.

OK. Maybe it's just me then. They failed for me when doing a full runut.cmd run, but I also confirmed that each of them were failing individually by testing them one by one with /name.
Here's the full output from one test case:
Test Authoring and Execution Framework v10.60k for x64
TAEF: Backing up custom default AppXManifest... Copying C:\Users\James\CPP\terminal\bin\x64\Release\TestHostApp\AppXManifest.xml to C:\Users\James\AppData\Local\Temp\Tfm-20456-0\AppXManifest.xml
TAEF: Deploying custom AppXManifest... Copying C:\Users\James\CPP\terminal\bin\x64\Release\TestHostApp\TestHostAppXManifest.xml to C:\Users\James\CPP\terminal\bin\x64\Release\TestHostApp\AppXManifest.xml

StartGroup: TerminalAppLocalTests::TabTests::TryDuplicateBadTab
Verify: IsNotNull(settings0)
Verify: IsNotNull(settings1)
Construct the TerminalPage
Verify: SUCCEEDED(result)
Verify: IsNotNull(page)
Verify: IsNotNull(page->_settings)
Create() the TerminalPage
Verify: IsNotNull(page)
Verify: IsNotNull(page->_settings)
Create()'d the page successfully
Added a single newTab action
Verify: SUCCEEDED(result)
Wait for the page to finish initializing...
Verify: SUCCEEDED(waitForInitEvent.Wait())
...Done
Ensure we set the first tab as the selected one.
Verify: SUCCEEDED(result)
Verify: AreEqual(1u, page->_tabs.Size())
Verify: SUCCEEDED(result)
Duplicate the first tab
Error: Verify: AreEqual(2u, page->_tabs.Size()) - Values (2, 0) [File: C:\Users\James\CPP\terminal\src\cascadia\LocalTests_TerminalApp\TabTests.cpp, Function: TerminalAppLocalTests::TabTests::TryDuplicateBadTab::<lambda_2>::operator (), Line: 413]
Error: Verify: SUCCEEDED(result) - Value (0x80004005) [File: C:\Users\James\CPP\terminal\src\cascadia\LocalTests_TerminalApp\TabTests.cpp, Function: TerminalAppLocalTests::TabTests::TryDuplicateBadTab, Line: 415]
EndGroup: TerminalAppLocalTests::TabTests::TryDuplicateBadTab [Failed]
TAEF: Restoring cached AppXManifest... Copying C:\Users\James\AppData\Local\Temp\Tfm-20456-0\AppXManifest.xml to C:\Users\James\CPP\terminal\bin\x64\Release\TestHostApp\AppXManifest.xml

From what I can recall, they were all failing with an 0x80004005 error similar to that, but I wasn't paying that much attention. If you can't reproduce it, I'll try and get some more info when I have chance. Maybe another Windows 10 only thing?

I realised after looking at this again that the 0x80004005 error is irrelevant - it's the error before that matters. I still have no clue what's actually going wrong, but I am now fairly convinced it's timing sensitive, and that's possibly why you're not seeing it.
If I insert a Sleep(1000) before this part of the code, I can get it to fail even earlier.
https://github.com/microsoft/terminal/blob/8f08bb04d02c3c8a0f9897e64c002d61ab57e8fa/src/cascadia/LocalTests_TerminalApp/TabTests.cpp#L291-L299
It looks to me like the tab is getting removed after a certain period of time, so with the additional delay there's no tab left when the _tabs.GetAt(0) call is made, and thus it crashes.
If I instead move the Sleep after the _initializeTerminalPage call, it can then get as far as this _tabs.Size() test before discovering the tab is gone.
https://github.com/microsoft/terminal/blob/8f08bb04d02c3c8a0f9897e64c002d61ab57e8fa/src/cascadia/LocalTests_TerminalApp/TabTests.cpp#L403-L407
Without any delays it can get a bit further, but eventually it reaches a point where it's trying to access a tab after is has been removed.
However, if your computer is fast enough, I guess this may never be a problem for you. So maybe it doesn't matter. As long as it's not an indication of an actual bug somewhere.

Huh. That's a good find. That's far too annoying to call that intermittent. We should fix that so it's deterministic.


text:
Can't paste SSH password into Git?

Windows Terminal version
1.20.10822.0
Windows build number
10.0.19045.0
Other Software
PS C:\Users\col592\Repos> ssh -V
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
PS C:\Users\col592\Repos> git  --version
git version 2.44.0.windows.1
Steps to reproduce

Install Windows Terminal (1.19.10573.0) or the latest preview of Windows Terminal. (1.20.10822.0) Both are effected.

Install Git.

Using Powershell in Windows Terminal, try to git clone a repository:

PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.company.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
git@bitbucket.company.org.au: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Sit there trying to use Ctrl+V, Ctrl+Shift+V and Right click, watch it fail consistently to read your SSH keys password.

Expected Behavior
To be able to simply enter a password into this prompt and have a git clone command actually work.
It does work inside the integrated terminal in Visual Studio:
PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
warning: You appear to have cloned an empty repository.

It also works fine on a remote Ubuntu 22 machine that's being SSH'd to via Powershell/Windows Terminal:
mcollins1@maas-rackd-01:~/repos$ git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
warning: You appear to have cloned an empty repository.

Actual Behavior
See Step 3, there's no way to get it going...
I figured maybe I could use WSL to get around this, but I experience a very similar error when trying to configure SSH agent:
mcollins1@wsl:~$ ssh-add ~/.ssh/mike_ed25519
Enter passphrase for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:

Desperate for a fix, this stuff is so reliable and easy on Ubuntu but I'm stuck with a Windows machine for now... :S

Scratch that, despite using a password manager my SSH keys password has somehow changed...


text:
Screen content does not update in tmux

Environment
Windows 10.0.18363.0
tmux over ssh in cygwin
Steps to reproduce

Attach to tmux session
Fill the screen for example with echo test multiple times
Keep printing test, you should alternate with some different text to see if console is scrolled properly.

Expected behavior
Whole screen buffer is redrawn
Actual behavior
Only first line in terminal is redrawn, the rest of the screen space is static and doesn't update while it should. If the output is one line (i.e without new line). If I do echo 'test\n' whole screen is properly redrawn.
Bisect result
This is regression from this commit https://github.com/microsoft/terminal/commit/ca33d895a359664c337c6482b853489823c216d3 before that everything was working fine.
// CC @miniksa

OK I've managed to reproduce this. I think it's a bug that's been there a while and was just hidden by the fact that the previous invalidation-mechanism would coalesce both invalid regions into repainting the entire display. I need to figure out how to dispatch the appropriate content scrolling from the PTY to the Terminal because the entire point of the til::bitmap change was to not re-emit massive amounts of data that are already on the other side of the fence.

I've encountered a similar issue when using Vim in WSL. The majority of content is not being invalidated while scrolling up and down using keyboard.

The actual content should be line 80 - line 107. But only the first and last line is correctly displayed.

@skyline75489 while you've got a local build, would you mind trying out https://github.com/microsoft/terminal/pull/5122? It's the speculative fix :smile:

@DHowett-MSFT It's working! Vim is back to normal with the help of #5122.

I can also confirm, working fine with the fix.


text:
Windows Terminal not working in S-mode

Environment
Windows build number: Windows 10 in S-mode (I don't think build number matters, to be honest)
Windows Terminal version (if applicable): 1.3.2651.0

Steps to reproduce

Install Windows Terminal app from app store.
Run Windows Terminal app
Try opening cmd terminal

Expected behavior
I would see a powershell or cmd.exe window.
Actual behavior
I get an error [error 0x800711c7 when launching 'powershell.exe'] or [error 0x800711c7 when launching 'cmd.exe'].
Is that in any way related to the s-mode limitations?

0x800711c7 = HRESULT_FROM_WIN32(ERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION), "Your organization used Device Guard to block this app. Contact your support person for more info."

The improved error reporting https://github.com/microsoft/terminal/issues/7186 would be nice here.

It definitely would.
Terminal is not intended to work in S mode, however. Terminal is a window through which you see other applications, and those “other applications” are restricted.

Ok I get that. Maybe it would be worth considering not offering the app to S mode OS in app store then.

Unfortunately, the store has not given us that option. Sorry!

authors: DHowett KalleOlaviNiemitalo vkocjancic


text:
Don't let a window be created with the literal name "new"

As on the tin.
Blocking for 1.18.
Tracked in #14957

IMO, when someone's looking through the defaults.json, window: new will make immediate sense, where window: -1 won't.


text:
Move ICore/ControlSettings to TerminalControl project

Summary of the Pull Request
Move ICoreSettings and IControlSettings from the TerminalSettings project to the TerminalControl project.
The purpose of these interfaces is unchanged.
References
Closes #7140
Related Epic: #885
Related Spec: #6904
PR Checklist

[X] Closes #7140
[X] CLA signed
[X] Tests ~added~/passed (no additional tests necessary)
[X] ~Documentation updated~
[X] ~Schema updated~

Validation Steps Performed
Deployed Windows Terminal and opened a few new tabs.

This is a DRAFT because of a few issues

[ ] Windows Terminal successfully builds and deploys on a second attempt, not first
[ ] Linker issues with TerminalApp local tests
[ ] ICoreSettings/IControlSettings are a part of the Microsoft::Terminal::TerminalControl namespace. I think this feels a little awkward. Should we introduce a separate namespace within the TerminalControl project? But that also feels awkward.


text:
Deleted keybinding for NewTabProfile0

Summary of the Pull Request
I deleted the keybinding for NewTabProfile0, because the keybinding doesn't work.
References
#826
PR Checklist

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

Detailed Description of the Pull Request / Additional comments
The keyboard shortcut CTRL+SHIFT+0 is handled by something else (probably the input method editor: https://support.microsoft.com/en-us/help/967893/input-method-editor-keyboard-shortcut-ctrl-shift-0-switches-the-input) and can't be used. Discussion about this issue is in #826

I'm inclined to agree - probably just remove the default binding. In a hypothetical future PR, we'll pass args to the ShortcutAction instead of just having 10 OpenNewTabWitProfileN events, but lets just leave it for now.
You're also fine not adding a test for this quite yet, since we don't have TerminalApp tests set up yet.

Makes sense. But why don't we use Ctrl+0-9 instead? Then all shortcuts work correctly.

I kinda figured that the chances an app used Ctrl+0-9 was way higher than Ctrl+Shift+0-9.

Okay, then I just unbind it.

My two cents...this feels like splitting hairs here.  From a UX perspective you are now leaving 10th profile unbound, so why not 11th-15th tab?  I think the initial goal was a reasonable 1-10 using known/predictable number values...but now since the 10th can't reliably be mapped to the global default, we're going to keep an unbound one in treating the 10th tab as special, but tab 11 is now writing you a sad letter wondering why it isn't important ;-).
I'm coming from an approach of simplifying the code maintenance, the user profile options, and the realistic liklihood that not having a 10th-n shortcut is a high use case.  Of course if you have customer data supporting the opposite of this approach, that should trump any comment I have here...but opposite of data-driven decision, this feels like leaving code in just to keep the list to an even 10...and weirdly leaving out 11-n to have any same capability.  Basically you're stating the bound for this feature is 10...I'm just saying simplify and make the bound 9...let customer-driven data/feedback alter the course in the future.

I am with tim on this one. Make default 1-9 (maybe even with tab switching Alt+1-9) and maybe in a future PR when it is an argument passing, everybody can use as many profiles with whatever keybinding he wants?
I'll wait a little bit for the opinions of @zadjii-msft and @DHowett and then I'll do what they decide.

Well, I've certainly been convinced. There doesn't seem to be much marginal utility in leaving the 10th NewTab and SwitchToTab options, and when we support custom args in the keybindings, this won't even be an issue anymore.

Oh yeah. Totally convinced! Let’s yank the whole binding.

Alright, I've deleted both NewTabProfile9 and SwitchToTabProfile9.

authors: DHowett-MSFT mKay00 timheuer zadjii-msft


text:
Adding decimal as an intrinsic type

It would be useful to have a decimal intrinsic type available. While it is possible to define a custom one (using scalar extends) this seems like a frequent (and high value) enough numeric type to include in the built-in set.
For the purposes of modeling I don't think we need to worry about rounding modes or similar. However, I think it is worth discussing if the design should be a fixed size -- say like the dotnet decimal or an unbounded size that the emitters can limit as desired.

A concrete proposal might be adding:
scalar decimal extends numeric; // unbounded, big decimal
scalar decimal128 extends decimal;
scalar decimal64 extends decimal128;
scalar decimal32 extends decimal64;

I tend to agree that these should be built in.

Add decimal and decimal128. No to decimal64 and 32 for now, but chime in if you have feedback on this point!

Excellent!

add linting rules to prevent usage in azure.core based specs

Closing as completed

authors: bterlson markcowl marron-at-work stephengoldbaum

repo: microsoft/typespec


text:
[http-client-csharp] fix: generate deserialization switch for nested discriminators

fixes: https://github.com/microsoft/typespec/issues/4979

API change check
API changes are not detected in this pull request.

authors: azure-sdk jorgerangel-msft


text:
[Feature Request, Question] Open in existing Windows Terminal instance

If Windows Terminal is selected as a shell opening repo with it from GUI results in a new Terminal window. This might be desirable in some cases but multiple shells/tabs in a single window is the Windows Terminal thing.
Would it be possible to add an option to open repo in the last active Terminal instance?

Wrong repo. IDK how that happened.

repo: microsoft/vcpkg


text:
Using any baseline other than the current commit fails on macOS

Describe the bug
Trying to use a baseline from an old commit fails on macOS. This error does not happen on Linux or Windows.
If you manually check the commit, a versions/baseline.json is present.
Error: while checking out baseline from commit '1085a57da0725c19e19586025438e8c16f34c890' at subpath 'versions/baseline.json':
fatal: path 'versions/baseline.json' exists on disk, but not in '1085a57da0725c19e19586025438e8c16f34c890'

This may be fixed by updating vcpkg to the latest master via `git pull` or fetching commits via `git fetch`.

It seems like git cannot find the baseline.json file.
Environment

OS: macOS
Compiler: Clang

To Reproduce
Steps to reproduce the behavior:

Change builtin-baseline to an old commit
Config fails

Thanks for posting this issue. How do you use builtin-baseline with an old commit in your project? I make a project use builtin-baseline with an old commit in vcpkg.json, I can install old version of ports succeed. This is my vcpkg.json:
{
    "name": "versions-test",
    "version": "1.0.0",
    "dependencies": [
        {
            "name": "fmt",
            "version>=": "7.1.3"
        },
        "zlib"
    ],
    "builtin-baseline": "99dc49dae7e170c3be63dd097230007f3bb73c4f"
}

This is my build log:
-- Running vcpkg install
Detecting compiler hash for triplet x64-osx...
The following packages will be built and installed:
    fmt[core]:x64-osx -> 7.1.3 -- /Users/vcpkg/lily/vcpkg/buildtrees/versioning_/versions/fmt/dd8cf5e1a2dce2680189a0744102d4b0f1cfb8b6
    zlib[core]:x64-osx -> 1.2.11#9 -- /Users/vcpkg/lily/vcpkg/buildtrees/versioning_/versions/zlib/827111046e37c98153d9d82bb6fa4183b6d728e4
Restored 0 packages from /Users/vcpkg/.cache/vcpkg/archives in 1.925 ms. Use --debug to see more details.
Starting package 1/2: fmt:x64-osx
Building package fmt[core]:x64-osx...
-- Installing port from location: /Users/vcpkg/lily/vcpkg/buildtrees/versioning_/versions/fmt/dd8cf5e1a2dce2680189a0744102d4b0f1cfb8b6
-- Downloading https://github.com/fmtlib/fmt/archive/7bdf0628b1276379886c7f6dda2cef2b3b374f0b.tar.gz -> fmtlib-fmt-7bdf0628b1276379886c7f6dda2cef2b3b374f0b.tar.gz...
-- Extracting source /Users/vcpkg/lily/vcpkg/downloads/fmtlib-fmt-7bdf0628b1276379886c7f6dda2cef2b3b374f0b.tar.gz
-- Applying patch fix-warning4189.patch
-- Using source at /Users/vcpkg/lily/vcpkg/buildtrees/fmt/src/2b3b374f0b-8ea71ee8ea.clean
-- Found external ninja('1.10.2').
-- Configuring x64-osx-dbg
-- Configuring x64-osx-rel
-- Building x64-osx-dbg
-- Building x64-osx-rel
-- Installing: /Users/vcpkg/lily/vcpkg/packages/fmt_x64-osx/share/fmt/copyright
-- Fixing pkgconfig file: /Users/vcpkg/lily/vcpkg/packages/fmt_x64-osx/lib/pkgconfig/fmt.pc
-- Fixing pkgconfig file: /Users/vcpkg/lily/vcpkg/packages/fmt_x64-osx/debug/lib/pkgconfig/fmt.pc
-- Installing: /Users/vcpkg/lily/vcpkg/packages/fmt_x64-osx/share/fmt/usage
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /Users/vcpkg/.cache/vcpkg/archives/2e/2e15de678ae586eb9697a1b2a6b028ad06ba942a93f9d88a1dca7a11415e9ddd.zip
Installing package fmt[core]:x64-osx...
Elapsed time for package fmt:x64-osx: 12.68 s
Starting package 2/2: zlib:x64-osx
Building package zlib[core]:x64-osx...
-- Installing port from location: /Users/vcpkg/lily/vcpkg/buildtrees/versioning_/versions/zlib/827111046e37c98153d9d82bb6fa4183b6d728e4
-- Downloading http://www.zlib.net/zlib-1.2.11.tar.gz;https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz -> zlib1211.tar.gz...
-- Extracting source /Users/vcpkg/lily/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Applying patch 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-- Applying patch add_debug_postfix_on_mingw.patch
-- Using source at /Users/vcpkg/lily/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5.clean
-- Found external ninja('1.10.2').
-- Configuring x64-osx-dbg
-- Configuring x64-osx-rel
-- Building x64-osx-dbg
-- Building x64-osx-rel
-- Fixing pkgconfig file: /Users/vcpkg/lily/vcpkg/packages/zlib_x64-osx/lib/pkgconfig/zlib.pc
-- Fixing pkgconfig file: /Users/vcpkg/lily/vcpkg/packages/zlib_x64-osx/debug/lib/pkgconfig/zlib.pc
-- Installing: /Users/vcpkg/lily/vcpkg/packages/zlib_x64-osx/share/zlib/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /Users/vcpkg/.cache/vcpkg/archives/1c/1ca313b48d0b759607ee87497d2823e378bc116ee353a87db3d48ded6e52e7d9.zip
Installing package zlib[core]:x64-osx...
Elapsed time for package zlib:x64-osx: 7.906 s

Total elapsed time: 22.86 s

The package fmt provides CMake targets:

    find_package(fmt CONFIG REQUIRED)
    target_link_libraries(main PRIVATE fmt::fmt)

    # Or use the header-only version
    target_link_libraries(main PRIVATE fmt::fmt-header-only)

The package zlib is compatible with built-in CMake targets:

    find_package(ZLIB REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

-- Running vcpkg install - done
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /Users/vcpkg/lily/issue23748/vcpkg_installed/x64-osx/debug/lib/libz.a (found version "1.2.11")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/vcpkg/lily/issue23748

We are currently using the following vcpkg.json:
{
  "name": "gestaltor",
  "version-string": "1.0.0",
  "builtin-baseline": "1085a57da0725c19e19586025438e8c16f34c890",
  "dependencies": [
    {
      "name": "qtkeychain",
      "version>=": "0.13.2#1",
      "default-features": false
    }
  ]
}

I'm currently on commit 440075a9fccf52cab386521967e4f074acd1bd34 in vcpkg.
We have a CI Pipeline for Windows, Linux and macOS. Only macOS fails and only works if I use the current vcpkg commit as builtin-baseline. I also tried to explicitly fetch the vcpkg submodule in our build script, but this did not help.
In CMake I set the toolchain file like this:
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/thirdparty/vcpkg/scripts/buildsystems/vcpkg.cmake"
      CACHE STRING "")

I get the same error in a CI run, if I run git fetch origin <builtin-baseline-ref> in the submodule folder before configuring cmake the issue is fixed.

@UX3D-haertl Does the solution https://github.com/microsoft/vcpkg/issues/23748#issuecomment-1126833723 can resolve your issue?

@LilyWangLL I encountered the same issue on Windows, https://github.com/microsoft/vcpkg/issues/23748#issuecomment-1126833723 from @Dico200  works for me.
Before:

After:

But I'm curious about why it is required.

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.


text:
[grpc] Build error gRPC_MSVC_STATIC_RUNTIME does not exist

Host Environment

OS: linux-64x
Compiler: revision

To Reproduce
Steps to reproduce the behavior:
./vcpkg install grpc:x64-linux
Failure logs
./vcpkg install grpc:x64-linux
Computing installation plan...
The following packages will be built and installed:
    grpc[codegen,core]:x64-linux -> 1.44.0#1
Detecting compiler hash for triplet "x64-linux"...
Restored 0 packages from /home/tsaiz/.cache/vcpkg/archives in 5.681 us. Use --debug to see more details.
Installing 1/1 grpc:x64-linux...
Building grpc[codegen,core]:x64-linux...
-- Using cached grpc-grpc-591d56e1300b6d11948e1b821efac785a295989c.tar.gz.
-- Extracting source /home/tsaiz/vcpkg/downloads/grpc-grpc-591d56e1300b6d11948e1b821efac785a295989c.tar.gz
-- Applying patch 00001-fix-uwp.patch
-- Applying patch 00002-static-linking-in-linux.patch
-- Applying patch 00003-undef-base64-macro.patch
-- Applying patch 00004-link-gdi32-on-windows.patch
-- Applying patch 00005-fix-uwp-error.patch
-- Applying patch 00006-fix-uwp-error.patch
-- Applying patch 00009-use-system-upb.patch
-- Applying patch 00010-add-feature-absl-sync.patch
-- Applying patch 00011-fix-csharp_plugin.patch
-- Applying patch snprintf.patch
-- Applying patch 00012-fix-use-cxx17.patch
-- Applying patch 00013-build-upbdefs.patch
-- Applying patch 00014-pkgconfig-upbdefs.patch
-- Using source at /home/tsaiz/vcpkg/buildtrees/grpc/src/85a295989c-6cf7bf442d.clean
-- Configuring x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:83 (message):
    Command failed: /home/tsaiz/vcpkg/downloads/tools/cmake-3.22.2-linux/cmake-3.22.2-linux-x86_64/bin/cmake /home/tsaiz/vcpkg/buildtrees/grpc/src/85a295989c-6cf7bf442d.clean -DgRPC_ABSL_SYNC_ENABLE=OFF -DgRPC_BUILD_CODEGEN=ON -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_STATIC_LINKING=1 -DgRPC_MSVC_STATIC_RUNTIME=0 -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ABSL_PROVIDER=package -DgRPC_UPB_PROVIDER=package -DgRPC_RE2_PROVIDER=package -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG -DgRPC_CARES_PROVIDER=package -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_BINDIR:STRING=bin -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=/home/tsaiz/vcpkg/installed/x64-linux/tools/protobuf/protoc -DPROTOBUF_PROTOC_EXECUTABLE=/home/tsaiz/vcpkg/installed/x64-linux/tools/protobuf/protoc MAYBE_UNUSED_VARIABLES gRPC_MSVC_STATIC_RUNTIME -DCMAKE_MAKE_PROGRAM=/home/tsaiz/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -DCMAKE_SYSTEM_NAME=Linux -DBUILD_SHARED_LIBS=OFF -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/tsaiz/vcpkg/scripts/toolchains/linux.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=external -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=/home/tsaiz/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=x64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=/home/tsaiz/vcpkg -D_VCPKG_INSTALLED_DIR=/home/tsaiz/vcpkg/installed -DVCPKG_MANIFEST_INSTALL=OFF -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/tsaiz/vcpkg/packages/grpc_x64-linux/debug
    Working Directory: /home/tsaiz/vcpkg/buildtrees/grpc/x64-linux-dbg
    Error code: 1
    See logs for more information:
      /home/tsaiz/vcpkg/buildtrees/grpc/config-x64-linux-dbg-err.log

Call Stack (most recent call first):
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:360 (vcpkg_execute_required_process)
  ports/grpc/portfile.cmake:47 (vcpkg_cmake_configure)
  scripts/ports.cmake:146 (include)

error: building grpc:x64-linux failed with: BUILD_FAILED

content of /home/tsaiz/vcpkg/buildtrees/grpc/config-x64-linux-dbg-err.log
CMake Error: The source directory "/home/tsaiz/vcpkg/buildtrees/grpc/x64-linux-dbg/gRPC_MSVC_STATIC_RUNTIME" does not exist.

Additional context
ls /home/tsaiz/vcpkg/buildtrees/grpc/x64-linux-dbg
shows up empty

Can you please provide the full log file?
Thanks.

Note that MAYBE_UNUSED_VARIABLES gRPC_MSVC_STATIC_RUNTIME is passed to CMake.
You must update port  vcpkg-cmake (and maybe more).

Hi, I managed to fix this issue by nuking the whole vcpkg folder and restarting to scratch.
previously I have tried nuking the buildtrees folder and re-running bootstrap as well, but that did not help. closing this as no longer an issue

Hi, I managed to fix this issue by nuking the whole vcpkg folder and restarting to scratch.

This has the effect of installing new versions of everything. But you will need to update again in the future. There is vcpkg update and vcpkg upgrade to help with that.

yea I was at my wits end :/ I did try vcpkg update and vcpkg upgrade as well. it did not help

authors: JackBoosY dg0yt tsaizhenling


text:
build libmysql in mac is successful,but in centos all  failed ,because of  BGL and  icu

HI:
when I install  libmysql package with vcpkg ,on  mac  is  build successfully final ,but also meet so many failed try times,  on centos7 ,use vcpkg install libmysql ,straightly failed , cannot install, meet  icu4c-71_1-src.tgz    * icu[core]:x64-linux -> 71.1 and  Boost Graph Library  boostorg-graph-boost-1.80.0.tar.gz  not found.
thanks

Thanks for posting this issue. Please provide the error log file. Did you install it on the latest vcpkg?

Thanks for posting this issue. Please provide the error log file. Did you install it on the latest vcpkg?

yeah,the lastest vcpkg is install

Please provide the error log file.

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.

Hi ,Now  I have clear the linux disk,can not find the log, in my opinion , the error should  be remeet by  all the linux  environment, We need to deal with  the execute-logical of  vcpkg install dependency packages, you can try any linux  machine  to execute the command  [vcpkg install libmysql ] ,will meet the same error

I can't reproduce this issue. I use the Ubuntu, this is my output log:
Elapsed time to handle libmysql:x64-linux: 7.855 min
Total elapsed time: 24.32 min

The package libmysql provides CMake targets:

    find_package(libmysql REQUIRED)
    target_link_libraries(main PRIVATE ${MYSQL_LIBRARIES})

I can't reproduce this issue. I use the Ubuntu, this is my output log:
Elapsed time to handle libmysql:x64-linux: 7.855 min
Total elapsed time: 24.32 min

The package libmysql provides CMake targets:

    find_package(libmysql REQUIRED)
    target_link_libraries(main PRIVATE ${MYSQL_LIBRARIES})

please try to use centos7

I can't reproduce this issue. I use the Ubuntu, this is my output log:
Elapsed time to handle libmysql:x64-linux: 7.855 min
Total elapsed time: 24.32 min

The package libmysql provides CMake targets:

    find_package(libmysql REQUIRED)
    target_link_libraries(main PRIVATE ${MYSQL_LIBRARIES})

please try to use centos7

I don't have centos machine, I will reopen this issue. Maybe someone have idea about this issue.

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.

authors: JonLiu1993 LilyWangLL mullerhai