Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make creation of source maps optional with a flag #1166

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

Merged
merged 3 commits into from
Oct 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions 7 tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func init() {

func main() {
var (
options = &gbuild.Options{CreateMapFile: true}
options = &gbuild.Options{}
pkgObj string
tags string
)
Expand All @@ -83,6 +83,7 @@ func main() {
compilerFlags.StringVar(&tags, "tags", "", "a list of build tags to consider satisfied during the build")
compilerFlags.BoolVar(&options.MapToLocalDisk, "localmap", false, "use local paths for sourcemap")
compilerFlags.BoolVarP(&options.NoCache, "no_cache", "a", false, "rebuild all packages from scratch")
compilerFlags.BoolVarP(&options.CreateMapFile, "source_map", "s", true, "disable generation of source maps")
akolybelnikov marked this conversation as resolved.
Show resolved Hide resolved

flagWatch := pflag.NewFlagSet("", 0)
flagWatch.BoolVarP(&options.Watch, "watch", "w", false, "watch for changes to the source files")
Expand Down Expand Up @@ -507,7 +508,7 @@ func main() {
}

// Create a new session eagerly to check if it fails, and report the error right away.
// Otherwise users will see it only after trying to serve a package, which is a bad experience.
// Otherwise, users will see it only after trying to serve a package, which is a bad experience.
_, err := gbuild.NewSession(options)
if err != nil {
return err
Expand Down Expand Up @@ -725,7 +726,7 @@ func (fs serveCommandFileSystem) serveSourceTree(xctx gbuild.XContext, reqPath s
// directories, which no longer align with import paths.
//
// We don't know which part of the requested path is package import path and
// which is a path under the package directory, so we try different slipt
// which is a path under the package directory, so we try different split
// points until the package is found successfully.
for i := len(parts); i > 0; i-- {
pkgPath := path.Clean(path.Join(parts[:i]...))
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.