terminal/src
Mike Griese ea456cf121
Fix for missing CopyComplete files in TerminalConnection.vcxproj (#11804)
I'm working on making the FastUpToDate check in Vs work for the Terminal project. This is one of a few PRs in this area.

FastUpToDate lets vs check quickly determine that it doesn't need to do anything for a given project. 

However, a few of our projects don't produce all the right artifacts, or check too many things, and this eventually causes the `wapproj` to rebuild, EVERY TIME YOU F5 in VS. 

This first PR deals with the `.copycomplete` file in `obj\x64\debug\terminalconnection\`. Below are my verbatim notes, which led to the solution in this PR. 








### Problem 1 
* There were missing `.copycomplete` files across the repo. 
  ```
  obj\x64\debug\microsoft.terminal.settings.model.lib\microsoft.terminal.settings.modellib.vcxproj.copycomplete
  obj\x64\debug\microsoft.terminal.settings.model\microsoft.terminal.settings.model.vcxproj.copycomplete
  obj\x64\debug\terminalapplib\terminalapplib.vcxproj.copycomplete
  obj\x64\debug\terminalapp\terminalapp.vcxproj.copycomplete
  obj\x64\debug\terminalconnection\terminalconnection.vcxproj.copycomplete
  ```
  - just making empty files there seemed good enough. 
  - Might be because the CopyLocal target was already there, but the task didn't ever run to create that file? Weird.
* UPDATE: checking out main, and building again - the `.copycomplete`s are gone. So that's something that can be improved.
* The only place I could find a reference was in `"obj\x64\Debug\TerminalConnection\TerminalConnection.vcxproj.FileListAbsolute.txt"`, which will get updated if you remove the line from that file (but no one seemingly writes it or mentiones it in the log)
* Deleting `bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll` then building the project did copy the file, but it didn't touch the copycomplete. Weird.
* Why does
  - `TerminalConnection` think it needs this
  - `Microsoft.Terminal.Settings.Model.Lib` have one
  - `Microsoft.Terminal.Control*` **NOT** have one


* This file is a [`@(CopyUpToDateMarker)`](https://github.com/dotnet/msbuild/blob/main/src/Tasks/Microsoft.Common.CurrentVersion.targets#L392)
* The target [`_CopyFilesMarkedCopyLocal`](https://github.com/dotnet/msbuild/blob/main/src/Tasks/Microsoft.Common.CurrentVersion.targets#L4795) touches `@(CopyUpToDateMarker)`, when:
  - `"'@(ReferencesCopiedInThisBuild)' != ''` and
  - `'$(WroteAtLeastOneFile)' == 'true'"`

* In out build output:
```
6>Target _CopyFilesMarkedCopyLocal:
6>  Using "Copy" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
6>  Task "Copy"
6>    Did not copy from file "C:\Users\migrie\dev\public\terminal\bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll" to file "C:\Users\migrie\dev\public\terminal\bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.
6>  Done executing task "Copy".
6>  Task "Touch" skipped, due to false condition; ('@(ReferencesCopiedInThisBuild)' != '' and '$(WroteAtLeastOneFile)' == 'true') was evaluated as ('C:\Users\migrie\dev\public\terminal\bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll' != '' and 'False' == 'true').
```
  - So `WroteAtLeastOneFile` should be true, when it's currently false. That _looks_ like it's set to true when the file does get copied, wheich did't happen because the copy was skipped.
  - WAIT LOOK AT THAT MESSAGE. "Did not copy from file "
    `"C:\Users\migrie\dev\public\terminal\bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll"`  to file
    `"C:\Users\migrie\dev\public\terminal\bin\x64\Debug\TerminalConnection\cpprest142_2_10d.dll"`
    THESE ARE THE SAME FILE.
    `@(ReferenceCopyLocalPaths)` is filled with the file already?!
- The Target `AppLocalFromInstalled` is the only other thing that references `cpprest142_2_10d.dll`.
- Even if you delete the `cpprest142_2_10d.dll`, then `_CopyFilesMarkedCopyLocal` still evaluates the Touch condition as false, and doesn't touch it.
- the `deployBinary()` function in `packages\vcpkg-cpprestsdk.2.10.14\scripts\buildsystems\msbuild\applocal.ps1` does the actual job of copying the file. It copies it outside of MsBuild, which prevents MsBuild from copying it, and now MsBuild thinks it shouldn't write the `.copycomplete` file itself.
2021-11-23 11:51:45 +00:00
..
api-ms-win-core-synch-l1-2-0 Introduce a api-ms-win-core-synch-l1-2-0 shim for Windows 7 (#10559) 2021-07-07 16:48:28 +00:00
buffer Standardize the color table order (#11602) 2021-11-04 22:13:22 +00:00
cascadia Fix for missing CopyComplete files in TerminalConnection.vcxproj (#11804) 2021-11-23 11:51:45 +00:00
dep Move all wildcards into targets or expand them (#6406) 2020-06-08 14:01:47 -07:00
host Disable the acceptance of C1 control codes by default (#11690) 2021-11-17 23:40:31 +00:00
inc Introduce new TIL string helpers, teach older ones to use wmemcmp (#11725) 2021-11-17 23:42:40 +00:00
interactivity Fix missing window border when use "win+arrow down" in fullscreen mode in Conhost (#11692) 2021-11-16 16:14:54 +00:00
internal Implement Default Terminal (#7489) 2021-03-26 17:09:49 -05:00
propsheet Merged PR 6176782: [Git2Git] Get rid of dead build macros/#defines FE_IME, W32_SB, etc. 2021-06-21 10:50:52 -07:00
propslib Introduce AtlasEngine - A new text rendering prototype (#11623) 2021-11-13 00:10:06 +00:00
renderer Use nearby fonts for font fallback (#11764) 2021-11-16 23:22:02 +00:00
server Migrate OSS up to f9a844dbd 2021-09-21 16:22:57 -05:00
staging Merged PR 6147892: Make til::feature build in the OS 2021-06-11 17:57:36 +00:00
terminal Disable the acceptance of C1 control codes by default (#11690) 2021-11-17 23:40:31 +00:00
testlist Reflect testlist change from OS 2021-03-29 15:24:43 -05:00
til Add an enum-compatible bitset class. (#10492) 2021-09-27 13:27:29 +00:00
tools Upgrade to Windows SDK 22000 (#11728) 2021-11-18 18:08:26 +00:00
tsf Fix Touch Keyboard invocation issue (#11389) 2021-10-04 14:29:56 +00:00
types Add a file for storing elevated-only state (#11222) 2021-11-13 01:58:43 +01:00
winconpty Implement and action for manually clearing the Terminal (and conpty) buffer (#10906) 2021-09-02 14:59:42 +00:00
common.build.post.props Add support for branch- and branding-based feature flagging (#10361) 2021-06-10 23:09:52 +00:00
common.build.pre.props Upgrade to Windows SDK 22000 (#11728) 2021-11-18 18:08:26 +00:00
common.build.tests.props Enable /Zc:preprocessor (#10593) 2021-07-13 23:00:11 +00:00
common.pgo.compile.props Implement PGO in pipelines for AMD64 architecture; supply training test scenarios (#10071) 2021-05-13 21:12:30 +00:00
common.pgo.runtime.props Implement PGO in pipelines for AMD64 architecture; supply training test scenarios (#10071) 2021-05-13 21:12:30 +00:00
ConsolePerf.regions.xml Tab to spaces (#578) 2019-05-13 18:06:36 -07:00
ConsolePerf.wprp Set keyword flags on all tracelog events (#10098) 2021-05-14 23:14:26 +00:00
cppwinrt.build.post.props Upgrade to C++/WinRT 2.0.210825.3 (#11188) 2021-09-10 21:33:13 +00:00
cppwinrt.build.pre.props Compile OpenConsoleProxy without CRT (#11610) 2021-10-26 19:08:49 +00:00
dirs Merged PR 6147892: Make til::feature build in the OS 2021-06-11 17:57:36 +00:00
features.xml Introduce AtlasEngine - A new text rendering prototype (#11623) 2021-11-13 00:10:06 +00:00
project.inc Merged PR 6654362: [Git2Git] OS build fixes for f9b97c488 2021-11-09 23:16:26 +00:00
project.unittest.inc Merged PR 4915530: Reflect OS Build fixes on top of 58f5d7c7 2020-07-13 23:00:53 +00:00
StaticAnalysis.ruleset Fix SA for Visual Studio 16.8 (#8551) 2020-12-11 05:04:30 +00:00
Terminal.wprp Add even MORE logging for defterm (#11537) 2021-10-19 13:29:18 -07:00
unit.tests.x64.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
unit.tests.x86.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.post.props Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.pre.props Upgrade to Windows SDK 22000 (#11728) 2021-11-18 18:08:26 +00:00