JuliaIO / JuliaIO/FileIO.jl

Generalized falling back show + mimetype

Open
#289 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
228
Forks
81
Avg merge
1d 29m
Merged PRs (30d)
1

Description

Right now we handle the fact that things can define show(::IO, mimetype, ::MyType), vis the MimeWriter
which we list just like any other library. Generally last.

I suggest that we should instead include in the registry a list of mime-types for each filetype.
and then we should have generic code that checks showable for each.
The code in the MimeWriter is basically all the same.
Since the full-full_fidelity IOContext should just be ignored by anything that doesn't know what to do with it;
and listing multiple would achieve the same as else-if that html has.

There is also an argument that these should be at the top of the priority list to try
This is because show is often defined by same library as defines the object.
As such it has the most informatiom about what it wants to do.
Futhermor, it will not normally require loading a dependency.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/mimesave.jl and the existing MimeWriter implementation. Review how the registry represents file types, then determine how MIME types and generic showable checks would fit there; done means the fallback behavior is generalized without requiring each MIME case to be listed separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.