Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Compiler output should be relative to a fixed point #406

@davecheney

Description

@davecheney

Having the compiler output a unique file path when compilation fails has been a long standing issue, see #57, #79, #99.

#57 changed to make paths relative to $PROJECT, but this since regressed :(

#395 #377 addressed the regression, by making the output relative to the current working directory.

This is a tracking issue to come up with a better plan than the piecemeal solutions so far.

Requirements:

  • must handle -R, ie don't assume that the current working directory is inside the project.
  • must handle temporary files created in context.Workdir(), which may not be in the same filesystem namespace as the $PROJECT, so may not be compatible with filepath.Rel, ie. C:\TMP and D:\SOURCE\PROJECT. This also includes the generated test packages, and cgo.
  • must be tested, preferably without doing a full end to end test of cmd/gb, ie. whatever functions generate the file paths passed to the compiler should be unit tested.

/cc @fatih, @inconshreveable, @tianon

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions