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

docs: add a developing.md #1752

Merged
merged 8 commits into from
Sep 16, 2019
Merged

docs: add a developing.md #1752

merged 8 commits into from
Sep 16, 2019

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Sep 16, 2019

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've updated the relevant CHANGELOG (here for Horizon) if
    needed with deprecations, added features, breaking changes, and DB schema changes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

Summary

Add a DEVELOPING.md capturing some basic instructions on how to develop in this repository, including instructions on how to use Modules to add, update and remove dependencies.

Goal and scope

To make a clear path for folks to add, update and remove dependencies. While we mostly use the standard Go modules features to manage dependencies they are relatively new in the ecosystem and it is helpful if we anyone adding dependencies knows how to get it right first time without needing to iterate, receive CI or PR feedback, and then do more work.

We also use a non-standard go.list file so that we can see what our actual build/tested dependency versions are in PR diffs, according to go list -m all.

CI will error if any steps haven't been followed for updating dependencies, but as @graydon pointed out when he was our first person doing an upgrade, it's helpful if we can give developers clear instructions so they have the opportunity to get it right and so it's not an unknown they're stepping into.

It's worth addressing that there is some overlap of these instructional files, e.g. README.md, DEVELOPING.md and CONTRIBUTING.md, but each has a different target audience and are relevant at different stages.

  • README.md: Folks learning about our code, importing the Go SDK, installing from source.
  • DEVELOPING.md: Developers wanting to make changes to the code.
  • CONTRIBUTING.md: Developers wanting to contribute changes back to this repo.

For this reason it would be overwhelming to dump all this information into README.md, or to clutter CONTRIBUTING.md with details that are no longer relevant to a developer when they are thinking about opening a PR.

This is a follow up to #1634.

Summary of changes

  • Add DEVELOPING.md
  • Link to it from the README.md

Known limitations & issues

N/A

What shouldn't be reviewed

N/A

Merging

This PR is intended to be merged to master after #1751 which already contains commit cb3300f.

Copy link
Contributor

@ire-and-curses ire-and-curses left a comment

Choose a reason for hiding this comment

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

LGTM! Just a couple of queries.

## Running tests

```
go test ./...
Copy link
Contributor

Choose a reason for hiding this comment

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

What about scripts to run all tests? Or will we update this doc later once those are merged?

Copy link
Member Author

Choose a reason for hiding this comment

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

This command will run all tests. @bartekn recently got rid of the script in 838ae21 because we didn't really need it. I think that's a good move. To a developer familiar with how to run tests in Go this is really just telling them they don't need to know or do anything special to run tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I misunderstood your question. If we add scripts for multiple modules, I can update this then. This doc is capturing what we need/have today.

- [Go 1.12 or Go 1.13](https://golang.org/dl)

To run some tests these tools are also required:
- PostgreSQL 9.6+ server running locally, or set [environment variables](https://www.postgresql.org/docs/9.6/libpq-envars.html) (e.g. `PGHOST`, etc) for alternative host.
Copy link
Contributor

Choose a reason for hiding this comment

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

There's also the development workflow using the new docker-compose stuff. Is that out of scope for this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, that's out-of-scope. In this PR I really wanted to just get the instructions for managing dependencies out there, and it felt odd to have them be the only instructions in this file, so I added some basic filler.

@tamirms maybe you could link to docker-compose instructions from in here once that's ready for promoting, if it isn't already?

@leighmcculloch leighmcculloch merged commit f187453 into stellar:master Sep 16, 2019
@leighmcculloch leighmcculloch deleted the modules-docs-2 branch September 16, 2019 23:27
@leighmcculloch leighmcculloch self-assigned this Sep 16, 2019
@abuiles
Copy link
Contributor

abuiles commented Sep 17, 2019

@leighmcculloch
Copy link
Member Author

@abuiles Good idea! We should probably normalize these all a little, but I can add some links for the moment.

leighmcculloch added a commit that referenced this pull request Sep 17, 2019
Add reference in the `DEVELOPING.md` to the Horizon docs that including more specific developing instructions.

To guide contributors to the right place. #1752 added general developing documentation and @abuiles pointed out in #1752 (comment) post-merge that there is detailed developing documentation for Horizon that we should guide folks to.
@leighmcculloch
Copy link
Member Author

@abuiles Followed up here: #1756.

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.

3 participants