Open
Conversation
…CheckValidity and code cleanup
…tegrate profileutil changes
# Conflicts: # autocodesign/localcodesignasset/profilelookup.go # autocodesign/profiles.go
# Conflicts: # autocodesign/profiledownloader/profiledownloader.go # autocodesign/profiles.go # go.mod # go.sum # mocks/PathModifier.go # mocks/PathProvider.go
lpusok
reviewed
Feb 16, 2026
|
|
||
| // PrintableProfile ... | ||
| func (printer ProfilePrinter) PrintableProfile(profile ProvisioningProfileInfoModel, installedCertificates ...certificateutil.CertificateInfoModel) string { | ||
| printable := map[string]interface{}{} |
Contributor
There was a problem hiding this comment.
Suggested change
| printable := map[string]interface{}{} | |
| printable := map[string]any{} |
Since golang 1.18 we can use any.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
profileutil V1→V2 Migration Summary
V1→V2 Structural Transformation
Core Types: No Changes
The primary data structures remain identical between v1 and v2:
ProvisioningProfileInfoModel
PlistData
ProfileType Constants
Key Architectural Changes
The migration introduces struct-based APIs replacing v1's function-based approach, following go-utils v2 patterns for better testability and dependency injection.
V1→V2 Function Migration
1. Profile Reading Functions → ProfileReader Struct
V1: Package-level functions
V2: ProfileReader struct with injected dependencies
Changes:
NewProvisioningProfileInfoFromFile()→ProfileReader.ProvisioningProfileInfoFromFile()InstalledProvisioningProfileInfos()→ProfileReader.InstalledProvisioningProfileInfos()FindProvisioningProfileInfo()- Removed (unused by consumers)ProvisioningProfileFromFile()→ privateprovisioningProfileFromFile()InstalledProvisioningProfiles()→ privateinstalledProvisioningProfiles()FindProvisioningProfile()- Removed (unused)2. Profile Printing Functions → ProfilePrinter Struct
V1: Method on ProvisioningProfileInfoModel
V2: ProfilePrinter struct
Changes:
info.String(certs...)→printer.PrintableProfile(info, certs...)TimeProviderdependency for testable time-based validationlogpackage3. Model Constructor Functions
V1 and V2: Similar but with key differences
Changes:
PlistData.GetProfileType()howett.net/plist→github.com/bitrise-io/go-plistV2 Addition:
4. Model Validation Methods
V1: Uses global time.Now()
V2: Time provider pattern for testability
Changes:
currentTime func() time.TimeparameterDefaultTimeProvider().Nowin production codeUnchanged Model Methods:
5. PlistData Methods
V1 and V2: Core methods unchanged
These PlistData methods remain identical between v1 and v2:
V2 Additions: Extracted from NewProvisioningProfileInfo constructor
Two new methods were added by extracting logic that was previously inline in the v1 constructor:
Benefits:
V1 Function Removed:
Functionality replaced by
ProfileReader.ProvisioningProfileInfoFromFile()6. Utility Functions
V1 and V2: Unchanged
7. Time Provider (V2 Addition)
New in V2:
Used for testable time-dependent operations (e.g.,
CheckValidity).V1↔V2 Adapter
For gradual migration, v1_adapter.go provides bidirectional conversion:
Ensures deep copies and allows mixed v1/v2 usage during transition.