@@ -67,7 +67,7 @@ func init() {
67
67
68
68
func main () {
69
69
var (
70
- options = & gbuild.Options {CreateMapFile : true }
70
+ options = & gbuild.Options {}
71
71
pkgObj string
72
72
tags string
73
73
)
@@ -83,6 +83,7 @@ func main() {
83
83
compilerFlags .StringVar (& tags , "tags" , "" , "a list of build tags to consider satisfied during the build" )
84
84
compilerFlags .BoolVar (& options .MapToLocalDisk , "localmap" , false , "use local paths for sourcemap" )
85
85
compilerFlags .BoolVarP (& options .NoCache , "no_cache" , "a" , false , "rebuild all packages from scratch" )
86
+ compilerFlags .BoolVarP (& options .CreateMapFile , "source_map" , "s" , true , "disable generation of source maps" )
86
87
87
88
flagWatch := pflag .NewFlagSet ("" , 0 )
88
89
flagWatch .BoolVarP (& options .Watch , "watch" , "w" , false , "watch for changes to the source files" )
@@ -507,7 +508,7 @@ func main() {
507
508
}
508
509
509
510
// Create a new session eagerly to check if it fails, and report the error right away.
510
- // Otherwise users will see it only after trying to serve a package, which is a bad experience.
511
+ // Otherwise, users will see it only after trying to serve a package, which is a bad experience.
511
512
_ , err := gbuild .NewSession (options )
512
513
if err != nil {
513
514
return err
@@ -725,7 +726,7 @@ func (fs serveCommandFileSystem) serveSourceTree(xctx gbuild.XContext, reqPath s
725
726
// directories, which no longer align with import paths.
726
727
//
727
728
// We don't know which part of the requested path is package import path and
728
- // which is a path under the package directory, so we try different slipt
729
+ // which is a path under the package directory, so we try different split
729
730
// points until the package is found successfully.
730
731
for i := len (parts ); i > 0 ; i -- {
731
732
pkgPath := path .Clean (path .Join (parts [:i ]... ))
0 commit comments