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

Wire up build targets to exclude content items from iOS and Android checks #4861

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

pranavkm
Copy link
Contributor

Fixes #791

@pranavkm pranavkm requested a review from a team as a code owner February 23, 2022 18:55
Copy link
Member

@Eilon Eilon left a comment

Choose a reason for hiding this comment

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

Seems legit.


<!-- Update Content files that are managed by the Razor SDK to opt out of iOS and Android content-checks -->
<ItemGroup>
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="@(StaticWebAsset)" />
Copy link
Member

Choose a reason for hiding this comment

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

I believe this needs to be as below:

Suggested change
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="@(StaticWebAsset)" />
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="%(StaticWebAsset.OriginalItemSpec)" />

The reason is that StaticWebAssets always use the full path to the item, and capture the original definition within OriginalItemSpec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out we don't need to do this - RazorSDK removes SWA items from Content which makes this a lot easier since we don't have to do set intersections (the list of items that are neither SWA nor ScopedCssInputs).

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 still need to do this for ScopedCssInputs as they get removed from SWA as part of bundling (but I might be wrong)

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

Thanks @pranavkm!

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.

Razor SDK incompatible with iOS SDK regarding "Content" items
3 participants