Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Oct 20, 2022

Context: dotnet/android-libraries#558

One task that requires extra time and care is validating that any newly bound namespaces are correctly renamed to our established standards. If one is missed, it cannot be fixed without breaking the ecosystem around it. Thus this is a task that CI should enforce because humans make mistakes.

In order to do so, we will maintain an allow-list of published namespaces that needs to be updated with any allowed namespace. This file will be published-namespaces.txt in the repo root.

After the repo assemblies has been compiled, this file can be checked with:

dotnet cake utilities.cake -t=verify-namespace-file

If there are differences, they will be reported and the build will fail:

========================================
verify-namespace-file
========================================
New Namespaces
--------------
AndroidX.Sqlite.Db
AndroidX.Sqlite.Db.Framework

Removed Namespaces
------------------
AndroidX.Biometric2

This file will need to be updated when any namespaces are added or removed. This can be accomplished with:

dotnet cake utilities.cake -t=generate-namespace-file

CI Example:
image

@jpobst jpobst force-pushed the verify-namespaces branch from 0aa40d1 to 43fbb77 Compare October 20, 2022 18:12
@jpobst jpobst marked this pull request as ready for review October 21, 2022 00:35
@jpobst jpobst requested a review from moljac October 21, 2022 00:35
@moljac moljac merged commit 994cb4b into main Oct 21, 2022
@moljac moljac deleted the verify-namespaces branch October 21, 2022 08:19
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.

3 participants