luminus-framework / luminus-framework/luminus-template
Need to refresh twice to reload routes
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 648
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
The current template requires reloading page twice before any route change takes effect.
**Steps to reproduce:**
1. Make change to routing data and save file
2. Refresh page
**Expected:**
New routing data works
**Observed:**
Old routing data is still in effect. When page is refreshed again, new routing data will take effect.
**Analysis:**
According to the logs, the first refresh did trigger namespace recompile, but somehow the old handler is still used to process the request. The second refresh does not trigger recompile, but the new handler is used.
I suspect this has something to do with commit 8f177df4e994aeea1e48af299ce1918b58256261
I rolled back `handler/app` from `mount/defstate` to plain old function and the issue is fixed. I am not sure if this has something to do with `reitit` or not.
**Additional information:**
I am using `immutant` as the http server. This should not make a difference though.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting handler/app and commit 8f177df4e994aeea1e48af299ce1918b58261, then reproduce the routing-data change with Immutant and compare the first and second refresh. Check how the recompiled namespace and handler are selected during the first request. Done means one refresh applies the new routing data without requiring a second refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100