Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

add a debug mode env that plugin failure will abort model generation #393

Merged

Conversation

hdoan741
Copy link
Contributor

No description provided.

@hdoan741 hdoan741 changed the base branch from master to 2935b3f5a93de4caecd3873b09c009e75700b134 January 14, 2021 23:31
hdoan741 pushed a commit that referenced this pull request Jan 14, 2021
Pull Request Branch: manhhung741/add_a_debug_mode_env_that_plugin_failure
Pull Request Link: #393
@hdoan741 hdoan741 force-pushed the manhhung741/add_a_debug_mode_env_that_plugin_failure branch from e9f1cf6 to b11a41c Compare January 14, 2021 23:31
@codecov
Copy link

codecov bot commented Jan 14, 2021

Codecov Report

Merging #393 (7a14af7) into master (2ccc48d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #393   +/-   ##
=======================================
  Coverage   97.24%   97.24%           
=======================================
  Files         138      138           
  Lines        3264     3265    +1     
=======================================
+ Hits         3174     3175    +1     
  Misses         90       90           
Impacted Files Coverage Δ
lib/sorbet-rails/model_rbi_formatter.rb 90.32% <100.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ccc48d...7a14af7. Read the comment docs.

Pull Request Branch: manhhung741/add_a_debug_mode_env_that_plugin_failure
Pull Request Link: #393
@hdoan741 hdoan741 changed the base branch from 2935b3f5a93de4caecd3873b09c009e75700b134 to master January 14, 2021 23:35
@hdoan741 hdoan741 force-pushed the manhhung741/add_a_debug_mode_env_that_plugin_failure branch from b11a41c to 7a14af7 Compare January 14, 2021 23:35
@hdoan741 hdoan741 merged commit 2ced821 into master Jan 14, 2021
).
void
}
def run_plugins(plugins, generator, allow_failure: true)
def run_plugins(plugins, generator)
allow_failure = ENV["SBR_DEBUG_MODE"] == "true"
Copy link

Choose a reason for hiding this comment

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

👋 Unsolicited and post merge feedback, but I think this might be backwards. I think you probably want to allow failures if the ENV VAR is NOT set to true

I think as is this will change the default (no env var) case from allowing failure to NOT allowing failure

I came across this while trying to debug some generation I had, slightly unfortunately in the version with debug mode I no longer get the error so I can't confirm my suspicion that this might be backwards!

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

Successfully merging this pull request may close these issues.

2 participants