Shopify / Shopify/deprecation_toolkit

Absolute Path vs Relative Path on deprecations

Open
#70 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
538
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hi there!

When recording deprecations as suggested on https://about.gitlab.com/blog/2021/02/03/how-we-automatically-fixed-hundreds-of-ruby-2-7-deprecation-warnings/ we are seeing recordings like:

-  DEPRECATION WARNING: /Users/sobrinho/Developer/my-app/models/concerns/logable.rb:36: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

But when running on CI, we have:

+  DEPRECATION WARNING: /app/app/models/concerns/logable.rb:36: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

Which leads to a DeprecationToolkit::Behaviors::DeprecationMismatch failure.

I'm currently fixing those with a dirty sed:

find spec/deprecation -type f | xargs gsed -i 's/.Users.sobrinho.Developer.my-app./\/app\//g'

Does it worth to have a way of replacing paths/values from deprecations or at least mention how on README?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the README and the recordings under spec/deprecation, then trace how differing absolute paths produce DeprecationMismatch. Clarify whether the expected scope is configurable path/value replacement, documented normalization, or both. Done should include a reproducible test for local-versus-CI paths and clear README guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.