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

fix another case where we might return free TypeVar #47877

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Dec 12, 2022

We had an environment here that looked like while computing the upper bound for J{S} where S:

where S=T
where T
where I{T}
where J{S} where S

Then we started handling those, and filling in the values:

First replacing S with T, which creates a res of J{T}

where T
where I{T}
where J{S} where S

Then we handled T, which is also going to set wrap=0, so our result for J{T} will not be made into J{T} where T.

where I{T} (wrap 0)
where J{S} where S

Here we then had finished handling all the dependencies for J{S} where S, which resulted in an upper bound assignment of J{T}

where I{T}
where J{T}

Next, we handle I{T}, though it is now unused, so while we will make I{T} where T (via innervars) here for it, this goes unuesd.

And finally, we had our resulting clause:

where J{T}

But it is missing the where T, since I (from lhs) was discarded.

Thus we need to add that back now, when handling some innervars, if we see our term got duplicated to a higher part of the bounds before reaching this handling for its placement movement.

@vtjnash vtjnash added the types and dispatch Types, subtyping and method dispatch label Dec 12, 2022
@vtjnash vtjnash added needs pkgeval Tests for all registered packages should be run with this change don't squash Don't squash merge labels Dec 12, 2022
@vtjnash
Copy link
Member Author

vtjnash commented Dec 14, 2022

@nanosoldier runtests(ALL, vs=":master")

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

@vtjnash
Copy link
Member Author

vtjnash commented Dec 15, 2022

This has a somewhat high rate of 'Internal error: stack overflow in type inference', so that will require further investigation (and probably some good new test cases to add)

Otherwise, we would write NULL here immediately when handling
intersect_all, and may fail to restore this array correctly.
@vtjnash vtjnash removed the don't squash Don't squash merge label Dec 19, 2022
@vtjnash
Copy link
Member Author

vtjnash commented Dec 19, 2022

