dry-rb / dry-rb/dry-validation

Uninitialized constant Dry::Validation::Messages::Resolver

Open
#742 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Ruby
Stars
1.4k
Forks
195
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

Sometimes `uninitialized constant Dry::Validation::Messages::Resolver` error occurs in production sites. It originates from [this line](https://github.com/dry-rb/dry-validation/blob/0c650b665718d1c534b62a755133ac3c1612db4f/lib/dry/validation/contract.rb#L81)

Restarting the server solves the issue.

## To Reproduce

Not easy to reproduce

## My environment

- Affects my production application: **YES**
- Ruby version: 3.3.5
- OS: Ubuntu 24.04.3
- Dry Validation Version: 1.11.1
- Zeitwerk Version: 2.7.2

Contributor guide

Open the contributing guide

Research direction

Start at lib/dry/validation/contract.rb line 81 and review how the Resolver constant is loaded with Zeitwerk 2.7.2 in the listed Ruby and Ubuntu environment. Investigate the production-only initialization failure and determine what evidence or regression coverage would show that the constant remains available without restarting the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.