Skip to content

Commit effa1bf

Browse files
committed
Update Contributing Guidelines
This should assist some users on their way to submitting an issue or shortly thereafter. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent 3a0435e commit effa1bf

File tree

2 files changed

+127
-4
lines changed

2 files changed

+127
-4
lines changed

CONTRIBUTING.md

Lines changed: 124 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,130 @@
11
# Contributing
22

3-
- Need **help** or have a **general question**? [Ask on Stack
4-
Overflow][] (tag `sqlite.swift`).
5-
- Found a **bug** or have a **feature request**? [Open an issue][].
6-
- Want to **contribute**? [Submit a pull request][].
3+
The where and when to open an [issue](#issues) or [pull
4+
request](#pull-requests).
5+
6+
7+
## Issues
8+
9+
Issues are used to track **bugs** and **feature requests**. Need **help** or
10+
have a **general question**? [Ask on Stack Overflow][] (tag `sqlite.swift`).
11+
12+
Before reporting a bug or requesting a feature, [run a few searches][Search] to
13+
see if a similar issue has already been opened and ensure you’re not submitting
14+
a duplicate.
15+
16+
If you find a similar issue, read the existing conversation and see if it
17+
addresses everything. If it doesn’t, continue the conversation there.
18+
19+
If your searches return empty, see the [bug](#bugs) or [feature
20+
request](#feature-requests) guidelines below.
721

822
[Ask on Stack Overflow]: http://stackoverflow.com/questions/tagged/sqlite.swift
23+
[Search]: https://github.com/stephencelis/SQLite.swift/search?type=Issues
24+
25+
26+
### Bugs
27+
28+
Think you’ve discovered a new **bug**? Let’s try troubleshooting a few things
29+
first.
30+
31+
- **Is it an installation issue?** <a name='bugs-1'/>
32+
33+
If this is your first time building SQLite.swift in your project, you may
34+
encounter a build error, _e.g._:
35+
36+
No such module 'SQLite'
37+
38+
Please carefully re-read the [installation instructions][] to make sure
39+
everything is in order.
40+
41+
- **Have you read the documentation?** <a name='bugs-2'/>
42+
43+
If you can’t seem to get something working, check
44+
[the documentation][See Documentation] to see if the solution is there.
45+
46+
- **Are you up-to-date?** <a name='bugs-3'/>
47+
48+
If you’re perusing [the documentation][See Documentation] online and find
49+
that an example is just not working, please upgrade to the latest version
50+
of SQLite.swift and try again before continuing.
51+
52+
- **Is it an unhelpful build error?** <a name='bugs-4'/>
53+
54+
While Swift error messaging is improving with each release, complex
55+
expressions still lend themselves to misleading errors. If you encounter an
56+
error on a complex line, breaking it down into smaller pieces generally
57+
yields a more understandable error. _E.g._:
58+
59+
``` swift
60+
users.insert(email <- "alice@mac.com" <- managerId <- db.lastInsertRowid)
61+
// Cannot invoke 'insert' with an argument list of type '(Setter, Setter)'
62+
```
63+
64+
Not very helpful! If we break the expression down into smaller parts,
65+
however, the real error materializes on the appropriate line.
66+
67+
``` swift
68+
let emailSetter = email <- "alice@mac.com"
69+
let managerIdSetter = managerId <- db.lastInsertRowId
70+
// Binary operator '<-' cannot be applied to operands of type 'Expression<Int>' and 'Int64'
71+
users.insert(emailSetter, managerIdSetter)
72+
```
73+
74+
The problem turns out to be a simple type mismatch. The fix is elsewhere:
75+
76+
``` diff
77+
-let managerId = Expression<Int>("manager_id")
78+
+let managerId = Expression<Int64>("manager_id")
79+
```
80+
81+
- **Is it an _even more_ unhelpful build error?** <a name='bugs-5'/>
82+
83+
Have you updated Xcode recently? Did your project stop building out of the
84+
blue?
85+
86+
Hold down the **option** key and select **Clean Build Folder…** from the
87+
**Product** menu (⌥⇧⌘K).
88+
89+
Made it through everything above and still having trouble? Sorry!
90+
[Open an issue][]! And _please_:
91+
92+
- Be as descriptive as possible.
93+
- Provide as much information needed to _reliably reproduce_ the issue.
94+
- Attach screenshots if possible.
95+
- Better yet: attach GIFs or link to video.
96+
- Even better: link to a sample project exhibiting the issue.
97+
- Include the SQLite.swift commit or branch experiencing the issue.
98+
- Include devices and operating systems affected.
99+
- Include build information: the Xcode and OS X versions affected.
100+
101+
[installation instructions]: Documentation/Index.md#installation
102+
[See Documentation]: Documentation/Index.md#sqliteswift-documentation
9103
[Open an issue]: https://github.com/stephencelis/SQLite.swift/issues/new
104+
105+
106+
### Feature Requests
107+
108+
Have an innovative **feature request**? [Open an issue][]! Be thorough! Provide
109+
context and examples. Be open to discussion.
110+
111+
112+
## Pull Requests
113+
114+
Interested in contributing but don’t know where to start? Try the [`help
115+
wanted`][help wanted] label.
116+
117+
Ready to submit a fix or a feature? [Submit a pull request][]! And _please_:
118+
119+
- If code changes, run the tests and make sure everything still works.
120+
- Write new tests for new functionality.
121+
- Update documentation comments where applicable.
122+
- Maintain the existing style.
123+
- Don’t forget to have fun.
124+
125+
While we cannot guarantee a merge to every pull request, we do read each one
126+
and love your input.
127+
128+
129+
[help wanted]: https://github.com/stephencelis/SQLite.swift/labels/help%20wanted
10130
[Submit a pull request]: https://github.com/stephencelis/SQLite.swift/fork

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,14 @@ To install SQLite.swift with [SQLCipher][] support:
162162

163163
## Communication
164164

165+
[Read the contributing guidelines][]. The _TL;DR_ (but please; _R_):
166+
165167
- Need **help** or have a **general question**? [Ask on Stack
166168
Overflow][] (tag `sqlite.swift`).
167169
- Found a **bug** or have a **feature request**? [Open an issue][].
168170
- Want to **contribute**? [Submit a pull request][].
169171

172+
[Read the contributing guidelines]: ./CONTRIBUTING.md#contributing
170173
[Ask on Stack Overflow]: http://stackoverflow.com/questions/tagged/sqlite.swift
171174
[Open an issue]: https://github.com/stephencelis/SQLite.swift/issues/new
172175
[Submit a pull request]: https://github.com/stephencelis/SQLite.swift/fork

0 commit comments

Comments
 (0)