This now dropped the easiest and hardest commits, so it should be okay to merge this now (though the top description is now incorrect)
@nanosoldier runtests(["MultiwayNumberPartitioning", "LinearFractional", "DiscreteFunctions", "VectorizedRNG", "Knapsacks", "Ipaper", "Dualization", "LightGraphsFlows", "PowerModelsACDC", "GIFImages", "SumOfSquares", "HybridArrays", "FastDMTransform", "SDDP", "LinearCovarianceModels", "OpSel", "Thermochron", "GraphsFlows", "ApproxManifoldProducts", "ImageSmooth", "ConstraintModels", "NetDecOPF", "SecretSanta", "Jadex", "CBLS", "BDisposal", "HMatrices", "Stan", "StructJuMP", "Manopt", "TaylorModels", "DINCAE", "Acquisition", "FourierSpaces", "GeneticsMakie", "StaticMPI", "LinearSolve", "FrankWolfe", "DiffEqFinancial", "SurveyDataWeighting", "SparseVariables", "PostNewtonian", "OpenQuantumSystems", "ClimaTimeSteppers", "ImplicitPlots", "ReactionNetworkImporters", "MathJaxRenderer", "Wandb", "MaximinOPF", "SurfaceCoverage", "ArDCA", "BatchReactor", "QuantumTomography", "Sixel", "SymmetryReduceBZ", "SpeedMapping", "Bonobo", "NBodySimulator", "DiffEqNoiseProcess", "DTables", "FieldDistributionNonuniformMedium", "PowerModelsITD", "COSMO", "DifferentialEquations", "ConstrainedShortestPaths", "BioGraph", "RedClust", "ParametricOptInterface", "EMpht", "RELOG", "ModiaPlot_PyPlot", "NLopt", "DistributedFactorGraphs", "TiledIteration", "SetProg", "CompressedSensing", "Fri", "MosekTools", "UnitCommitment", "ImageNoise", "ECOS", "Lighthouse", "ODE", "ModeCouplingTheory", "Flowstar", "GasPowerModels", "ClosedLoopReachability", "ControlSystemsMTK", "MLJParticleSwarmOptimization", "Cbc", "ModelOrderReduction", "MRIFiles", "IntervalLinearAlgebra", "FBCModelTests", "CSDP", "ProjectManagement", "DynamicAxisWarping", "PetroleumModels", "PolyhedralRelaxations", "VoronoiFVM", "COBREXA", "Distributed", "TropicalGEMM", "KCenters", "Dojo", "ParameterJuMP", "FinEtools", "JMcDM", "SchattenNorms", "COPT", "RunningQuantiles", "NDTensors", "Pavito", "PSSFSS", "DifferentiableBackwardEuler", "HarmonicBalance", "InvertedFiles", "MINLPTests", "DataDrivenSR", "QuantumAnnealing", "MonteCarloMeasurements", "PiecewiseDeterministicMarkovProcesses", "DynamicExpressions", "SignalTablesInterface_CairoMakie", "SurfaceReactions", "WaterModels", "IsingSolvers", "PowerModelsDistribution", "InfrastructureModels", "WaveletsExt", "GpABC", "RelativisticDynamics", "SeparableOptimization", "NonlinearSolve", "GasModels", "EBayes", "Juniper", "ProjectAssigner", "LocalPoly", "SimplexCellLists", "TMLE", "Tulip", "SignalTablesInterface_WGLMakie", "Ai4EComponentLib", "QSM", "PowerModelsADA", "NetworkDynamics", "NonconvexPavito", "StatsDiscretizations", "Plasmo", "CALiPPSO", "MaxEntropyGraphs", "Catalyst", "RoundAndSwap", "ProxSDP", "StressTest", "NaiveNASlib", "FiniteStateProjection", "VectorSphericalHarmonics", "RegularizedLeastSquares", "SchwarzChristoffel", "MRIReco", "Juice", "SpmImageTycoonInstaller", "CutPruners", "CalibrateEmulateSample", "BetaML", "SymbolicWedderburn", "DiffEqProblemLibrary", "ModiaPlot_CairoMakie", "ClimateMARGO", "Anneal", "ComplexOptInterface", "GraphicalModelLearning", "CVaRRiskParity", "DiscretePIDs", "OndaEDFSchemas", "FrequencySweep", "VectorizedStatistics", "Clarabel", "RegressionDiscontinuity", "IRKGaussLegendre", "LatinSquares", "GuessworkQuantumSideInfo", "Convex", "LuaCall", "Powerful", "OPFSampler", "CellMLToolkit", "OSQP", "ToQUBO", "Seleroute", "ConformalPrediction", "ManifoldDiff", "PowerModelsSecurityConstrained", "ImageMorphology", "RSDeltaSigmaPort", "GeneralizedSDistributions", "ODEConvergenceTester", "Sophon", "GMMParameterEstimation", "PolaronMobility", "LSODA", "AccurateArithmetic", "NeuroAnalysis", "BoundaryValueDiffEq", "PreallocationTools", "ModiaPlot_WGLMakie", "DataDrivenDMD", "ObjectivePaths", "NoncommutativeGraphs", "QuantumAnnealingAnalytics", "DensityRatioEstimation", "GLPK", "ThresholdStability", "HiGHS", "SimilaritySearch", "DualDecomposition", "SDPA", "SimulationLogs", "ReactionSensitivity", "StrideArrays", "ImageShow", "SphericalHarmonics", "GraphRecipes", "NonconvexJuniper", "RollingFunctions", "ImageInTerminal", "DynamicalSystemsBase", "NaNStatistics", "Ipopt", "DiffEqPhysics", "Ripserer", "StaticTools", "NodalPolynomialSpaces", "StrideArraysCore", "IonSim", "Boscia", "Clp", "TrajectoryGamesBase", "FFTA", "GLFixedEffectModels", "RxInfer", "Chron", "FractionalSystems", "Molly", "PowerModelsRestoration", "SCS", "BloqadeODE", "BellDiagonalQudits", "LRSLib", "Evolutionary", "BenchmarkingEconomicEfficiency", "PiecewiseLinearOpt", "Fronts", "ModiaResult", "YasolSolver", "OrdinalGWAS", "CORBITS", "DAQP", "TriangularSolve", "TestParticle", "QuantumCumulants", "MatrixProfile", "MarsagliaDiscreteSamplers", "TransformUtils", "BoxLeastSquares", "ODEInterfaceDiffEq", "SimplePosetAlgorithms", "Petri", "PointEstimateMethod", "ODEProblemLibrary", "PowerModelsStability", "AvailablePotentialEnergyFramework", "IndependentComponentAnalysis", "Integrals", "StaticStrings", "Population", "StaticCompiler", "AlgebraicPetri", "LibRaw", "Cloudy", "DataDrivenSparse", "Pajarito", "Powersense", "MathOptSetDistances", "FMI", "StatGeochem", "MRICoilSensitivities", "DiffEqCallbacks", "TSFrames", "PoGO", "AcousticRayTracers", "LowLevelParticleFilters", "LinRegOutliers", "NaiveNASflux", "MCPhylo", "Allocations", "DynamicMovementPrimitives", "RecursiveFactorization", "StanModels", "BundleMethod", "LovaszTheta", "NeuralGraphPDE", "LabelledArrays", "GeoStatsBase", "PlugFlowReactor", "IndividualDisplacements", "GeneralizedSasakiNakamura", "MathOptSymbolicAD", "DWaveNeal", "DataEnvelopmentAnalysis", "RangeEnclosures", "StirredReactor", "vOptGeneric", "JuMP", "SciMLExpectations", "TravelingSalesmanExact", "StatGeochemBase", "PowerWaterModels", "ProxAL", "Percival", "Fairness", "BloqadeGates", "LogicCircuits", "JuDGE", "SIMDDualNumbers", "BranchAndBound", "IndependentHypothesisWeighting", "MriResearchTools", "PowerModelsProtection", "ImageIO", "Kinematic1D", "JSOSolvers", "BlockMatching", "SimpleDiffEq", "NestedEnvironments", "KadanoffBaym", "Alpine", "Sudoku", "QuantumInformation", "BlockSystems", "KomaMRI", "ImplicitGlobalGrid", "BipolarSphericalHarmonics", "PyBraket", "MicroscopePSFs", "PowerModelsAnnex", "BlobTracking", "MendelImpute", "MutualInformationImageRegistration", "Conductor", "FastVision", "Jutul", "OptControl", "OptimizationSpeedMapping", "BlockDecomposition", "Bloqade", "SCIP", "ONNXNaiveNASflux", "LowRankIntegrators", "PowerModelsWildfire", "FlexPlan", "DPFEHM", "SteadyStateDiffEq", "Collide", "TensorCast", "MathepiaModels", "Sundials", "EvoLinear", "UnitJuMP", "QuantumCircuitOpt", "PWF", "SimSearchManifoldLearning", "LayeredLayouts", "PowerAnalytics", "PFFRGSolver", "Unfolding"], vs = ":master")

