Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: glojurelang/glojure
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: glojurelang/glojure
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: test-runner
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 30 files changed
  • 1 contributor

Commits on Sep 27, 2025

  1. Add glojure test runner

    Signed-off-by: James Hamlin <jfhamlin@gmail.com>
    jfhamlin committed Sep 27, 2025
    Configuration menu
    Copy the full SHA
    420ab36 View commit details
    Browse the repository at this point in the history
  2. non-zero exit code on fail

    Signed-off-by: James Hamlin <jfhamlin@gmail.com>
    jfhamlin committed Sep 27, 2025
    Configuration menu
    Copy the full SHA
    7c7c213 View commit details
    Browse the repository at this point in the history
  3. Set :name metadata on vars

    Signed-off-by: James Hamlin <jfhamlin@gmail.com>
    jfhamlin committed Sep 27, 2025
    Configuration menu
    Copy the full SHA
    4e9214a View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2025

  1. Use test runner in make test

    Signed-off-by: James Hamlin <jfhamlin@gmail.com>
    jfhamlin committed Sep 28, 2025
    Configuration menu
    Copy the full SHA
    a8a3da2 View commit details
    Browse the repository at this point in the history
  2. Replace standalone test runner with -m flag support

    This change integrates the test runner directly into the main glj command
    using the -m flag, matching Clojure's standard behavior for running
    namespace -main functions.
    
    Changes:
    - Add -m/--main flag support to gljmain.go to run namespace -main functions
    - Add parse-args function to test_runner.glj for CLI argument processing
    - Update test_runner.glj -main to handle command-line arguments
    - Update Makefile test targets to use 'glj -m glojure.test-runner'
    - Remove cmd/glj-test directory as standalone runner is no longer needed
    
    The test runner can now be invoked with:
      glj -m glojure.test-runner [options]
    
    This follows the standard Clojure convention and eliminates the need
    for a separate test runner binary.
    jfhamlin committed Sep 28, 2025
    Configuration menu
    Copy the full SHA
    5d9b908 View commit details
    Browse the repository at this point in the history
  3. Fix AOT namespace reloading issue that broke test runner

    This fixes a critical bug where AOT-compiled namespaces would reinitialize
    their vars (including *loaded-libs*) when required multiple times, causing
    test failures when using the test runner with dynamic bindings.
    
    Problem:
    - When clojure.data.generators required clojure.core, the AOT loader
      would reinitialize *loaded-libs*, removing previously loaded namespaces
    - This caused clojure.test to be reloaded inside the test runner's
      binding of t/report, leading to "no such method AddMethod" errors
      when defmethod tried to add methods to a bound function
    
    Solution:
    - Made AOT loaders idempotent by checking namespace metadata before
      initializing
    - Each LoadNS() function now:
      1. Checks if namespace has :aot-loaded metadata
      2. Returns immediately if already loaded
      3. Sets :aot-loaded metadata after initialization
    - This preserves *loaded-libs* and all other dynamic vars across
      multiple requires
    
    Changes:
    - Modified pkg/runtime/codegen.go to generate idempotent LoadNS functions
    - Regenerated all AOT loader files with the new logic
    - Updated Makefile test targets (from previous commit)
    
    This ensures AOT namespaces are only initialized once, preventing the
    corruption of global state like *loaded-libs* and fixing the multimethod
    binding issues in the test runner.
    jfhamlin committed Sep 28, 2025
    Configuration menu
    Copy the full SHA
    234d35c View commit details
    Browse the repository at this point in the history
Loading