-
Notifications
You must be signed in to change notification settings - Fork 167
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
CI: Enable the verbose mode in the mkmf.rb. #623
Conversation
915d05f
to
9e9c1be
Compare
9e9c1be
to
65500c4
Compare
Note the compiler warnings are always printed whether the verbose mode is enabled. Here is the CI case of macOS Ruby 2.6 for this PR. Some compiler warnings are printed.
And here is the CI case of macOS Ruby 2.6 for the current master branch. The same compiler warnings are printed. https://github.com/ruby/openssl/actions/runs/5019473754/jobs/9000009197#step:5:88
|
tool/enable-mkmf-verbose
Outdated
sed -i -e 's/^V = .*/V = 1/' "${mkmf_rb_path}" | ||
|
||
# Print the difference between the original and modified file. | ||
diff "${mkmf_rb_path}.orig" "${mkmf_rb_path}" || : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the diff
command is to notice and debug easily when the mkmf.rb
may change in the future.
65500c4
to
3ee4bd9
Compare
Note I aligned the style of the new shell script |
1f5ffec
to
fe6d280
Compare
I changed my mind. I changed the indent from a tab to 2 spaces. Because the tab indent is forbidden in the current coding style in the Ruby project. So, the choice is 2 or 4 spaces indent. And seeing the shell script files in the tool directory in ruby/ruby, the 4 spaces indent is more popular than the 2 spaces indent. https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowTo
Here is the result in the tool directory in the ruby/ruby.
|
Enable the verbose option in mkmf.rb to print the compiling commands in the process of the `rake compile`. Because it's helpful to see what compiler warnings are checked. The script only runs in Linux and macOS. Not Windows. Because the sh script doesn't work in Windows. For the syntax, see the reference.[1] Right now there is a way to configure Ruby with `--enable-mkmf-verbose` in this purpose. But there is no formal way to enable the verbose mode in runtime of Ruby. My intention is that this commit is a workaround for this purpose. [1] https://docs.github.com/en/actions/learn-github-actions/variables * Default environment variables - RUNNER_OS * Detecting the operating system
fe6d280
to
a832f5c
Compare
This PR is to print the compiling commands in the process of the
rake compile
, and enables us to detect the compiler warnings like the issue #620 in a PR process. This is a workaround until a formal way to enable the verbose mode in runtime of Ruby will be implemented. You can see ruby/setup-ruby#505 (comment) for the proposal.Here is the result on my forked repository.
Ubuntu Ruby 3.2
https://github.com/junaruga/openssl/actions/runs/5049251346/jobs/9058658930#step:6:81
macOS Ruby 3.2
https://github.com/junaruga/openssl/actions/runs/5049251346/jobs/9058660439#step:6:85
Enable the verbose option in mkmf.rb to print the compiling commands in the process of the
rake compile
. Because it's helpful to see what compiler warnings are checked.The script only runs in Linux and macOS. Not Windows. Because the sh script doesn't work in Windows. For the syntax, see the reference.[1]
Right now there is a way to configure Ruby with
--enable-mkmf-verbose
in this purpose. But there is no formal way to enable the verbose mode in runtime of Ruby. My intention is that this commit is a workaround for this purpose.[1] https://docs.github.com/en/actions/learn-github-actions/variables