[ 
https://issues.apache.org/jira/browse/HTRACE-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14586478#comment-14586478
 ] 

Colin Patrick McCabe edited comment on HTRACE-183 at 6/15/15 6:51 PM:
----------------------------------------------------------------------

Thanks for sticking with this.  Latest patch looks good except for one thing:

bq. It breaks htraced being able to get to its web dir by doing ../../web so 
can't do in-situ web development unless you set "HTRACED_WEB_DIR" to point at 
web dir.

Well, let's just change this code:
{code}
279             // Default Handler. This will serve requests for static 
requests.
280             webdir := os.Getenv("HTRACED_WEB_DIR")
281             if webdir == "" {
282                     webdir, err = 
filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "..", "..", "web"))  <=== 
remove one ".."
283     
284                     if err != nil {
285                             return nil, err
286                     }
287             }
{code}

\[edit: I see you also filed HTRACE-187 for this.  Can we do it in this change? 
 Would be nice to avoid breaking stuff if possible, even if it's only for one 
or two changes.\]


was (Author: cmccabe):
Thanks for sticking with this.  Latest patch looks good except for one thing:

bq. It breaks htraced being able to get to its web dir by doing ../../web so 
can't do in-situ web development unless you set "HTRACED_WEB_DIR" to point at 
web dir.

Well, let's just change this code:
{code}
279             // Default Handler. This will serve requests for static 
requests.
280             webdir := os.Getenv("HTRACED_WEB_DIR")
281             if webdir == "" {
282                     webdir, err = 
filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "..", "..", "web"))  <=== 
remove one ".."
283     
284                     if err != nil {
285                             return nil, err
286                     }
287             }
{code}

> Have go build into the target dir rather than under src
> -------------------------------------------------------
>
>                 Key: HTRACE-183
>                 URL: https://issues.apache.org/jira/browse/HTRACE-183
>             Project: HTrace
>          Issue Type: Task
>            Reporter: stack
>         Attachments: 183.txt, 183v2.txt, 183v3.txt
>
>
> Go creates a build subdir in the src subtree and then creates its binaries 
> therein. Instead have it make a mess over in the target dir.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to