Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

applied sync.Once to make 'app' to be the only root App #229

Merged
merged 2 commits into from
Oct 1, 2022

Conversation

sio4
Copy link
Member

@sio4 sio4 commented Sep 27, 2022

(This is a fix for the v1)

Applied sync.Once for app initialization (template for scaffold) to fix #228 and gobuffalo/buffalo#1653. (actually the same issue, but keep them all in each project since this issue could be imaged as the core library's issue) It also related to the review discussion on gobuffalo/buffalo#2239.

For the long term, this issue could be resolved by gobuffalo/buffalo#2240

The first commit fixes the App() to use sync.Once for the initialization function. To make the CLI compatible with the old version of apps which was created with old versions, the second commit treats those errors and fallback to the old method.

It could be better to have a fixer for this, and I am considering that.

fixes #228
fixes gobuffalo/buffalo#1653

@sio4 sio4 added the bug Something isn't working label Sep 27, 2022
@sio4 sio4 added this to the v1.0.0 milestone Sep 27, 2022
@sio4 sio4 requested a review from a team September 27, 2022 16:21
@sio4 sio4 self-assigned this Sep 27, 2022
@sio4 sio4 merged commit 0e3b085 into main Oct 1, 2022
@sio4 sio4 deleted the app-should-be-the-only branch October 1, 2022 01:08
@sio4 sio4 mentioned this pull request Oct 2, 2022
sio4 added a commit that referenced this pull request Oct 8, 2022
paganotoni added a commit that referenced this pull request Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant