-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Remove public/css from git #6782
Comments
Problem is that you won't be able to build gitea from source without nodejs |
Yes, it would be a build requirement, just like golang is. I really think that is not too much to ask for, it's available pretty much anywhere. |
Also, it will be a requirement for proper frontend JS packaging, so I see it unavoidable to depend on it. |
Related to #6203 (this is CSS, the other is about JS) |
It will also require a working internet connection towards Generally I'm in favor of downloading all build dependencies (including go modules) on-demand rather then vendoring them. I see that the golang community prefers to vendor dependencies, which may come from the fact that golang has no central repository for its modules, but in the JS world it's the accepted way to depend on the npm registry. The only other option is to vendor |
@silverwind I think the vendoring for go projects will drop with module (select the needed version from local cache and not the one in GOPATH), the creation of go proxy/cache for Go1.13 (that will limit the downtime and disapearing module) and mostly the fact that depending libs are more stable than before (less removal or rename) |
For the docker build, we will need them at the build stage to build the binary but not at the last (release) stage. |
But even with a local cache of go modules, isn't it still quite risky to depend on GitHub repos? When they are deleted, it would break our build, right? In contrast, npm guarantees that no package is ever deleted (except in a very limited timeframe after publish). |
Go1.13 will support mirror/proxy that will mitigate that problem (if the licence permit it). https://blog.golang.org/modules2019 |
@sapk that will not work on China and as I know also there are some offline workspace which will never not connect to internet. |
@lunny It already exist some open-source implementation of the proxy. They hope that some proxy will be maintain by local community and the proxy and sum server is configurable. |
@lunny Is a offline build a requirement? We should decide either to ship everything (vendoring both golang and node modules) or nothing (pull from npm/go proxy on build) in git. |
We can compile and run gitea offline without vendoring node modules, but we can't without vendoring go modules. |
Currently yes, but only because JS modules are vendored in a non-standard fashion. Once those move to |
except nodejs, could we have any other options to organization javascript modules? |
Not that I'm aware of. Bower was at one time the primary frontend package manager, but its days are past and everyone today seems to rely on either |
The recent introduction of the JS build process brought up this pain point again for JS. Every time we push a JS change, all pull requests with more JS changes will conflict. This is very bad for testing among other things. I think it's time to drop them from git and require Node.js as a build-time dependency. |
- Added Node.js as build dependency and removes build files from git. - Added version checks for both Go and Node.js. - Overhauled the js/css make target to only run when needed. - Merged the `generate` make target into `build` as per suggestion. Fixes: go-gitea#6782 Fixes: go-gitea#9216
Having
public/css
tracked in git causes merge conflicts on any CSS change. Can we remove it from git and require a working Node.js installation to build the CSS?Regarding release builds, can someone shed some light on how they are done? Would we need add Node.js installation to the Dockerfile for the releases to be able to build CSS?
The text was updated successfully, but these errors were encountered: