julia icon indicating copy to clipboard operation
julia copied to clipboard

split internal dates methods into separate functions

Open aplavin opened this issue 1 year ago • 2 comments

another attempt at https://github.com/JuliaLang/julia/pull/53692

aplavin avatar Aug 27 '24 10:08 aplavin

I still like the changes.

Need to adjust rata2datetime and datetime2rata to use _yearmonthday, too.

LilithHafner avatar Aug 27 '24 12:08 LilithHafner

Tests still fail, but I cannot see any specific failure in the logs.

aplavin avatar Aug 27 '24 23:08 aplavin

Yeah, it's confusing to me too. I'm trying to figure out how to rerun the build in case it's a buildkite issue. I've never seen a failure like this.

LilithHafner avatar Aug 28 '24 12:08 LilithHafner

bump... not sure what to do here

aplavin avatar Sep 09 '24 06:09 aplavin

Thanks for the bump. Next steps are to fix test failures in CI and then run pkgeval. Here's a real test failure from CI:


Error During Test at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-grannysmith-C07ZQ07RJYVY.0/build/default-grannysmith-C07ZQ07RJYVY-0/julialang/julia-master/julia-8d470900e4/share/julia/stdlib/v1.12/Dates/test/accessors.jl:59
--
  | Test threw exception
  | Expression: (y, m, d) == Dates.yearmonthday(days)
  | MethodError: no method matching yearmonthday(::Int64)
  | The function `yearmonthday` exists, but no method is defined for this combination of argument types.

LilithHafner avatar Sep 10 '24 14:09 LilithHafner

Hmmm, some of these methods are tested directly in https://github.com/JuliaLang/julia/blob/c6c449ccdb75fbd72700704ae669e1f98e512206/stdlib/Dates/test/accessors.jl#L8-L46 Any idea whether it was intended as a public api (yearmonthday(x) and others taking any number) or not?

aplavin avatar Sep 10 '24 21:09 aplavin

I don't see that usage documented, so no: not public. Those tests should be switched to testing _yearmonthday and friends. Nanosoldier can tell us if packages depend on those undocumented internals.

@nanosoldier runtests()

LilithHafner avatar Sep 11 '24 15:09 LilithHafner

The package evaluation job you requested has completed - possible new issues were detected. The full report is available.

nanosoldier avatar Sep 12 '24 02:09 nanosoldier

The failures in Kedzi, NanoDates, and Dates look real. If this were breaking something that was ever public, I would be concerned. As is, we should investigate Kexzi and NanoDates's failures and it would be polite to make PRs that fix them but I don't view those nanosoldier failures as blocking.

LilithHafner avatar Sep 12 '24 19:09 LilithHafner