-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discuss: Remove public dir support #524
Conversation
The public dir was needed in the past to build packages. But with the recent changes to the registry this has become obsolete. Instead the registry can be directly pointed at a directory with packages. In the package storage this directory is called `packages`, I suggest we use this as a default. The registry itself could have its packages in the same directory. This PR is not complete, it is more to discuss the change.
@@ -39,6 +40,7 @@ func catchAll(public http.FileSystem, cacheTime time.Duration) func(w http.Respo | |||
func determineResourcePath(r *http.Request, public http.FileSystem) (string, error) { | |||
path := r.URL.Path | |||
|
|||
path = strings.Replace(path, "/package", "", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is odd but is needed as now all is at the top level
@mtojek I assume this also ties into your change you have planned for multiple paths? |
💔 Build FailedExpand to view the summary
Build stats
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Yes, it's draft currently: #525 |
I planned to leave type Config struct {
PublicDir string `config:"public_dir"` // left for legacy purposes
PackagesPaths []string `config:"packages_paths"`
CacheTimeSearch time.Duration `config:"cache_time.search"`
CacheTimeCategories time.Duration `config:"cache_time.categories"`
CacheTimeCatchAll time.Duration `config:"cache_time.catch_all"`
} |
The public dir was needed in the past to build packages. But with the recent changes to the registry this has become obsolete. Instead the registry can be directly pointed at a directory with packages. In the package storage this directory is called
packages
, I suggest we use this as a default. The registry itself could have its packages in the same directory.This PR is not complete, it is more to discuss the change.