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

Please consider restoring #regexp (removed in 0.6.2) and/or clarify what your public APIs are #227

Closed
myronmarston opened this issue Jan 16, 2015 · 5 comments

Comments

@myronmarston
Copy link

(Moving this issue from my comment on 5b2c7b4 since I realized it's really an issue and should be discussed here.)

In 5b2c7b4, Aruba::API#regexp was removed, which we relied upon in RSpec in some custom cucumber step definitions. The 0.6.2 aruba release from a couple days ago broke our build:

https://travis-ci.org/rspec/rspec-core/jobs/47020617#L303

We (perhaps wrongly) assumed regexp was a public API since it wasn't labeled @private. Would you consider adding it back and making it a public API? Otherwise we can work around it (which is fine).

Also, can you clarify what your API/versioning policy is? Do you aim to follow the SemVer.org spec? If so, what APIs do you consider public (and therefore subject to the SemVer.org spec)? I'd like to make sure we're limiting what we use to just your public APIs so we don't run into this kind of thing again.

@jarl-dk
Copy link
Member

jarl-dk commented Jan 16, 2015

As I see it Aruba::API#regexp was a small helper method once used and I didn't consider it part of the public API. However I do understand your frustration and irritation. Normally I would go for semantic versioning in any API, but I think I am a bit (maybe too) relaxed about this before version 1.0. I am really sorry. I removed it to make the API more clean; sticking to just one responsibility (an API for testing CLI tools). I should at least have deprecated it first, then removed it later. Again sorry for that.

I will go through the API module to see what is actually part of the API and not only mark it @private but move it out of the API module so it is no longer part of the API.

Looking forward and setting aside that aruba 0.6.2 broke your project (and I am sorry for that) and taking into account that Aruba::API#regexp is/was a general utility function that is not related to CLI tool testing by itself, can you please provide your opinion (thinking seperation of concern) about whether you think that functionality belongs in Aruba API or whether it really belongs in some other more general place or (due to its small size) maybe not in any API at all?

What do you think?

@myronmarston
Copy link
Author

I will go through the API module to see what is actually part of the API and not only mark it @Private but move it out of the API module so it is no longer part of the API.

👍 Thanks -- that'll be very helpful.

Looking forward and setting aside that aruba 0.6.2 broke your project (and I am sorry for that) and taking into account that Aruba::API#regexp is/was a general utility function that is not related to CLI tool testing by itself, can you please provide your opinion (thinking seperation of concern) about whether you think that functionality belongs in Aruba API or whether it really belongs in some other more general place or (due to its small size) maybe not in any API at all?

I agree with you that it's not something that really belongs as a public API. (I didn't think about that at the time I added steps that use it, unfortunately). I'm completely fine with working around it in RSpec. I think it's more of a question of "are other users affected by this"? If you think other users are affected, you could add it back with a deprecation warning and release 0.6.3, with the plan to remove it in 1.0.

Up to you either way -- I'm going to go update our step definitions to not depend on it anymore.

myronmarston added a commit to rspec/rspec-core that referenced this issue Jan 16, 2015
myronmarston added a commit to rspec/rspec-core that referenced this issue Jan 16, 2015
@ghost
Copy link

ghost commented Jan 16, 2015

I didn't find the commit anymore, but I think the guys over at middleman work around it as well.

@jarl-dk
What about introducing a a Aruba::Utility-module which makes methods available via module_method? But what methods are you going to move? The "real" private ones as well?

@ghost
Copy link

ghost commented Apr 8, 2015

See #231 @jarl-dk Should we close this in favour of #231?

myronmarston added a commit to rspec/rspec-core that referenced this issue Jun 11, 2015
myronmarston added a commit to rspec/rspec-expectations that referenced this issue Jun 11, 2015
myronmarston added a commit to rspec/rspec-mocks that referenced this issue Jun 11, 2015
yousuketto pushed a commit to yousuketto/rspec-mocks that referenced this issue Jun 12, 2015
@maxmeyer
Copy link
Member

maxmeyer commented May 7, 2016

That method won't come back. So I'm going to close this for now as you pinned to a version working for you.

BTW: I'll try to make it more clear which methods are "safe" to use (part of the public API) which should be fully documented by tests with the release of 1.0.0.

@maxmeyer maxmeyer closed this as completed May 7, 2016
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this issue Oct 30, 2020
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this issue Oct 6, 2021
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this issue Oct 6, 2021
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this issue Oct 6, 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

No branches or pull requests

3 participants