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

Resolve a bunch of issues reported by JET #950

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

fingolfin
Copy link
Member

Specifically I used

using JET, GAP ; report_package(GAP)

There are some remaining warnings; however, those related to
Downloads.download and to REPL.REPLCompletions.completions
seem to be issues in those stdlibs, not in our code.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #950 (9859ec0) into master (3cfb342) will not change coverage.
Report is 2 commits behind head on master.
The diff coverage is 83.33%.

@@           Coverage Diff           @@
##           master     #950   +/-   ##
=======================================
  Coverage   75.70%   75.70%           
=======================================
  Files          51       51           
  Lines        4169     4169           
=======================================
  Hits         3156     3156           
  Misses       1013     1013           
Files Coverage Δ
src/constructors.jl 98.71% <100.00%> (ø)
src/gap_to_julia.jl 90.29% <100.00%> (ø)
src/setup.jl 80.67% <100.00%> (ø)
src/wrappers.jl 98.55% <100.00%> (ø)
src/utils.jl 51.61% <33.33%> (ø)

src/adapter.jl Outdated
join(lines[(end-rows+upper+2):end], "\n")
stri = join(lines[1:upper], "\n")::String
stri *= "\n ⋮\n"
stri *= join(lines[(end-rows+upper+2):end], "\n")::String
Copy link
Member

Choose a reason for hiding this comment

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

I do not understand why the old code was problematic:
Doesn't the documentation of join say that a String is returned?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've dropped this for now until I understand it properly.

@@ -254,7 +254,7 @@ function BitVector(obj::GapObj)
!Wrappers.IsBlist(obj) && throw(ConversionError(obj, BitVector))
# TODO: a much better conversion would be possible, at least if `obj` is
# in IsBlistRep, then we could essentially memcpy data
len = Wrappers.Length(obj)
len = Wrappers.Length(obj)::Int
Copy link
Member

Choose a reason for hiding this comment

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

Ah, I have learned something:
Wrappers.Length defines its return type to be just GapInt (for example because there are infinite lists), but here we know more.
Thus it is worth to think about type annotations also for functions defined in Wrappers.

Specifically I used

  using JET, GAP ; report_package(GAP)

There are some remaining warnings; however, those related to
`Downloads.download` and to `REPL.REPLCompletions.completions`
seem to be issues in those stdlibs, not in our code.
@fingolfin fingolfin merged commit aee7200 into oscar-system:master Oct 31, 2023
11 of 14 checks passed
@fingolfin fingolfin deleted the mh/JET branch October 31, 2023 00:28
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.

2 participants