Skip to content

Commit

Permalink
Annihilate references to embedclientzip
Browse files Browse the repository at this point in the history
This broken misfeature of Hypcast's asset embedding is now permanently
removed.
  • Loading branch information
ahamlinman committed Sep 7, 2024
1 parent 5dd7606 commit 5816c2d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
hypcast-server: go.mod go.sum $(shell find . -name '*.go') client/dist
go build -v -tags embedclient ./cmd/hypcast-server

client/assets.zip: client/dist
rm -f client/assets.zip
cd client/dist && zip -r ../assets.zip .

client/dist: client/node_modules client/tsconfig.json client/tsconfig.node.json client/vite.config.ts $(shell find client/src -type f)
rm -rf client/dist
cd client && yarn build
Expand Down
1 change: 0 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/coverage

# production
/assets.zip
/dist

# misc
Expand Down
12 changes: 4 additions & 8 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ package client

import "io/fs"

// Build embeds the Hypcast client when the "embedclient" or "embedclientzip"
// build tag is set. When Build is nil, embedded client assets are not
// available. When it is not nil, it is rooted inside of the output directory
// produced by the client build process, such that index.html will be at the
// root.
// Build embeds the Hypcast client when the "embedclient" build tag is set.
//
// The "embedclientzip" build tag is deprecated. The resulting FS is broken,
// defective, and invalid, as its files do not meet the clearly documented
// http.FS requirement for the files to implement io.Seeker.
// When Build is nil, embedded client assets are not available. When it is not
// nil, its root is inside the output directory of the client build process,
// such that index.html is at the top level.
var Build fs.FS
2 changes: 1 addition & 1 deletion client/client_embedclient.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build embedclient && !embedclientzip
//go:build embedclient

package client

Expand Down
21 changes: 0 additions & 21 deletions client/client_embedclientzip.go

This file was deleted.

0 comments on commit 5816c2d

Please sign in to comment.