{"id":16659654,"url":"https://github.com/xiongtx/reload-error-boot","last_synced_at":"2026-05-22T20:34:21.892Z","repository":{"id":67990087,"uuid":"109317271","full_name":"xiongtx/reload-error-boot","owner":"xiongtx","description":"Minimal repo for clojure-emacs/cider#2104.","archived":false,"fork":false,"pushed_at":"2017-12-20T23:39:04.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-12T04:50:22.515Z","etag":null,"topics":["boot","cider","clojure","clojurescript"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiongtx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-02T20:47:58.000Z","updated_at":"2017-11-02T20:55:28.000Z","dependencies_parsed_at":"2023-07-10T12:33:06.491Z","dependency_job_id":null,"html_url":"https://github.com/xiongtx/reload-error-boot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiongtx/reload-error-boot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongtx%2Freload-error-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongtx%2Freload-error-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongtx%2Freload-error-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongtx%2Freload-error-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiongtx","download_url":"https://codeload.github.com/xiongtx/reload-error-boot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongtx%2Freload-error-boot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33366523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","cider","clojure","clojurescript"],"created_at":"2024-10-12T10:26:06.782Z","updated_at":"2026-05-22T20:34:16.881Z","avatar_url":"https://github.com/xiongtx.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reload-error-boot\n\nMinimal repo for clojure-emacs/cider#2104.\n\nThis shows a problem with reloading the `clojure.test.check.generators` namespace without reloading the `clojure.spec.gen.alpha` namespace.\n\nSince `clojure.spec.gen.alpha` [doesn't `:require`](https://github.com/clojure/spec.alpha/blob/spec.alpha-0.1.143/src/main/clojure/clojure/spec/gen/alpha.clj#L9-L11) `clojure.test.check.generators`, but rather dynamically loads some of its vars, the reload dependency tracking doesn't work properly.\n\n## Usage\n\n1. `cider-jack-in`\n2. Go to `core.cljc` and `cider-eval-buffer`, `cider-refresh`, etc.\n   - See that generators for `clojure.spec.gen.alpha` and `clojure.test.check.generators` have the same classloaders:\n\n   ```\n   clojure.spec.alpha generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x73867ca9 clojure.lang.DynamicClassLoader@73867ca9]\n   clojure.test.check.generators generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x73867ca9 clojure.lang.DynamicClassLoader@73867ca9]\n   ```\n\n3. In the REPL, compile ClojureScript with `(boot (cljs))`\n4. `C-u cider-refresh` (`refresh-all`), then `cider-eval-buffer` again\n   - See that the generators now have different classloaders:\n\n   ```\n   clojure.spec.alpha generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x73867ca9 clojure.lang.DynamicClassLoader@73867ca9]\n   clojure.test.check.generators generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x170397bd clojure.lang.DynamicClassLoader@170397bd]\n   ```\n\n   In particular, that of `clojure.test.check.generators` has changed, while that of `clojure.spec.gen.alpha` ha  remained the same. This is because `clojure.test.check.generators` was reloaded by the `cider-refresh`, thereby redefining the `Generator` record, but `clojure.spec.gen.alpha` was not.\n\n   For more on records and classloaders, see [Chris Houser's StackOverflow explanation](https://stackoverflow.com/a/7473707/864684).\n5. Go to `clojure/spec/gen/alpha.clj` and eval the `lazy-combinators` form\n\n   ```clojure\n   (lazy-combinators hash-map list map not-empty set vector vector-distinct fmap elements\n                     bind choose fmap one-of such-that tuple sample return\n                     large-integer* double* frequency)\n   ```\n6. `cider-eval-buffer` and see that `clojure.spec.gen.alpha`'s generator now uses the `clojure.test.check.generators`'s classloader again:\n\n   ```\n   clojure.spec.alpha generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x170397bd clojure.lang.DynamicClassLoader@170397bd]\n   clojure.test.check.generators generator's classloader:  #object[clojure.lang.DynamicClassLoader 0x170397bd clojure.lang.DynamicClassLoader@170397bd]\n   ```\n\n## License\n\nCopyright © 2017 Tianxiang Xiong\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongtx%2Freload-error-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiongtx%2Freload-error-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongtx%2Freload-error-boot/lists"}