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

Emitted items should be pub only if the request handler is pub. #93

Closed
SergioBenitez opened this issue Jan 2, 2017 · 5 comments
Closed
Labels
enhancement A minor feature request feedback wanted User feedback is needed
Milestone

Comments

@SergioBenitez
Copy link
Member

No description provided.

@SergioBenitez SergioBenitez added this to the 0.2.0 milestone Jan 2, 2017
@SergioBenitez SergioBenitez added the enhancement A minor feature request label Jan 2, 2017
@SergioBenitez SergioBenitez changed the title Emitted items should be pub only if the request handled is pub. Emitted items should be pub only if the request handler is pub. Jan 2, 2017
@SergioBenitez
Copy link
Member Author

SergioBenitez commented Jan 7, 2017

One concern is that this makes testing more difficult as you'll now need to pub everything. One solution is to automatically pub if the testing feature is enabled. This would result in a seamless testing experience while making the functions public otherwise.

@SergioBenitez
Copy link
Member Author

Let's push this to 0.3 as it's not critical.

@SergioBenitez SergioBenitez modified the milestones: 0.3.0, 0.2.0 Jan 13, 2017
@SergioBenitez
Copy link
Member Author

I struggle to weigh the benefits (private by default) against the cons (usability implications). Any input that might provide justification for or against this change would be beneficial.

@SergioBenitez SergioBenitez modified the milestones: 0.5.0, 0.3.0 Apr 11, 2017
@mehcode
Copy link
Contributor

mehcode commented Apr 12, 2017

I'm neither for or against this change as it doesn't impact me in the slightest. I favor a large (and separate) integration suite so pub/no-pub doesn't really affect my testing.

@SergioBenitez SergioBenitez added the feedback wanted User feedback is needed label Apr 12, 2017
@rbalicki2
Copy link
Contributor

Generally, I see this as a consistency issue: if something is not declared public, it should not secretly become public. Namely, I think you should allow people to export a single function from a file which returns a vector of routes, while keeping those functions private.

As a side note, I feel like this relates to #174, in that it's only an issue if people are breaking things up across multiple files, e.g. in sufficiently large projects.

This seems like an OCD thing, and I don't think it's the end of the world if the functions are re-exported publicly.

@SergioBenitez SergioBenitez modified the milestones: 0.5.0, 0.4.0 Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A minor feature request feedback wanted User feedback is needed
Projects
None yet
Development

No branches or pull requests

3 participants