JuliaCI/PkgTemplates.jl

Testing interactive menu broken in Juila1.8

Open

#370 opened on Oct 19, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Julia (697 stars) (112 forks)batch import
bughelp wanted

Description

I believe some changes were made to Pkg.jl, such stdin is no longer the global stdin, but instead an IOStream. Here's a link to that PR.

The testset that is breaking is SimulatedInputs

This makes it such that calling stdin.buffer results in:

Got exception outside of @test
  type IOStream has no field buffer

I tried just removing .buffer from stdin, but then ran into this error:

Default template: Error During Test at /Users/baileybox/Documents/Projects/JuliaProjects/1.8/dev/PkgTemplates/test/interactive.jl:84
  Test threw exception
  Expression: Template(; interactive = true) == Template(; user = USER)
  EOFError: read end of file

# Along with

Warning: TerminalMenus: Unable to enter raw mode:
│   exception =
│    MethodError: no method matching check_open(::IOStream)
│    Closest candidates are:
│      check_open(::Union{Base.LibuvServer, Base.LibuvStream}) at stream.jl:386
│      check_open(::Base.Filesystem.File) at filesystem.jl:114

The fix for this would be to setup our own type of stdin, or changing how we call interactive from with the tests.

Contributor guide