fix: "* initializer is inaccessible due to 'internal' protection level"#7
fix: "* initializer is inaccessible due to 'internal' protection level"#7theedov wants to merge 1 commit intoopenfoodfacts:mainfrom
Conversation
|
What are we waiting for merge that bug fix @teolemon |
|
a review @Harry-KNIGHT :-) |
There was a problem hiding this comment.
Pull Request Overview
This PR addresses accessibility issues in the OpenFoodFacts Swift library by making internal types and members public to resolve "initializer is inaccessible due to 'internal' protection level" compilation errors.
- Makes
ProductFieldenum and its cases publicly accessible - Exposes
ProductResponseproperties (barcode,status,product) as public - Makes
ProductQueryConfigurationinitializer public
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Sources/Model/OFF/ProductField.swift | Changes ProductField enum from internal to public access level |
| Sources/Model/OFF/ProductResponse.swift | Makes barcode, status, and product properties public |
| Sources/Model/OFF/ProductConfiguration.swift | Makes the ProductQueryConfiguration initializer public |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import Foundation | ||
|
|
||
| enum ProductField: String { | ||
| public enum ProductField: String { |
There was a problem hiding this comment.
[nitpick] Making the entire ProductField enum public exposes all its cases to consumers. Consider whether all cases should be public or if only specific cases need to be accessible externally.
What