luckyframework / luckyframework/avram
Raise helpful error if trying to set URL on Avram instead of your database
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
If you do:
```crystal
Avram.configure do |settings|
settings.url = # ...
end
```
It will throw an error at compile time because that setting doesn't exist. You need to set it on a database class.
This rarely happens since Lucky sets it up for you, but if/when you need to use Avram by itself this can be confusing when setting things up.
Should have an error like:
> You can't set the database URL on Avram. Instead set it on a database class
And include how to create a database class
Contributor guide
Research direction
Reproduce the Avram.configure example with settings.url and inspect the configuration and database-class entry points involved in the compile-time error. Done means setting the URL on Avram produces the requested helpful message, including how to create a database class, while database-class configuration remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100