uber / uber/mockolo

@available attribute on function mocked incorrectly

Open
#211 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
886
Forks
102
Avg merge
6h 36m
Merged PRs (30d)
2

Description

when a protocol is marked with a @available(*, deprecated... on a function, mockolo specifies the entire type as @available(*, deprecated, ... instead of just the function

Screenshot 2023-01-26 at 11 20 47 AM

is that expected behavior and desirable at Uber? or simply an oversight

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the protocol case described in the issue, with a deprecated @available attribute on one function, and inspect the mockolo-generated output. Compare the generated availability annotation on the type with the annotation on the function; done means the behavior is clarified and the generated mock applies the attribute at the intended scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.