Bruce Perens

Results 20 issues of Bruce Perens

https://github.com/luckyframework/avram/blob/02496a12c817e2fdfcf6d55834e1380afabe6e2d/src/avram/save_operation.cr#L324 This renders as: ``` Unhandled exception: Could not perform RegisterUser. ▸ save_user_options: failed (Avram::InvalidOperationError) from lib/avram/src/avram/save_operation.cr:322:7 in 'save!' from lib/shield/src/presets/user.cr:23:1 in 'create!' from tasks/db/seed/required_data.cr:35:5 in 'call' ``` The problem...

This error message is less than helpful. The real error is "that class should be abstract". ``` crystal spec Showing last frame. Use --error-trace for full trace. There was a...

improve error experience

My recurrent pattern is that my `DeleteOperations` look like this: ```crystal class DeleteCompany < Avram::DeleteOperation(Company) before_delete :do_before_delete def do_before_delete delete_dependent(record.page!, record.posts!) end end ``` ...where `page` is a `has_one` relationship...

The class doc for `Avram::DeleteOperation` doesn't document its constructors. It should give: ``` #new(record : T, params : Avram::Paramable) #new(record : T) ```

I gave a preload an incorrect query, in an ill-considered attempt to optimize: ```crystal preload_locations(LocationQuery.new.preload_url_path(URLPathQuery.new.limit(1)) ``` The `limit(1)` is incorrect, `preload_locations` will retrieve more than one object. The result was...

The error experience when attempting to create an operation with an incorrect argument type is close to opaque. Even though I've been through this many times, I find it difficult...

This is how a `has_one` association in my application is preloaded: ``` ▸ Model URLPath. Query SELECT FROM url_paths WHERE url_paths.manufacturer_id = ANY ($1). Args [["1"]]. Duration 1.93ms ``` Note...

It is an extremely common pattern to have hierarchical associations of this form: ```crystal belongs_to page : Page? has_many pages : Page ``` The main query in my application has...

https://github.com/taylorfinnell/awscr-s3/blob/36c0f3bd03bbf3bc577da4b9eae3fccc0d61e3c3/src/awscr-s3/xml.cr#L48 aborts in not_nil! if the response is not well-formed XML. ``` Unhandled exception: Nil assertion failed (NilAssertionError) from /usr/share/crystal/src/nil.cr:108:5 in 'not_nil!' from lib/awscr-s3/src/awscr-s3/xml.cr:48:9 in 'namespaces' from lib/awscr-s3/src/awscr-s3/xml.cr:39:12 in 'namespace'...

Upon returning to this platform after a time, I hit all of the problems I hit the first time. These should be in a "Tips" guide. What "needs" does to...