Skip to content

[build] Copy templates to lowercase path on Linux #5873

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

Merged
merged 3 commits into from
Apr 30, 2021

Conversation

pjcollins
Copy link
Member

Context: https://github.com/dotnet/sdk/issues/16946

Copy our template workload pack to a lowercase destination so that it
can be detected and used when building and testing on Linux.

Context: https://github.com/dotnet/sdk/issues/16946

Copy our template workload pack to a lowercase destination so that it
can be detected and used when building and testing on Linux.
Comment on lines 129 to 131
<Copy SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" />
<!-- Copy template packs to lowercase destination when running on Linux -->
<Copy Condition="'$(HostOS)' != 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" />
<Copy Condition="'$(HostOS)' == 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFiles="@(_WLTemplates->'%(Filename)'->ToLower()->'$(DotNetPreviewPath)template-packs\%(Identity)')" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could always do the lower case, even the .NET 5 ones are lower:

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, we can always copy to a lowercase location. I am also hoping to wait for a response on the issue or to chat about this quickly on Thursday to see if we should change the template pack ID / version (here and in macios) instead. If there won't be SDK changes coming that will process the packs regardless of casing then we should probably make that change instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could someone explain that DestinationFiles expression to me? I've never seen multiple -> constructs before. Does the rightmost %(Identity) apply to the "intermediate" list resulting from @(_WLTemplates->'%(Filename)'->ToLower()), or is it %(_WLTemplates.Identity)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The %(Identity) in this case will be the product of the transform plus the item function, so the value of
@(_WLTemplates->'%(Filename)'->ToLower()) best summarizes it.

@pjcollins
Copy link
Member Author

Assuming this works everywhere I think we can merge it temporarily, or we can wait for a potential resolution to https://github.com/dotnet/sdk/issues/16946.

@pjcollins pjcollins merged commit 032d840 into dotnet:main Apr 30, 2021
@pjcollins pjcollins deleted the lc-linux-templates branch April 30, 2021 14:35
jonathanpeppers pushed a commit that referenced this pull request May 3, 2021
Context: https://github.com/dotnet/sdk/issues/16946

Copy our template workload pack to a lowercase destination so that it
can be detected and used when building and testing on Linux.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants