Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning for check_yarn_integrity seems not to happen? #2714

Closed
jaredbeck opened this issue Aug 28, 2020 · 4 comments
Closed

Deprecation warning for check_yarn_integrity seems not to happen? #2714

jaredbeck opened this issue Aug 28, 2020 · 4 comments

Comments

@jaredbeck
Copy link
Contributor

@rossta Hi Ross 馃憢 In #2518, you added this deprecation warning:

# webpacker/configuration.rb
  def check_yarn_integrity=(value)
    warn "Webpacker::Configuration#check_yarn_integrity=(value) has been deprecated. The integrity check has been removed from Webpacker so changing this setting will have no effect."
  end

But I don't see it in my log.

bin/rails server
=> Booting Puma
...
Processing by MainController#index as HTML
...
[Webpacker] Everything's up-to-date. Nothing to do

My configuration:

# config/environments/development.rb
Rails.application.configure do
...
  config.webpacker.check_yarn_integrity = true

Maybe config.webpacker.check_yarn_integrity is an old API, so old that it wasn't working anyway? I'm trying to trace the call to check_yarn_integrity= using my debugger, but I'm unsure how the config gets from railties to webpacker.

Is this worth spending time on? I just want other people to see this warning.

@jaredbeck
Copy link
Contributor Author

jaredbeck commented Aug 28, 2020

Additionally, the warn message says "has been deprecated" but I think "has been removed" would be more accurate.

Update: #2715

@rossta
Copy link
Member

rossta commented Aug 29, 2020

Ah, this would have to be a call to the Webpacker logger instead of Kernel#warn.

@jaredbeck
Copy link
Contributor Author

Ah, this would have to be a call to the Webpacker logger instead of Kernel#warn.

Taking that approach, I started to write a test for this.

# test/configuration_test.rb
  def test_check_yarn_integrity_is_obsolete
    assert_output(nil, /is obsolete/) {
      @config.check_yarn_integrity = true
    }
  end

I expected it to fail, but it passed. So, minitest thinks we are writing to stderr ..

@justin808
Copy link
Contributor

fixed by removing this

def check_yarn_integrity=(value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants