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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop haml_lint to avoid deprecated haml constant #18886

Merged

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Jun 18, 2019

Followup to #18868

This a development dependency that can be added individually for anyone
who needs it.

The problem is hamlit tries to require haml in the template here
and because we have haml in our dependency tree due to haml_lint (for dev), it will be able to require it.
Because this causes the rails 5.1 deprecated constant to be loaded, we get this deprecation warning:

DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is
deprecated and will be removed from Rails 5.2. Switch to
ActionView::Template::Handlers::ERB::Erubi instead. (called from <top
(required)> at
/Users/joerafaniello/Code/manageiq/config/application.rb:31)

Since haml_lint doesn't have a version that forces haml >= 5.0 (where this is fixed), we have to either:

  • add haml it as a direct dependency so we can say >= 5.0 (like this PR)
  • drop haml_lint entirely (so haml doesn't get in the dependency tree)
  • ignore/live with this warning whenever you run tests or rails server/console/etc.

This commit takes option 2, drop haml_lint since it's a dev dependency
that can easily be added in bundler.d directory for any developers who want it.

Followup to ManageIQ#18868

This a development dependency that can be added individually for anyone
who needs it.

The problem is `hamlit` tries to require `haml` in the template
[here](https://github.com/k0kubun/hamlit/blob/94b14839cd42e8b70715ba7c0caf18c2c47ec67a/lib/hamlit/template.rb#L8)
and because we have `haml` in our dependency tree due to `haml_lint` (for dev), it will be able to require it.
Because this causes the rails 5.1 deprecated constant to be loaded, we get this deprecation warning:

```
DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is
deprecated and will be removed from Rails 5.2. Switch to
ActionView::Template::Handlers::ERB::Erubi instead. (called from <top
(required)> at
/Users/joerafaniello/Code/manageiq/config/application.rb:31)
```

Since haml_lint doesn't have a version that forces haml >= 5.0 (where this is fixed), we have to either:
* add haml it as a direct dependency so we can say >= 5.0 (like this PR)
* drop haml_lint entirely (so haml doesn't get in the dependency tree)
* ignore/live with this warning whenever you run tests or rails server/console/etc.

This commit takes option 2, drop haml_lint since it's a dev dependency
that can easily be added in bundler.d directory for any developers who want it.
@miq-bot
Copy link
Member

miq-bot commented Jun 18, 2019

Checked commit jrafanie@c2150da with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Seal of Approval

Copy link
Contributor

@himdel himdel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bdunne bdunne merged commit 9f6af33 into ManageIQ:master Jun 18, 2019
@bdunne bdunne added this to the Sprint 114 Ending Jun 24, 2019 milestone Jun 18, 2019
@bdunne bdunne self-assigned this Jun 18, 2019
@jrafanie jrafanie deleted the drop_haml_lint_to_avoid_haml_erubis_warning branch October 4, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants