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

dsl: allow to specify a default value in $ and & operators #3984

Conversation

masatake
Copy link
Member

$ and & return #f if a specified field is not found in a tag. With this change, you can make the operators return a value other than #f in the situation.

You can write

($ field default-value)

as a shorthand of

(or ($ field) default-value)

.

@masatake
Copy link
Member Author

Reporting the coverage to coverall failed.
Does anyone know the way to fix it?

@leleliu008
Copy link
Member

codecov-cli report following:

{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

That's to say codecov invoke the Github Actions API, but Github Actions API has the rate limitation. To remove the rate limitation, you should configure a Codecov upload token.

how to get a Codecov upload token:

https://github.com/codecov/codecov-cli?tab=readme-ov-file#how-to-get-an-upload-token

Another solution is to use old version of codecov/codecov-action, but I am not try it:

codecov/codecov-action#598 (comment)

@leleliu008
Copy link
Member

I found CODECOV_TOKEN environment variable already has been configured, is it expired?

@masatake
Copy link
Member Author

masatake commented Apr 18, 2024

I found CODECOV_TOKEN environment variable already has been configured, is it expired?

I updated it a few days ago. (in my recognition)

@k-takata
Copy link
Member

k-takata commented Apr 18, 2024

CODECOV_TOKEN was updated 3 days ago. (Unintentionally?)
I've updated it again. Let's see if it works.

Currently we are using the codecov CLI directly. Is it better to using codecov/codecov-action?

@k-takata
Copy link
Member

Hmm, still failing.

@k-takata
Copy link
Member

https://github.com/universal-ctags/ctags/actions/runs/8680720408/job/23960447081#step:18:22

env:
  CC: gcc
  BUILDDIR: ubuntu-20.04-gcc
  SANDBOX_CASES: sandbox,sandbox-crash,sandbox-default-req,sandbox-unknown-submode
  DEBIAN_FRONTEND: noninteractive
  CODECOV_TOKEN: 

I think it is strange that CODECOV_TOKEN is shown as empty.
In my understanding, it is normally shown masked: CODECOV_TOKEN: ***.

@leleliu008
Copy link
Member

@k-takata
Copy link
Member

In my understanding, it will be always shown empty for security reasons when you updating the secrets.

@leleliu008
Copy link
Member

That's true.

@k-takata
Copy link
Member

It looks fine with codecov/codecov-actions: #3986
https://github.com/universal-ctags/ctags/actions/runs/8733393588/job/23961993899

$ and & return #f if a specified field is not found in a tag.
With this change, you can make the operators return a value
other than #f in the situation.

You can write

	($ field default-value)

as a shorthand of

	(or ($ field) default-value)
.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake force-pushed the readtags--default-value-for-field-accessor branch from 882226e to 19bc9ad Compare April 18, 2024 16:26
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.40%. Comparing base (7be24dc) to head (19bc9ad).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3984      +/-   ##
==========================================
+ Coverage   85.39%   85.40%   +0.01%     
==========================================
  Files         235      235              
  Lines       56628    56636       +8     
==========================================
+ Hits        48358    48371      +13     
+ Misses       8270     8265       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@masatake
Copy link
Member Author

The coverall comes back! Thank you.

@masatake masatake merged commit 7821641 into universal-ctags:master Apr 18, 2024
49 checks passed
@masatake
Copy link
Member Author

@AmaiKinono I expect the feature I added to readtags via this pull request can simplify readtags filter expressions in citre. You can expect this feature to be available if the version of readtags is greater or equal to 6.2.0.

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

Successfully merging this pull request may close these issues.

3 participants