Skip to content

fix: "* initializer is inaccessible due to 'internal' protection level"#7

Open
theedov wants to merge 1 commit intoopenfoodfacts:mainfrom
theedov:internal-fix
Open

fix: "* initializer is inaccessible due to 'internal' protection level"#7
theedov wants to merge 1 commit intoopenfoodfacts:mainfrom
theedov:internal-fix

Conversation

@theedov
Copy link
Copy Markdown

@theedov theedov commented Jul 31, 2024

@theedov theedov changed the title Fix for "* initializer is inaccessible due to 'internal' protection level" Fix: "* initializer is inaccessible due to 'internal' protection level" Jul 31, 2024
@theedov theedov changed the title Fix: "* initializer is inaccessible due to 'internal' protection level" fix: "* initializer is inaccessible due to 'internal' protection level" Jul 31, 2024
@teolemon teolemon requested a review from a team September 26, 2024 10:47
@Harry-KNIGHT
Copy link
Copy Markdown

What are we waiting for merge that bug fix @teolemon

@teolemon
Copy link
Copy Markdown
Member

a review @Harry-KNIGHT :-)
Does this look good to you ?

@teolemon teolemon requested a review from Copilot August 26, 2025 16:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ProductField enum and its cases publicly accessible
  • Exposes ProductResponse properties (barcode, status, product) as public
  • Makes ProductQueryConfiguration initializer 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 {
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

[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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants