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

Fix objc generation for Bytes property and for hash methods with switch statements #222

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

YufeiG
Copy link
Contributor

@YufeiG YufeiG commented Mar 11, 2021

Checklist

General Contributing

  • Dropboxer

Is This a Code Change?

  • Non-code related change (markdown/git settings etc)
  • Code Change
  • Example/Test Code Change

Validation

  • Have you ran tox?
  • Do the tests pass?

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #222 (bfe724e) into main (b4ef39a) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   51.72%   51.72%   -0.01%     
==========================================
  Files          37       37              
  Lines        8369     8370       +1     
  Branches     1786     1786              
==========================================
  Hits         4329     4329              
- Misses       3726     3727       +1     
  Partials      314      314              
Flag Coverage Δ
unit 51.72% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stone/backends/obj_c_helpers.py 0.00% <ø> (ø)
stone/backends/obj_c_types.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4ef39a...a041153. Read the comment docs.

Copy link
Contributor

@rogebrd rogebrd left a comment

Choose a reason for hiding this comment

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

Few questions since I am not super familiar with the Obj C Language.

  • Would this be a breaking change?
  • Do we have tests that show what the generated outcome should be? If so can we update those?

@YufeiG
Copy link
Contributor Author

YufeiG commented Mar 12, 2021

  • These are 2 bug fixes. The current behavior is wrong. Objective-C switch statements require 'break;' between cases or they are fall through by default. And for bytes, currently the code generated cannot compile, but because we don't have routes with bytes type this hasn't been an issue. Every time we've added such a property and the objc generator fails, we've changed the route property to string. With this change, bytes should generate now as a string.
  • There doesn't seem to be any objc or swift stone generator tests. I can look at adding a suite of tests for these languages later. This diff specifically should go in asap because the fall through switch is causing crashes in our app.

@rogebrd rogebrd merged commit 0167584 into dropbox:main Mar 12, 2021
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