Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSB4006: "circular dependency" in main #14581

Closed
brupelo opened this issue Dec 18, 2022 · 7 comments
Closed

MSB4006: "circular dependency" in main #14581

brupelo opened this issue Dec 18, 2022 · 7 comments
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Product-Meta The product is the management of the products.

Comments

@brupelo
Copy link

brupelo commented Dec 18, 2022

I like so much this project that I was thinking about getting the latest features sooner without having to wait for new official releases to be published in the microsoft store. So I was wondering what's the recommended way to do that... My first thought was trying to build origin/main by myself expecting this would be the "production" branch but I've realized is not, for instance, when I tried building 165d3edde9ca850f25f7c1e740b5661461fcf175 I'd get some crashes:

Build FAILED.

       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
       "D:\terminal\src\cascadia\WindowsTerminal\WindowsTerminal.vcxproj" (GetTargetPath target) (100:3) ->
       "D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj" (default target) (109) ->
       (MarkupCompilePass2 target) -> 
         D:\terminal\src\cascadia\TerminalSettingsEditor\AddProfile.xaml(63,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(107,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(60,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Appearances.xaml(52,40): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]


       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (default target) (76) ->
         D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.CppWinRT.targets(223,13): error MSB4006: There is a circular dependency in the target dependency graph involving target "CppWinRTComputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj]


       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
       (_BuildDependentProjects target) -> 
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj]

    4 Warning(s)
    2 Error(s)

Which makes sense I guess, as I've realized mostly of the main commits pipelines are failing quite often so I guess this is just a dev branch.

So, what'd be the recommended way to get the latest features that are still not available in the microsoft store app? Or is it just better to stick to the official microsoft store one instead and being more patient 😋?

@brupelo brupelo added the Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs label Dec 18, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 18, 2022
@zcobol
Copy link

zcobol commented Dec 19, 2022

@brupelo you could checkout the latest release branch i.e. 2f1d2ea0d (HEAD -> release-1.16, tag: v1.16.3463.0, origin/release-1.16) however building from main is where all the fun is!

@zadjii-msft
Copy link
Member

main is the correct, most up to date branch. We've been seeing these circular dependency errors for about a week now, before the holidays, but never had a chance to get to the root cause. Congrats, this is now the thread

A mail thread I read once mentioned removing /m might help?

It's also a flakey failure, so just running the build again might fix it.

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Build Issues pertaining to the build system, CI, infrastructure, meta Product-Meta The product is the management of the products. and removed Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 19, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Dec 19, 2022
@zadjii-msft zadjii-msft added this to the Terminal v1.17 milestone Dec 19, 2022
@zadjii-msft zadjii-msft changed the title Which branch contains latest stable features? MSB4006: "circular dependency" in main Dec 20, 2022
@brupelo
Copy link
Author

brupelo commented Dec 23, 2022

@zcobol , @zadjii-msft Hey guys, thanks to clarify! all clear now, I guess it just makes sense to start using main directly from now on rather than the microsoft store old stable one then.

One question regarding this, so I assume the result of running bcz.cmd would give me a portable package, right? Now, how can I start using my old settings now? Also, me just being dummy but, what's the way to run the terminal from the D:\terminal\bin\x64\Debug directory? As I see a bunch of exes and when I double click wt.exe nothing will show up. Still trying to familiarize myself with the tools directory (bcx, bzc, bx, bz), which I guess the acronyms stands for (b)build (c)clean (z)solution (x)project

As for the MSB4006 issue, did you figure out a way to reproduce this one deterministically without making a cold build (ie: razzle && bcz) ? Asking cos I guess waiting ~9min-12min per build is not the smart way to go here 😋

Here's my last attempts using latest main (547349a)

  1. bcz
       "D:\terminal\OpenConsole.sln" (Clean;Build target) (1) ->
       "D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (Clean;Build target) (89:2) ->
         D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.CppWinRT.targets(2
       23,13): error MSB4006: There is a circular dependency in the target dependency graph involving target "CppWinRTC
       omputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj]


       "D:\terminal\OpenConsole.sln" (Clean;Build target) (1) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (Clean;Build target) (2) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (85:2) ->
       (_BuildDependentProjects target) ->
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridg
       e.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [D:\terminal\src\ca
       scadia\CascadiaPackage\CascadiaPackage.wapproj]

    25 Warning(s)
    2 Error(s)

Time Elapsed 00:08:49.16
  1. rm -rf ..\bin && bz rel
    1158 Warning(s)
    0 Error(s)

Time Elapsed 00:12:24.33

  1. bz rel
    4 Warning(s)
    0 Error(s)

Time Elapsed 00:01:02.80

  1. bz
       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (default target) (78) ->
         D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.C
       ppWinRT.targets(223,13): error MSB4006: There is a circular dependency in the target dependency
        graph involving target "CppWinRTComputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAz
       Bridge\TerminalAzBridge.vcxproj]


       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2
       ) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (97) ->
       (_BuildDependentProjects target) ->
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Micro
       soft.DesktopBridge.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not
        log an error. [D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj]

    4 Warning(s)
    2 Error(s)

Time Elapsed 00:00:56.13
  1. bz
Build succeeded.

       "D:\terminal\OpenConsole.sln" (Build target) (1) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2
       ) ->
       "D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
       "D:\terminal\src\cascadia\WindowsTerminal\WindowsTerminal.vcxproj" (GetTargetPath target) (100:
       3) ->
       "D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj" (d
       efault target) (111) ->
       (MarkupCompilePass2 target) ->
         D:\terminal\src\cascadia\TerminalSettingsEditor\AddProfile.xaml(63,56): XamlCompiler warning
       WMC1506: OneWay bindings require at least one of their steps to support raising notifications w
       hen their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Set
       tings.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(107,56): XamlCompiler warning WMC
       1506: OneWay bindings require at least one of their steps to support raising notifications when
        their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settin
       gs.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(60,56): XamlCompiler warning WMC1
       506: OneWay bindings require at least one of their steps to support raising notifications when
       their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Setting
       s.Editor.vcxproj]
         D:\terminal\src\cascadia\TerminalSettingsEditor\Appearances.xaml(52,40): XamlCompiler warning
        WMC1506: OneWay bindings require at least one of their steps to support raising notifications
       when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Se
       ttings.Editor.vcxproj]

    4 Warning(s)
    0 Error(s)

Time Elapsed 00:00:51.50

Read in sequence attempts 1/2/3/4/5... Now, this is interesting, in attempt 4 you'll see the crashes while in attempt 5 you won't. I guess the project dag resolution is not deterministic?

@zadjii-msft
Copy link
Member

Sorry for the delays - we've all been OOF for the holidays.

In general, I don't actually use bcz to clean build the Terminal anymore. That was much more valuable when it was just conhost, but clean builds with cppwinrt are just prohibitively expensive.

Unfortunately, building an app package on the commandline is also just kinda a chore, and there's no way to avoid that. I'd recommend following these steps if you're really committed to the idea. I've found that the fastest inner loop is just hitting "deploy" in VS though. VS has some extra magic built into it that lets an incremental rebuild go a lot faster for a Package than msbuild alone.

Then, you can run the Terminal with the windowsterminal.exe that's in the src\cascadia\CascadiaPackage\bin\%platform%\%configuration%\Appx directory. That Appx dir has all the dependencies laid out in a way that should work to double-click.

@zadjii-msft
Copy link
Member

TerminalAzBridge.vcxproj

  <!-- Dependencies -->
  <ItemGroup>
    <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
      <Project>{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}</Project>
    </ProjectReference>
    <ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj" />
  </ItemGroup>

But that's not the GUID for TerminalConnection 👀

zadjii-msft added a commit that referenced this issue Mar 17, 2023
  I don't think this is the resolution for #14581, but this can't hurt
zadjii-msft added a commit that referenced this issue Mar 17, 2023
)

I don't think this is the resolution for #14581, but this can't hurt. These deps were using the wrong GUIDs
@zadjii-msft
Copy link
Member

I haven't seen one of these since #15008. I'll give it a week, but I think this is fixed now ☺️

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 27, 2023
DHowett pushed a commit that referenced this issue Mar 31, 2023
)

I don't think this is the resolution for #14581, but this can't hurt. These deps were using the wrong GUIDs

(cherry picked from commit 5c9f756)
Service-Card-Id: 88719283
Service-Version: 1.17
@zadjii-msft
Copy link
Member

Hey all, our bot's been acting up the last few weeks. This issue has been marked as requiring author feedback, but hasn't had any activity in the last week. We're gonna close it to tidy up. Feel free to continue the discssion in the comments - we can always reopen if new information comes to light. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Product-Meta The product is the management of the products.
Projects
None yet
Development

No branches or pull requests

4 participants