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

add warning for function declaration with undefined static parameter #46608

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Sep 2, 2022

Refs #27813 (does not fix it)

n.b. The change is very simple (just adding the jl_has_typevar call), but I had to shift around a lot of other code to make it so I had access to the file/line/name variables here for the warning message, so the diff is a big mess.

Includes a fix for #42594 detected by this change during the sysimg build.

n.b. this emits a few warnings in the tests, since we have a couple existing tests that explicitly try this

WARNING: method definition for f33135 at /Users/jameson/julia1/test/syntax.jl:1997 declares type variable C1 but does not use it.
WARNING: method definition for bad_tvars at /Users/jameson/julia1/test/core.jl:5211 declares type variable T but does not use it.
WARNING: method definition for bad_tvars2 at /Users/jameson/julia1/test/core.jl:5214 declares type variable T but does not use it.

@vtjnash vtjnash merged commit cfec173 into master Sep 6, 2022
@vtjnash vtjnash deleted the jn/27813-warn branch September 6, 2022 16:31
@vtjnash vtjnash added the backport 1.8 Change should be backported to release-1.8 label Sep 6, 2022
KristofferC pushed a commit that referenced this pull request Sep 7, 2022
@KristofferC KristofferC mentioned this pull request Sep 7, 2022
28 tasks
maleadt pushed a commit to JuliaGPU/CUDA.jl that referenced this pull request Sep 8, 2022
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
@aviatesk aviatesk removed the backport 1.8 Change should be backported to release-1.8 label Sep 9, 2022
domluna pushed a commit to domluna/JuliaFormatter.jl that referenced this pull request Sep 12, 2022
Unbound type parameters cause performance issues.

Issue found using JuliaLang/julia#46608
thchr added a commit to thchr/SnoopCompile.jl that referenced this pull request Sep 20, 2022
On Julia master, JuliaLang/julia#46608 gave rise to a precompilation warning for SnoopCompile:

```jl
julia> using SnoopCompile
[ Info: Precompiling SnoopCompile [aa65fe97-06da-5843-b5b1-d5d13cad87d2]
WARNING: method definition for precompilable_time at /home/tchr/.julia/packages/SnoopCompile/J3dtR/src/parcel_snoopi_deep.jl:290 declares type variable T but does not use it.
```
jkrumbiegel pushed a commit to jkrumbiegel/GridLayoutBase.jl that referenced this pull request Oct 1, 2022
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
@ericphanson
Copy link
Contributor

Looks like this was missing a NEWS entry? Pretty visible change that is probably somewhat confusing to a lot of folks, because very-downstream packages see it.

(but I am glad to have the warning, I bet with it many of these will be cleaned up very quickly).

pkofod pushed a commit to JuliaNLSolvers/NLSolversBase.jl that referenced this pull request Nov 21, 2022
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
pkofod pushed a commit to JuliaNLSolvers/Optim.jl that referenced this pull request Nov 23, 2022
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
jverzani pushed a commit to jverzani/AMRVW.jl that referenced this pull request Dec 14, 2022
I didn't check, but unbound type parameters can be serious performance
bugs.

Found with JuliaLang/julia#46608
maleadt pushed a commit to JuliaGPU/CUDA.jl that referenced this pull request Jan 5, 2023
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
maleadt pushed a commit to JuliaGPU/CUDA.jl that referenced this pull request Jan 6, 2023
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
simonbyrne pushed a commit to simonbyrne/CUDA.jl that referenced this pull request Nov 13, 2023
Unbound type parameters often cause performance issues and run time
dispatch.

Issue found using JuliaLang/julia#46608
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