Skip to content
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

Add source mapping to codegen'd LLB #154

Merged
merged 1 commit into from
Jul 24, 2020
Merged

Conversation

hinshun
Copy link
Contributor

@hinshun hinshun commented May 21, 2020

  • Source maps runtime LLB errors back to HLB (incl. a stacktrace)
 => ERROR copy /foo /                                                                                                                                                 0.0s
------
 > copy /foo /:
------
foo.hlb:2
--------------------
   1 |     fs func1() {
   2 | >>> 	func2
   3 |     }
   4 |
--------------------
foo.hlb:6
--------------------
   4 |
   5 |     fs func2() {
   6 | >>> 	func3
   7 |     }
   8 |
--------------------
foo.hlb:11
--------------------
   9 |     fs func3(){
  10 |     	scratch
  11 | >>> 	copy fs {
  12 |     		image "alpine"
  13 |     	} "/foo" "/"
--------------------
failed to solve: rpc error: code = Unknown desc = failed to compute cache key: "/foo" not found: not found

TODO

err = p.Wait()
if err != nil {
for _, source := range errdefs.Sources(err) {
source.Print(os.Stderr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add an ErrOutput os.Writer to the RunOptions so we can use that here and plumb it through from newt.

@hinshun hinshun force-pushed the sourcemap branch 2 times, most recently from fb784ea to 1e15bc2 Compare May 25, 2020 17:11
@hinshun hinshun force-pushed the sourcemap branch 2 times, most recently from 785b5b0 to f108007 Compare June 24, 2020 18:06
@hinshun hinshun marked this pull request as ready for review July 14, 2020 19:18
@hinshun hinshun requested review from coryb and slushie July 14, 2020 19:21
@hinshun hinshun merged commit 1a648b1 into openllb:master Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants