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

Incorrect comment in protocol Service, start-service. #12

Closed
kasterma opened this issue Apr 29, 2014 · 1 comment
Closed

Incorrect comment in protocol Service, start-service. #12

kasterma opened this issue Apr 29, 2014 · 1 comment

Comments

@kasterma
Copy link

In line
https://github.com/Datomic/simulant/blob/master/src/simulant/sim.clj#L85
(doto (create-service ...) (start-service))

Since doto is used, the result of (create-service) is returned after (start-service) is called on it. This is not what is documented at
https://github.com/Datomic/simulant/blob/master/src/simulant/sim.clj#L69

where is states that the return value of start-service is assigned to the services map. I prefer the documented version over the implemented one, but clearly this could not be fixed while maintaining backward compatibility. So maybe just update the doc?

mtnygard added a commit that referenced this issue Aug 4, 2014
@mtnygard
Copy link
Contributor

mtnygard commented Aug 4, 2014

Sorry, but I had to make the code match the documentation, rather than the other way around. The reason is that start-service isn't just about side effects. It also has the chance to attach any information needed to finalize the service later. (E.g., system resources, log file names, etc.)

@mtnygard mtnygard closed this as completed Aug 4, 2014
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

2 participants