Skip to content

Fix Decline NPE, add //> using files directive to auto-include src/#92

Closed
Copilot wants to merge 7 commits intolaikafrom
copilot/implement-tech-conversion-plan-again
Closed

Fix Decline NPE, add //> using files directive to auto-include src/#92
Copilot wants to merge 7 commits intolaikafrom
copilot/implement-tech-conversion-plan-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 8, 2026

Two bugs: a runtime NullPointerException crashing every build/serve/verify invocation, and src/ having to be passed explicitly on every Scala CLI command.

Runtime NullPointerException in Build

Classic Scala object init-order bug. command was declared first but referenced buildCmd/serveCmd/verifyCmd — all still null at that point. Decline stored the nulls and blew up during argument parsing:

NullPointerException: Cannot invoke "com.monovore.decline.Command.name()" because "command" is null
    at com.monovore.decline.Help$.collectCommandHelp(Help.scala:286)

Fixed by moving the three sub-command vals above command in src/Build.scala.

Auto-include src/ via directive

Added //> using files "./src/" to build.scala so the source directory is baked into the build descriptor. Cleaned up the now-redundant explicit src/ argument from:

  • Makefilescala-compile and scala-build targets
  • .github/workflows/build.yml — both compile and run steps

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • central.sonatype.com
    • Triggering command: /home/REDACTED/.cache/coursier/v1/https/github.com/VirtusLab/scala-cli/releases/download/v1.12.4/scala-cli-x86_64-pc-linux /home/REDACTED/.cache/coursier/v1/https/github.com/VirtusLab/scala-cli/releases/download/v1.12.4/scala-cli-x86_64-pc-linux compile ./build.scala (dns block)
  • repo.scala-lang.org
    • Triggering command: /home/REDACTED/.cache/coursier/v1/https/github.com/VirtusLab/scala-cli/releases/download/v1.12.4/scala-cli-x86_64-pc-linux /home/REDACTED/.cache/coursier/v1/https/github.com/VirtusLab/scala-cli/releases/download/v1.12.4/scala-cli-x86_64-pc-linux compile ./build.scala (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…d PR CI job

Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com>
Copilot AI changed the title [WIP] Start implementing plan for tech conversion to Laika Start Jekyll → Laika migration: W0.5 PR workflow bootstrap + W1 build scaffold Mar 8, 2026
Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com>
Copilot AI changed the title Start Jekyll → Laika migration: W0.5 PR workflow bootstrap + W1 build scaffold Add Decline for typed CLI parsing and update all dependencies Mar 8, 2026
@alexandru alexandru marked this pull request as ready for review March 8, 2026 09:50
Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com>
Copilot AI changed the title Add Decline for typed CLI parsing and update all dependencies Fix broken build: invalid Scala version + missing src/ in CI compile step Mar 8, 2026
…op src/ from commands

Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com>
Copilot AI changed the title Fix broken build: invalid Scala version + missing src/ in CI compile step Fix Decline NPE, add //> using files directive to auto-include src/ Mar 8, 2026
@alexandru alexandru closed this Mar 9, 2026
@alexandru alexandru deleted the copilot/implement-tech-conversion-plan-again branch March 9, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants