ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "mame (Yusuke Endoh)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:110116] [Ruby master Feature#19008] Introduce coverage support for `eval`.
Date: Wed, 28 Sep 2022 07:40:46 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-99373.20220928074045.3344@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-19008.20220917095604.3344@ruby-lang.org

Issue #19008 has been updated by mame (Yusuke Endoh).


@znz told me that this change broke our continuous coverage measurement.

https://github.com/ruby/actions/actions/runs/3104935882/jobs/5029973324#step:11:10

```
Error: Artifact path is not valid: /ruby/tmp/test_rubygems_20220922-21188-1ddkra/gemhome/specifications/a#{raise %<improper escaping>}-2.gemspec.func-sort-c.html. Contains the following character:  Less than <

Invalid characters include:  Double quote ", Colon :, Less than <, Greater than >, Vertical bar |, Asterisk *, Question mark ?, Carriage return \r, Line feed \n
          
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
```

Here is my analysis:

1. Some tests of rubygems uses `Kernel#eval` with a filename `a#{raise %<improper escaping>}-2.gemspec`
2. coverage.so records the filename and lcov creates a file named `a#{raise %<improper escaping>}-2.gemspec.func-sort-c.html`
3. It fails to upload the file to GitHub Actions' artifact

I would like to temporarily revert the commit to restore the coverage measurement.

I am now convinced that it is necessary to disable this feature by default. @ioquatix Could you create a patch of `Coverage.start(eval: false)`?

----------------------------------------
Feature #19008: Introduce coverage support for `eval`.
https://bugs.ruby-lang.org/issues/19008#change-99373

* Author: ioquatix (Samuel Williams)
* Status: Open
* Priority: Normal
----------------------------------------
I'd like to introduce coverage support for `eval`. I mostly only care about the case where an explicit path is given, and I'd even be okay to only handle the case where the line number is the default (0).

https://github.com/ruby/ruby/pull/6396

This is an incredibly useful feature for computing coverage of ERB templates and other similar things.



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2022-09-28  7:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17  9:56 [ruby-core:109937] [Ruby master Feature#19008] Introduce coverage support for `eval` ioquatix (Samuel Williams)
2022-09-17 10:15 ` [ruby-core:109938] " mame (Yusuke Endoh)
2022-09-17 20:40 ` [ruby-core:109940] " jeremyevans0 (Jeremy Evans)
2022-09-17 21:35 ` [ruby-core:109941] " ioquatix (Samuel Williams)
2022-09-18  0:01 ` [ruby-core:109942] " ioquatix (Samuel Williams)
2022-09-22 20:46 ` [ruby-core:110000] " mame (Yusuke Endoh)
2022-09-22 20:53 ` [ruby-core:110001] " mame (Yusuke Endoh)
2022-09-22 21:13 ` [ruby-core:110004] " jeremyevans0 (Jeremy Evans)
2022-09-22 21:25 ` [ruby-core:110005] " ioquatix (Samuel Williams)
2022-09-22 21:50 ` [ruby-core:110006] " jeremyevans0 (Jeremy Evans)
2022-09-22 22:22 ` [ruby-core:110007] " mame (Yusuke Endoh)
2022-09-22 22:26 ` [ruby-core:110008] " mame (Yusuke Endoh)
2022-09-22 22:44 ` [ruby-core:110011] " jeremyevans0 (Jeremy Evans)
2022-09-23  2:05 ` [ruby-core:110024] " ioquatix (Samuel Williams)
2022-09-23  2:07 ` [ruby-core:110025] " ioquatix (Samuel Williams)
2022-09-23  2:53 ` [ruby-core:110027] " ioquatix (Samuel Williams)
2022-09-23  7:34 ` [ruby-core:110035] " mame (Yusuke Endoh)
2022-09-23 15:24 ` [ruby-core:110048] " jeremyevans0 (Jeremy Evans)
2022-09-23 22:58 ` [ruby-core:110052] " ioquatix (Samuel Williams)
2022-09-28  7:40 ` mame (Yusuke Endoh) [this message]
2022-09-28  7:53 ` [ruby-core:110117] " mame (Yusuke Endoh)
2022-09-28 10:51 ` [ruby-core:110118] " ioquatix (Samuel Williams)
2022-09-28 20:47 ` [ruby-core:110142] " ioquatix (Samuel Williams)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-99373.20220928074045.3344@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).