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
Create vcxproj for yaml-cpp and add manifest helper lib with tests #14
Conversation
src/YamlCppLib/readme.txt
Outdated
@@ -0,0 +1,12 @@ | |||
Do not change code under yaml-cpp directory. yaml-cpp directory contains yaml-cpp source code from https://github.com/jbeder/yaml-cpp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do [](start = 0, length = 2)
Please rename to README.md and use markdown #Closed
<PlatformToolset>v140</PlatformToolset> | ||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset> | ||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset> | ||
<CharacterSet>Unicode</CharacterSet> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CharacterSet [](start = 5, length = 12)
Please set the build to use C++17. If that does not work, we will need to investigate link compatibility. #Closed
You will need to update cgmanifest in the root to include this new dependency. #Closed |
Please add at least a test binary that invokes this code to ensure that it is building and working properly. #Closed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
Chatted I'll check in this together with manifesthelper lib In reply to: 566740080 [](ancestors = 566740080) |
The packages get built in all of those from 'buildPlatform', but anything outside of those will be built x86. I haven't invested much into getting this exactly right atm. In reply to: 567629920 [](ancestors = 567629920) Refers to: azure-pipelines.yml:29 in a314fa1. [](commit_id = a314fa1, deletion_comment = False) |
YAML::Node installerNode = installersNode[i]; | ||
ManifestInstaller installer; | ||
installer.PopulateInstallerFields(installerNode); | ||
this->Installers.push_back(installer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push_back [](start = 29, length = 9)
Use 'emplace_back(std::move(installer))' so that we don't have to make copies of all the strings #Resolved
#include "manifest.h" | ||
|
||
// TODO: This is an example of a library function | ||
void fnPackageManifestHelper() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fnPackageManifestHelper [](start = 5, length = 23)
What is this for? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally checked in, I thought I had removed it. I'll remove in the next push
In reply to: 360134880 [](ancestors = 360134880)
|
||
#include "pch.h" | ||
#include "framework.h" | ||
#include "yaml-cpp\yaml.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"yaml-cpp\yaml.h" [](start = 9, length = 17)
This should go into the pch #Resolved
{ | ||
Manifest manifest = Manifest::CreatePackageManifest("GoodManifest.yml"); | ||
|
||
REQUIRE(manifest.Id.compare("microsoft.msixsdk") == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compare [](start = 24, length = 7)
Do no use compare for this, simply do 'manifest.Id == "microsoft.msixsdk"' #Resolved
|
||
using namespace AppInstaller::Package::Manifest; | ||
|
||
TEST_CASE("Read good package manifest and verify contents", "[PackageManifestHelper]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read good package manifest and verify contents [](start = 11, length = 46)
This is the test case name, lets not put spaces in it. #Resolved
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
#include "pch.h" | ||
#include "yaml-cpp\yaml.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put in the pch #Resolved
std::string Version; | ||
|
||
// Name subject to change | ||
std::string ShortId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShortId [](start = 20, length = 7)
please add explanation + example #WontFix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the location for that kind of documentation.
In reply to: 360142170 [](ancestors = 360142170)
using namespace winrt; | ||
using namespace Windows::Foundation; | ||
|
||
int main(int argc, char** argv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main [](start = 4, length = 4)
Sooooo, I'm now thinking maybe we should collapse down to a single test binary... I'm not sure its worth it to have separate ones. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now is fine. If you want to just put the tests and TestData into the existing one, I can rename it in my PR once I merger your change in.
In reply to: 360147613 [](ancestors = 360147613,360143037)
} | ||
|
||
Manifest Manifest::CreatePackageManifest(const std::string& inputFile) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ [](start = 4, length = 1)
Add logging throughout the project ex. file path #Pending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently only tracelogging is enabled. we'll add a logger wrapper and log in a following PR
In reply to: 360160037 [](ancestors = 360160037)
src/PackageManifestHelper/Manifest.h
Outdated
#include "ManifestInstaller.h" | ||
#include "ManifestLocalization.h" | ||
|
||
namespace AppInstaller::Package::Manifest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package::Manifest [](start = 24, length = 17)
Could we just name this part YAML #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted offline and we'll use AppInstaller::Manifest
In reply to: 360168250 [](ancestors = 360168250)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes yaml-cpp code compiled as part of the AppInstallerClient solution.