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

Introduce new syntax highlighting stdlib #51810

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ Standard library changes
* The new `@styled_str` string macro provides a convenient way of creating a
`AnnotatedString` with various faces or other attributes applied ([#49586]).

#### JuliaSyntaxHighlighting

* A new standard library for applying syntax highlighting to Julia code, this
uses `JuliaSyntax` and `StyledStrings` to implement a `highlight` function
that creates an `AnnotatedString` with syntax highlighting applied.

#### Package Manager

#### LinearAlgebra
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
08230d0801fda3c81927d558452215e4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0386841dcf30ee53f7f95dd3206e1208482507d157aa09739873de2a56e5ca3d7bbf27eccd9f4ed81c1c0fea229673475f6454fe94df0ff960563ca4c29ed36c
1 change: 1 addition & 0 deletions pkgimage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ $(eval $(call stdlib_builder,Printf,Unicode))
$(eval $(call stdlib_builder,Random,SHA))
$(eval $(call stdlib_builder,Tar,ArgTools,SHA))
$(eval $(call stdlib_builder,DelimitedFiles,Mmap))
$(eval $(call stdlib_builder,JuliaSyntaxHighlighting,))

# 2-depth packages
$(eval $(call stdlib_builder,LLD_jll,Zlib_jll libLLVM_jll Artifacts Libdl))
Expand Down
2 changes: 2 additions & 0 deletions stdlib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
/Distributed
/StyledStrings-*
/StyledStrings
/JuliaSyntaxHighlighting-*
/JuliaSyntaxHighlighting
/*_jll/StdlibArtifacts.toml
/*/Manifest.toml
/*.image
4 changes: 4 additions & 0 deletions stdlib/JuliaSyntaxHighlighting.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
JULIASYNTAXHIGHLIGHTING_BRANCH = main
JULIASYNTAXHIGHLIGHTING_SHA1 = 4110caaf4fcdf0c614fd3ecd7c5bf589ca82ac63
JULIASYNTAXHIGHLIGHTING_GIT_URL := https://github.com/julialang/JuliaSyntaxHighlighting.jl.git
JULIASYNTAXHIGHLIGHTING_TAR_URL = https://api.github.com/repos/julialang/JuliaSyntaxHighlighting.jl/tarball/$1
3 changes: 2 additions & 1 deletion stdlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ STDLIBS = Artifacts Base64 CRC32c Dates FileWatching \
$(JLL_NAMES)

STDLIBS_EXT = Pkg Statistics LazyArtifacts LibCURL DelimitedFiles Downloads ArgTools \
Tar NetworkOptions SuiteSparse SparseArrays StyledStrings SHA Distributed
Tar NetworkOptions SuiteSparse SparseArrays StyledStrings SHA Distributed \
JuliaSyntaxHighlighting

$(foreach module, $(STDLIBS_EXT), $(eval $(call stdlib-external,$(module),$(shell echo $(module) | tr a-z A-Z))))

Expand Down
6 changes: 3 additions & 3 deletions stdlib/stdlib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ STDLIBS_WITHIN_SYSIMG := \

INDEPENDENT_STDLIBS := \
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LilithHafner to answer your question. As long as the stdlib is here it is "free", but not yet upgrade-able.

Upgrade-able requires registering in the Registry and Pkg allowing it to update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is there anything that should be done on the JuliaSyntaxHighlighting side of things to enable Pkg to allow it to upgrade?

ArgTools Base64 CRC32c Dates DelimitedFiles Distributed Downloads Future \
InteractiveUtils LazyArtifacts LibGit2 LibCURL Logging Markdown Mmap \
NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays SparseArrays \
Statistics StyledStrings Tar Test TOML Unicode UUIDs \
InteractiveUtils JuliaSyntaxHighlighting LazyArtifacts LibGit2 LibCURL Logging \
Markdown Mmap NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays \
SparseArrays Statistics StyledStrings Tar Test TOML Unicode UUIDs \
dSFMT_jll GMP_jll libLLVM_jll LLD_jll LLVMLibUnwind_jll LibUnwind_jll LibUV_jll \
LibCURL_jll LibSSH2_jll LibGit2_jll nghttp2_jll MozillaCACerts_jll MbedTLS_jll \
MPFR_jll OpenLibm_jll PCRE2_jll p7zip_jll Zlib_jll
Expand Down