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

Switch from schema to clojure.spec #106

Merged
merged 2 commits into from
Sep 5, 2019
Merged

Conversation

anthonygalea
Copy link
Contributor

This is a first stab at migrating to clojure.spec. I wouldn't call it ready to be merged but thought it would be a good idea to get feedback early.

@devth
Copy link
Member

devth commented Aug 27, 2019

Whoa, this is awesome! I'll review in detail when I get a chance - hopefully later today. But at first glance looks like the right approach.

@devth
Copy link
Member

devth commented Aug 30, 2019

@anthonygalea looks good so far! I noticed you renamed yetibot.core.adapters.init to yetibot.core.adapters. I'm fine w/ it but what's the intention? Thanks!

@anthonygalea
Copy link
Contributor Author

This is (I think) a minor improvement in naming with the aim of making things more readable. ::config being a namespaced keyword is :adapters/config instead of :adapters-init/config. This is both shorter and in line with all the other "configs" ex: :logging/config. We don't have :logging-init/config even though it is also used for initialization. In addition here we could have adapters/config instead of ai/adapters-config.

I typically like to work such changes piecemeal into commits as I encounter them. Having said that if such changes bug you let me know and I'll refrain from doing them.

@anthonygalea anthonygalea force-pushed the clojure.spec branch 2 times, most recently from 216de00 to 437c65f Compare September 2, 2019 15:07
@anthonygalea
Copy link
Contributor Author

Reviewed pull request, made additional changes and rebased on latest master. Also reviewed corresponding pull request in yetibot.

@devth
Copy link
Member

devth commented Sep 3, 2019

Thanks for the explanation! I agree - :adapters/config is much nicer. And I'm fine with changes like this - just wanted to understand the intent.

I'm trying to figure out why the build is failing. It looks like the db schemas are empty at https://travis-ci.com/yetibot/yetibot.core/jobs/230115009#L250, so the database isn't being properly setup for test cases, which causes subsequent failures.

@anthonygalea
Copy link
Contributor Author

Fixed, it was a bug in the spec for :schema/spec.

Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

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

Looks great overall - left a couple comments. Also wondering if we should use spec-alpha2 or wait to upgrade.

Differences are documented here but it's supposed to be mostly compatible. I need to read up more on the differences and what it'd look like. Can save it for a future PR if you want.

src/yetibot/core/logging.clj Outdated Show resolved Hide resolved
src/yetibot/core/util/config.clj Outdated Show resolved Hide resolved
@anthonygalea
Copy link
Contributor Author

Thanks a lot for your feedback @devth!
Just addressed the comments.

Regarding spec2, thanks a lot for the link explaining the differences. I would prefer to tackle this in a future pull request if it's ok with you.

@devth
Copy link
Member

devth commented Sep 5, 2019

Regarding spec2, thanks a lot for the link explaining the differences. I would prefer to tackle this in a future pull request if it's ok with you.

Yep, sounds good!

@devth devth self-requested a review September 5, 2019 17:38
Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

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

Tested locally and everything looks good! @anthonygalea is this good to merge?

@anthonygalea
Copy link
Contributor Author

Great @devth. Yep good to merge.

@devth devth merged commit fe16ae2 into yetibot:master Sep 5, 2019
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