@vtjnash vtjnash added merge me PR is reviewed. Merge when all tests are passing and removed needs pkgeval Tests for all registered packages should be run with this change labels Dec 19, 2022
@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

@N5N3 N5N3 merged commit 70c1e45 into master Dec 20, 2022
@N5N3 N5N3 deleted the jn/47476more branch December 20, 2022 09:31
@vtjnash
Copy link
Member Author

vtjnash commented Dec 20, 2022

Looks like 2 of these may be partly related, so I will investigate further on these:

VectorizedRNG v0.2.22: fail vs. ok
Ripserer v0.16.11: fail vs. ok

@vtjnash
Copy link
Member Author

vtjnash commented Dec 20, 2022

Turns out Ripserer is intentionally defining a method incorrectly to segfault Julia, so that package can be ignored (@maleadt @KristofferC) https://github.com/mtsch/Ripserer.jl/blob/be521a24bdb8bf0b9a6a7e226ba361a12145847f/test/base/primefield.jl#L56

I have a bugfix for VectorizedRNG. Impressive it is the only package that hit this bug, due to use of excess Union declarations.

@vtjnash
Copy link
Member Author

vtjnash commented Dec 20, 2022

The other original part of this change is failing on this test:

let T = Tuple{Union{Type{T}, Type{S}}, Union{Val{T}, Val{S}}, Union{Val{T}, S}} where T<:Val{A} where A where S<:Val,
    S = Tuple{Type{T}, T, Val{T}} where T<:(Val{S} where S<:Val)
    @test typeintersect(T, S) === Union{}
    @show typeintersect(S, T)
end

Which is a pre-existing bug in intersection, but gets exposed by that commit

@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants