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

TYPST_PACKAGE_CACHE_PATH ignored for gotodefinition #1027

Open
mmlb opened this issue Dec 18, 2024 · 2 comments
Open

TYPST_PACKAGE_CACHE_PATH ignored for gotodefinition #1027

mmlb opened this issue Dec 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mmlb
Copy link

mmlb commented Dec 18, 2024

Describe the bug

I'm setting $TYPST_PACKAGE_CACHE_PATH to $PWD/typst to vendor imported packages. typst finds and uses these fine, but when I use my editor's (helix) gotodefinition it opens under ~/.cache/typst/packages/... (not what I'd expect, PWD != ~/.cache).

I start with an empty ~/.cache/typst and after running typst compile it stays empty:

[11:50:29]-[~/p/g/m/resume]-[manny@zennix]
rm -rf ~/.cache/typst
[11:50:33]-[~/p/g/m/resume]-[manny@zennix]
ls -l ~/.cache/typst
ls: cannot access '/home/manny/.cache/typst': No such file or directory
[11:50:35]-[~/p/g/m/resume]-[manny@zennix]
typst compile src/ManuelMendez.typ
[11:50:36]-[~/p/g/m/resume]-[manny@zennix]
ls -l ~/.cache/typst
ls: cannot access '/home/manny/.cache/typst': No such file or directory

But if I do the gotodefinition there are files in there now:

[11:52:27]-[~/p/g/m/resume]-[manny@zennix]
rm -rf ~/.cache/typst ~/.cache/helix/helix.log
[11:52:30]-[~/p/g/m/resume]-[manny@zennix]
ls -l ~/.cache/typst
ls: cannot access '/home/manny/.cache/typst': No such file or directory
[11:52:33]-[~/p/g/m/resume]-[manny@zennix]
hx -v src/ManuelMendez.typ
[11:52:39]-[~/p/g/m/resume]-[manny@zennix]
ls -l ~/.cache/typst
total 0
drwxr-xr-x 3 manny users 0 Dec 18 11:52 packages/

Package/Software version:

Initially nix's latest tinymist package:

[12:00:51]-[~/p/g/m/resume]-[manny@zennix]
tinymist --version
tinymist
Build Timestamp:     1980-01-01T00:00:00.000000000Z
Build Git Describe:  VERGEN_IDEMPOTENT_OUTPUT
Commit SHA:          VERGEN_IDEMPOTENT_OUTPUT
Commit Date:         None
Commit Branch:       None
Cargo Target Triple: x86_64-unknown-linux-gnu
Typst Version:       0.12.0
Typst Source:        git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.12.0#58426a90a7ef721738a01be09793d33e55eb75a9

[12:00:56]-[~/p/g/m/resume]-[manny@zennix]
realwhich tinymist
/nix/store/v0ym1afdyhnh6n48xbckw56gnp07058m-tinymist-0.12.12/bin/tinymist

but I can reproduce with latest main commit:

tinymist --version
tinymist
Build Timestamp:     1980-01-01T00:00:00.000000000Z
Build Git Describe:  v0.12.12-13-gde8e45a
Commit SHA:          de8e45a539df45521c683e284fc704d882dc1da2
Commit Date:         None
Commit Branch:       None
Cargo Target Triple: x86_64-unknown-linux-gnu
Typst Version:       0.12.0
Typst Source:        git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.12.0#58426a90a7ef721738a01be09793d33e55eb75a9

Logs:

2024-12-18T12:01:54.522 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"positionEncodings":["utf-8","utf-32","utf-16"]},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"deprecatedSupport":true,"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{}},"formatting":{"dynamicRegistration":false},"hover":{"contentFormat":["markdown"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"tagSupport":{"valueSet":[1,2]},"versionSupport":true},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":false},"executeCommand":{"dynamicRegistration":false},"fileOperations":{"didRename":true,"willRename":true},"inlayHint":{"refreshSupport":false},"symbol":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"24.7 (079f5442)"},"processId":1999468,"rootPath":"/home/manny/projects/github.com/mmlb/resume","rootUri":"file:///home/manny/projects/github.com/mmlb/resume","workspaceFolders":[{"name":"resume","uri":"file:///home/manny/projects/github.com/mmlb/resume"}]},"id":0}
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist] tinymist version information: [[\"Build Timestamp\", \"1980-01-01T00:00:00.000000000Z\"], [\"Build Git Describe\", \"v0.12.12-13-gde8e45a\"], [\"Commit SHA\", \"de8e45a539df45521c683e284fc704d882dc1da2\"], [\"Commit Date\", \"None\"], [\"Commit Branch\", \"None\"], [\"Cargo Target Triple\", \"x86_64-unknown-linux-gnu\"], [\"Typst Version\", \"0.12.0\"], [\"Typst Source\", \"git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.12.0#58426a90a7ef721738a01be09793d33e55eb75a9\"]]\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist] starting Language server: LspArgs {\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "        mirror: MirrorArgs {\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "            mirror: \"\",\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "            replay: \"\",\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "        },\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "        font: CompileFontArgs {\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "            font_paths: [],\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "            ignore_system_fonts: false,\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "        },\n"
2024-12-18T12:01:54.524 helix_lsp::transport [ERROR] tinymist err <- "    }\n"
2024-12-18T12:01:54.526 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] handling initialize - (0) at Instant { tv_sec: 581067, tv_nsec: 844873263 }\n"
2024-12-18T12:01:54.526 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::server] LanguageState: initialized with config Config { const_config: ConstConfig { position_encoding: Utf8, cfg_change_registration: true, notify_will_rename_files: true, tokens_dynamic_registration: false, tokens_overlapping_token_support: false, tokens_multiline_token_support: false, doc_line_folding_only: true, doc_fmt_dynamic_registration: false }, compile: CompileConfig { output_path: PathPattern(\"\"), export_pdf: Never, font_opts: CompileFontArgs { font_paths: [], ignore_system_fonts: false }, system_fonts: None, font_paths: [], fonts: OnceCell(Uninit), notify_status: false, periscope_args: None, typst_extra_args: None, color_theme: None, has_default_entry_path: false, lsp_inputs: {}, entry_resolver: EntryResolver { root_path: None, roots: [\"/home/manny/projects/github.com/mmlb/resume\"], entry: None } }, semantic_tokens: Enable, formatter_mode: Disable, formatter_print_width: None, support_html_in_markdown: false, completion: CompletionFeat { trigger_on_snippet_placeholders: false, trigger_suggest: false, trigger_parameter_hints: false, trigger_suggest_and_parameter_hints: false, postfix: None, postfix_ufcs: None, postfix_ufcs_left: None, postfix_ufcs_right: None, postfix_snippets: None } }\n"
2024-12-18T12:01:54.526 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor] TypstActor: creating server for primary, entry: EntryState { rooted: true, root: Some(\"/home/manny/projects/github.com/mmlb/resume\"), main: None }, inputs: {}\n"
2024-12-18T12:01:54.526 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::init] creating SharedFontResolver with CompileFontArgs { font_paths: [], ignore_system_fonts: false }\n"
2024-12-18T12:01:54.527 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] handled  initialize - (0) in 1.36ms\n"
2024-12-18T12:01:54.527 helix_lsp::transport [INFO] tinymist <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"codeActionProvider":true,"codeLensProvider":{"resolveProvider":false},"colorProvider":true,"completionProvider":{"triggerCharacters":["#","(","<",",",".",":","/","\"","@"]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"executeCommandProvider":{"commands":["tinymist.getResources","tinymist.doKillPreview","tinymist.getServerInfo","tinymist.doGetTemplateEntry","tinymist.exportMarkdown","tinymist.exportSvg","tinymist.exportHtml","tinymist.pinMain","tinymist.exportAnsiHighlight","tinymist.doInitTemplate","tinymist.exportText","tinymist.getDocumentTrace","tinymist.getDocumentMetrics","tinymist.scrollPreview","tinymist.exportPdf","tinymist.exportQuery","tinymist.doStartPreview","tinymist.getWorkspaceLabels","tinymist.doClearCache","tinymist.interactCodeContext","tinymist.focusMain","tinymist.exportPng"]},"experimental":{"onEnter":true},"foldingRangeProvider":true,"hoverProvider":true,"inlayHintProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["strong","emph","math","readonly","static","defaultLibrary"],"tokenTypes":["comment","string","keyword","operator","number","function","decorator","type","namespace","bool","punct","escape","link","raw","label","ref","heading","marker","term","delim","pol","error","text"]}},"signatureHelpProvider":{"triggerCharacters":["(",",",":"]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"workspace":{"fileOperations":{"willRename":{"filters":[{"pattern":{"glob":"**/*.typ","matches":"file"},"scheme":"file"}]}},"workspaceFolders":{"changeNotifications":true,"supported":true}},"workspaceSymbolProvider":true}}}
2024-12-18T12:01:54.527 helix_lsp::transport [INFO] tinymist <- {"capabilities":{"codeActionProvider":true,"codeLensProvider":{"resolveProvider":false},"colorProvider":true,"completionProvider":{"triggerCharacters":["#","(","<",",",".",":","/","\"","@"]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"executeCommandProvider":{"commands":["tinymist.getResources","tinymist.doKillPreview","tinymist.getServerInfo","tinymist.doGetTemplateEntry","tinymist.exportMarkdown","tinymist.exportSvg","tinymist.exportHtml","tinymist.pinMain","tinymist.exportAnsiHighlight","tinymist.doInitTemplate","tinymist.exportText","tinymist.getDocumentTrace","tinymist.getDocumentMetrics","tinymist.scrollPreview","tinymist.exportPdf","tinymist.exportQuery","tinymist.doStartPreview","tinymist.getWorkspaceLabels","tinymist.doClearCache","tinymist.interactCodeContext","tinymist.focusMain","tinymist.exportPng"]},"experimental":{"onEnter":true},"foldingRangeProvider":true,"hoverProvider":true,"inlayHintProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["strong","emph","math","readonly","static","defaultLibrary"],"tokenTypes":["comment","string","keyword","operator","number","function","decorator","type","namespace","bool","punct","escape","link","raw","label","ref","heading","marker","term","delim","pol","error","text"]}},"signatureHelpProvider":{"triggerCharacters":["(",",",":"]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"workspace":{"fileOperations":{"willRename":{"filters":[{"pattern":{"glob":"**/*.typ","matches":"file"},"scheme":"file"}]}},"workspaceFolders":{"changeNotifications":true,"supported":true}},"workspaceSymbolProvider":true}}
2024-12-18T12:01:54.527 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2024-12-18T12:01:54.527 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] notifying initialized - at Instant { tv_sec: 581067, tv_nsec: 846413733 }\n"
2024-12-18T12:01:54.527 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::server] server initialized\n"
2024-12-18T12:01:54.527 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] notifing initialized succeeded in 21.87µs\n"
2024-12-18T12:01:54.527 helix_lsp::transport [INFO] tinymist <- {"jsonrpc":"2.0","id":0,"method":"client/registerCapability","params":{"registrations":[{"id":"config","method":"workspace/didChangeConfiguration"}]}}
2024-12-18T12:01:54.528 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"typst","text":"#import \"@preview/basic-resume:0.2.1\": *\n\n#show: resume.with(\n  author: \"Manuel Mendez\",\n  email: \"i@m.mmlb.dev\",\n  github: \"github.com/mmlb\",\n  linkedin: \"linkedin.com/in/manuelmendezjr\",\n  phone: \"+1 (305) 523-9213\",\n  accent-color: \"#26428b\",\n  font: \"New Computer Modern\",\n)\n\n== Skills\n=== Programming Languages\n#table(\n  stroke: none,\n  columns: (1fr, 1fr, 1fr),\n  [★★★ Bash/sh, Go], [★★ C, Python, Ruby, SQL], [★ C++, Rust, Zig],\n)\n\n=== Technologies\n★★★ Containers, DHCP, DNS, Docker, Ethernet, Git, gRPC, IP, JSON, Linux, Nix/NixOS, Protocol Buffers, R.E.S.T., TCP/UDP,\n\n★★ NATs, Consul, etcd, JSON-RPC, SQLite, ZeroMQ\n\n=== Design Methods\n★★★ Client/Server, Concurrent Code, Distributed Systems, D.R.Y., L.D.R., UNIX, Y.A.G.N.I.\n\n== Work Experience\n\n#work(\n  title: \"Senior Staff Software Engineer\",\n  company: [Equinix (Metal)/Packethost #link(\"https://equinix.com\")],\n  location: \"Remote\",\n  dates: dates-helper(start-date: \"Nov 2016\", end-date: \"Dec 2024\"),\n)\n- Led the \"faster/more secure disk wipe\" project from inception, reduced server down time by >400%\n- Took over \"rust based bootloader install/configuration\" project; added tests, CI/CD process, rollout and monitoring\n- Created service to distribute DCIM data locally, reducing latency upto 100x, reducing service complexity and enabling new features and services\n- Lead Engineer for \"Provisioning Stack\", including netboot (DHCP, TFTP, HTTP, iPXE, BMC) go based services and Alpine Linux based in-memory host\n- Initial maintainer for CNCF #link(\"https://tinkerbell.org/\")[tinkerbell] project\n- Introduced Nix based development environments, CI setup and later container packaging which led to decreased build/CI times and review churn\n- Introduced and championed Light Weight Decision Records; git commit hygiene, bisectability and ensuring \"main\" branch is always green; proper error handling, logging, and testing of BASH scripts.\n- Regularly took part in Engineering RFC process, both submissions and review\n- Known for being Go/Git/Linux/Bash guru and frequent mentor\n\n\n#work(\n  title: \"Software Engineer\",\n  company: \"OmniTI\",\n  location: [Remote #link(\"https://omniti.com/\")],\n  dates: dates-helper(start-date: \"Dec 2014\", end-date: \"Nov 2016\"),\n)\n- Designed and developed a Go based kubernetes like distributed orchestration system for virtual machine and container executions #link(\"https://github.com/cerana/cerana\")[cerana/cerana], previously #link(\"https://github.com/mistifyio/lochness\")[mistifyio/lochness]\n- Took part in design, development, review and test of flatcar like OS #link(\"https://github.com/mistifyio/mistify-os\")[mistifio/mistify-os]\n- Maintained go based ZFS bindings #link(\"https://github.com/mistifyio/go-zfs\")[mistifyio/go-zfs]\n- Evaluated, integrated and extended third party tools for use in system, systemd, etcd…\n\n#work(\n  title: \"Embedded Software Engineer II\",\n  company: \"SR Technologies\",\n  location: [Fort Lauderdale, FL #link(\"https://www.srtrl.com\")],\n  dates: dates-helper(start-date: \"July 2010\", end-date: \"Dec 2014\"),\n)\n- Full cycle application and system development\n- Subsystem architect tasked with developing HA procedure/verification, deployment, devops, live updating, monitoring and support of satellite backend infrastructure component\n- Go based Virtual Machine based WIFI scanning and capture device\n- High Availability / Redundant satellite control relay system, replacing original legacy system\n- C++/Python WIFI geolocation device\n\n#work(\n  title: \"Head Teaching Assistant\",\n  company: \"Georgia Institute of Technology\",\n  location: [Atlanta, GA #link(\"https://www.cc.gatech.edu\")],\n  dates: dates-helper(start-date: \"Jan 2009\", end-date: \"May 2010\"),\n)\n- C Programming using Nintendo Gameboy to teach embedded system concepts and practices such as timers, interrupts, timing constraints/deadlines, and efficient coding\n- Promoted to Head TA after first year\n- Led the planning and development of course, including future improvements and goals\n- Follow through with other TAs on delegated responsibilities\n- Interact with students in diverse numbers: individually, small groups < 25, and entire class of 100+\n\n#work(\n  title: \"Linux Consultant\",\n  company: \"Infoplusa Corp\",\n  location: \"Miami, FL\",\n  dates: dates-helper(start-date: \"May 2006\", end-date: \"May 2010\"),\n)\n- Installed and maintained multiple systems, Windows/Linux workstations/servers\n- Researched and implemented new software/services, such as file servers, back-up systems\n- Provided emergency support and/or disaster recovery\n- Online tech support\n\n== Education\n\n#edu(\n  institution: \"Georgia Institute of Technology\",\n  location: \"Atlanta, GA\",\n  dates: dates-helper(start-date: \"Aug 2007\", end-date: \"May 2010\"),\n  degree: \"Bachelor's of Science, Computer Engineering\",\n)\n- Dean's List, Tower Award\n- Final Project: Refurbish 6.1m X-Band parabolic antenna | Design and implement client-server motor control for satellite tracking\n","uri":"file:///home/manny/projects/github.com/mmlb/resume/src/ManuelMendez.typ","version":0}}}
2024-12-18T12:01:54.528 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-12-18T12:01:54.528 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","result":null,"id":0}
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] notifying textDocument/didOpen - at Instant { tv_sec: 581067, tv_nsec: 847142728 }\n"
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::server] did open Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/home/manny/projects/github.com/mmlb/resume/src/ManuelMendez.typ\", query: None, fragment: None }\n"
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::server] create source: \"/home/manny/projects/github.com/mmlb/resume/src/ManuelMendez.typ\"\n"
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::typ_client] the entry file of TypstActor(primary) is changing to EntryState { rooted: true, root: Some(\"/home/manny/projects/github.com/mmlb/resume\"), main: Some(/src/ManuelMendez.typ) }\n"
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::server] file focused[implicit,o]: Some(\"/home/manny/projects/github.com/mmlb/resume/src/ManuelMendez.typ\")\n"
2024-12-18T12:01:54.528 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  sync_lsp] notifing textDocument/didOpen succeeded in 164.60µs\n"
2024-12-18T12:01:54.600 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received status request(primary) Compiling\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  reflexo_typst::diag::console] Some(/src/ManuelMendez.typ): compilation succeeded in 324.938628ms\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received diagnostics from primary:4: diag(Some(0))\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received status request(primary) CompileSuccess\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::task::cache] CacheEvictTask: evict cache in 23.081µs\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received status request(primary) Compiling\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  reflexo_typst::diag::console] Some(/src/ManuelMendez.typ): compilation succeeded in 147.463µs\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received diagnostics from primary:5: diag(Some(0))\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::actor::editor] received status request(primary) CompileSuccess\n"
2024-12-18T12:01:54.925 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:54Z INFO  tinymist::task::cache] CacheEvictTask: evict cache in 12.06µs\n"
2024-12-18T12:01:56.797 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"textDocument/definition","params":{"position":{"character":4,"line":30},"textDocument":{"uri":"file:///home/manny/projects/github.com/mmlb/resume/src/ManuelMendez.typ"}},"id":1}
2024-12-18T12:01:56.797 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  sync_lsp] handling textDocument/definition - (1) at Instant { tv_sec: 581070, tv_nsec: 116622951 }\n"
2024-12-18T12:01:56.797 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist_query::analysis::global] analysis revision 5 is created\n"
2024-12-18T12:01:56.799 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  sync_lsp] handled  textDocument/definition - (1) in 1.74ms\n"
2024-12-18T12:01:56.799 helix_lsp::transport [INFO] tinymist <- {"jsonrpc":"2.0","id":1,"result":[{"originSelectionRange":{"end":{"character":5,"line":30},"start":{"character":1,"line":30}},"targetRange":{"end":{"character":9,"line":152},"start":{"character":5,"line":152}},"targetSelectionRange":{"end":{"character":9,"line":152},"start":{"character":5,"line":152}},"targetUri":"file:///home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ"}]}
2024-12-18T12:01:56.799 helix_lsp::transport [INFO] tinymist <- [{"originSelectionRange":{"end":{"character":5,"line":30},"start":{"character":1,"line":30}},"targetRange":{"end":{"character":9,"line":152},"start":{"character":5,"line":152}},"targetSelectionRange":{"end":{"character":9,"line":152},"start":{"character":5,"line":152}},"targetUri":"file:///home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ"}]
2024-12-18T12:01:56.802 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"typst","text":"#import \"@preview/scienceicons:0.0.6\": orcid-icon\n\n#let resume(\n  author: \"\",\n  pronouns: \"\",\n  location: \"\",\n  email: \"\",\n  github: \"\",\n  linkedin: \"\",\n  phone: \"\",\n  personal-site: \"\",\n  orcid: \"\",\n  accent-color: \"#000000\",\n  font: \"New Computer Modern\",\n  body,\n) = {\n\n  // Sets document metadata\n  set document(author: author, title: author)\n\n  // Document-wide formatting, including font and margins\n  set text(\n    // LaTeX style font\n    font: font,\n    size: 10pt,\n    lang: \"en\",\n    // Disable ligatures so ATS systems do not get confused when parsing fonts.\n    ligatures: false\n  )\n\n  // Reccomended to have 0.5in margin on all sides\n  set page(\n    margin: (0.5in),\n    \"us-letter\",\n  )\n\n  // Link styles\n  show link: underline\n\n\n  // Small caps for section titles\n  show heading.where(level: 2): it => [\n    #pad(top: 0pt, bottom: -10pt, [#smallcaps(it.body)])\n    #line(length: 100%, stroke: 1pt)\n  ]\n\n  // Accent Color Styling\n  show heading: set text(\n    fill: rgb(accent-color),\n  )\n\n  show link: set text(\n    fill: rgb(accent-color),\n  )\n\n  // Name will be aligned left, bold and big\n  show heading.where(level: 1): it => [\n    #set align(left)\n    #set text(\n      weight: 700,\n      size: 20pt,\n    )\n    #pad(it.body)\n  ]\n\n  // Level 1 Heading\n  [= #(author)]\n\n  // Personal Info Helper\n  let contact-item(value, prefix: \"\", link-type: \"\") = {\n    if value != \"\" {\n      if link-type != \"\" {\n        link(link-type + value)[#(prefix + value)]\n      } else {\n        value\n      }\n    }\n  }\n\n  // Personal Info\n  pad(\n    top: 0.25em,\n    align(left)[\n      #{\n        let items = (\n          contact-item(pronouns),\n          contact-item(phone),\n          contact-item(location),\n          contact-item(email, link-type: \"mailto:\"),\n          contact-item(github, link-type: \"https://\"),\n          contact-item(linkedin, link-type: \"https://\"),\n          contact-item(personal-site, link-type: \"https://\"),\n          contact-item(orcid, prefix: [#orcid-icon(color: rgb(\"#AECD54\"))orcid.org/], link-type: \"https://orcid.org/\"),\n        )\n        items.filter(x => x != none).join(\"  |  \")\n      }\n    ],\n  )\n\n  // Main body.\n  set par(justify: true)\n\n  body\n}\n\n// Generic two by two component for resume\n#let generic-two-by-two(\n  top-left: \"\",\n  top-right: \"\",\n  bottom-left: \"\",\n  bottom-right: \"\",\n) = {\n  [\n    #top-left #h(1fr) #top-right \\\n    #bottom-left #h(1fr) #bottom-right\n  ]\n}\n\n// Generic one by two component for resume\n#let generic-one-by-two(\n  left: \"\",\n  right: \"\",\n) = {\n  [\n    #left #h(1fr) #right\n  ]\n}\n\n// Cannot just use normal --- ligature becuase ligatures are disabled for good reasons\n#let dates-helper(\n  start-date: \"\",\n  end-date: \"\",\n) = {\n  start-date + \" \" + $dash.em$ + \" \" + end-date\n}\n\n// Section components below\n#let edu(\n  institution: \"\",\n  dates: \"\",\n  degree: \"\",\n  gpa: \"\",\n  location: \"\",\n) = {\n  generic-two-by-two(\n    top-left: strong(institution),\n    top-right: location,\n    bottom-left: emph(degree),\n    bottom-right: emph(dates),\n  )\n}\n\n#let work(\n  title: \"\",\n  dates: \"\",\n  company: \"\",\n  location: \"\",\n) = {\n  generic-two-by-two(\n    top-left: strong(title),\n    top-right: dates,\n    bottom-left: company,\n    bottom-right: emph(location),\n  )\n}\n\n#let project(\n  role: \"\",\n  name: \"\",\n  url: \"\",\n  dates: \"\",\n) = {\n  generic-one-by-two(\n    left: {\n      if role == \"\" {\n        [*#name* #if url != \"\" and dates != \"\" [ (#link(\"https://\" + url)[#url])]]\n      } else {\n        [*#role*, #name #if url != \"\" and dates != \"\"  [ (#link(\"https://\" + url)[#url])]]\n      }\n    },\n    right: {\n      if dates == \"\" and url != \"\" {\n        link(\"https://\" + url)[#url]\n      } else {\n        dates\n      }\n    },\n  )\n}\n\n#let certificates(\n  name: \"\",\n  issuer: \"\",\n  url: \"\",\n  date: \"\",\n) = {\n  [\n    *#name*, #issuer\n    #if url != \"\" {\n      [ (#link(\"https://\" + url)[#url])]\n    }\n    #h(1fr) #date\n  ]\n}\n\n#let extracurriculars(\n  activity: \"\",\n  dates: \"\",\n) = {\n  generic-one-by-two(\n    left: strong(activity),\n    right: dates,\n  )\n}\n","uri":"file:///home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ","version":0}}}
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  sync_lsp] notifying textDocument/didOpen - at Instant { tv_sec: 581070, tv_nsec: 120939527 }\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::server] did open Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ\", query: None, fragment: None }\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::server] create source: \"/home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ\"\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z WARN  tinymist_query::entry] entry is not in any set root directory\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::actor::typ_client] the entry file of TypstActor(primary) is changing to EntryState { rooted: true, root: Some(\"/home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src\"), main: Some(/resume.typ) }\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::server] file focused[implicit,o]: Some(\"/home/manny/.cache/typst/packages/preview/basic-resume/0.2.1/src/resume.typ\")\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  sync_lsp] notifing textDocument/didOpen succeeded in 268.55µs\n"
2024-12-18T12:01:56.802 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::actor::editor] received status request(primary) Compiling\n"
2024-12-18T12:01:56.803 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  reflexo_typst::diag::console] Some(/resume.typ): compilation succeeded in 873.678µs\n"
2024-12-18T12:01:56.803 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::actor::editor] received diagnostics from primary:7: diag(Some(0))\n"
2024-12-18T12:01:56.803 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::actor::editor] received status request(primary) CompileSuccess\n"
2024-12-18T12:01:56.803 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:56Z INFO  tinymist::task::cache] CacheEvictTask: evict cache in 21.62µs\n"
2024-12-18T12:01:57.671 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"shutdown","id":2}
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  sync_lsp] handling shutdown - (2) at Instant { tv_sec: 581070, tv_nsec: 990353834 }\n"
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  sync_lsp] handled  shutdown - (2) in 32.33µs\n"
2024-12-18T12:01:57.671 helix_lsp::transport [INFO] tinymist <- {"jsonrpc":"2.0","id":2,"result":null}
2024-12-18T12:01:57.671 helix_lsp::transport [INFO] tinymist <- null
2024-12-18T12:01:57.671 helix_lsp::transport [INFO] tinymist -> {"jsonrpc":"2.0","method":"exit"}
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  sync_lsp::transport] reader thread finished\n"
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  sync_lsp] notifying exit - at Instant { tv_sec: 581070, tv_nsec: 990679730 }\n"
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z WARN  sync_lsp] server is shutting down, while received notification exit\n"
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  sync_lsp::transport] writer thread finished\n"
2024-12-18T12:01:57.671 helix_lsp::transport [ERROR] tinymist err <- "[2024-12-18T17:01:57Z INFO  tinymist] language server did shut down\n"
@Myriad-Dreamin
Copy link
Owner

The log shows that the package cache path is not configured. We can investigate it further via:

  • You could pass the cache path by typstExtraArgs
  • Check that the environment variable is set when running the language server. helix might hide some environment variables.

@mmlb
Copy link
Author

mmlb commented Dec 19, 2024

One of these days I'll figure out how to run an lsp w/o my editor but not today... I was able to verify that the helix started/managed tinymist does have the env var present:

[22:18:16]-[~/p/g/m/resume]-[manny@zennix]
rm -rf ~/.cache/helix/helix.log ~/.cache/typst
[22:18:19]-[~/p/g/m/resume]-[manny@zennix]
ps aux | grep tinymist
manny    2468286  0.0  0.0   6740  2244 pts/0    S+   22:18   0:00 grep tinymist
[22:18:25]-[~/p/g/m/resume]-[manny@zennix]
hx src/ManuelMendez.typ
fish: Job 1, 'hx src/ManuelMendez.typ' has stopped
[22:18:27]-[~/p/g/m/resume]-[manny@zennix]
ps aux | grep tinymist
manny    2468390  3.6  0.0 4850712 33364 pts/0   Tl   22:18   0:00 /nix/store/vxwh3k7mhlqsfhq859nwhaipazk8qfc3-tinymist-0.12.0/bin/tinymist
manny    2468503  0.0  0.0   6740  2508 pts/0    S+   22:18   0:00 grep tinymist
[22:18:45]-[~/p/g/m/resume]-[manny@zennix]
strings /proc/2468390/environ | grep TYPST
TYPST_PACKAGE_CACHE_PATH=/home/manny/projects/github.com/mmlb/resume/typst

@Myriad-Dreamin Myriad-Dreamin added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants