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

Follow-up to Availability PR #54

Merged
merged 10 commits into from
Feb 13, 2025

Conversation

christiangnrd
Copy link
Contributor

Switches is_unavailable to is_available as mentioned in #51 (comment).

Also reduces (removes?) places where the code assumes macOS. PlatformAvailabilitys for a different platform are ignored (return true when is_applicable is called, in line with the Clang availability behaviour.

Copy link
Contributor

github-actions bot commented Feb 12, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/syntax.jl b/src/syntax.jl
index bff8593..f77e70a 100644
--- a/src/syntax.jl
+++ b/src/syntax.jl
@@ -311,7 +311,7 @@ macro objcwrapper(ex...)
   end
   immutable = something(immutable, true)
   comparison = something(comparison, !immutable)
-  availability = something(availability, PlatformAvailability[])
+    availability = something(availability, PlatformAvailability[])
 
   # parse class definition
   if Meta.isexpr(def, :(<:))
@@ -352,7 +352,7 @@ macro objcwrapper(ex...)
 
     # add a pseudo constructor to the abstract type that also checks for nil pointers.
     function $name(ptr::id)
-      @static if !ObjectiveC.is_available($availability)
+            @static if !ObjectiveC.is_available($availability)
         throw($UnavailableError(Symbol($name), $availability))
       end
 

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.73%. Comparing base (6911018) to head (35b30a7).
Report is 30 commits behind head on master.

Files with missing lines Patch % Lines
src/syntax.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   71.91%   77.73%   +5.82%     
==========================================
  Files          10       13       +3     
  Lines         769      988     +219     
==========================================
+ Hits          553      768     +215     
- Misses        216      220       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

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

Some bikeshedding.

@maleadt maleadt merged commit 8c78cc7 into JuliaInterop:master Feb 13, 2025
7 checks passed
@christiangnrd christiangnrd deleted the availability2 branch February 13, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants