Skip to content

Include root and build context in dune describe#6092

Closed
zpyemont wants to merge 0 commit intoocaml:mainfrom
zpyemont:main
Closed

Include root and build context in dune describe#6092
zpyemont wants to merge 0 commit intoocaml:mainfrom
zpyemont:main

Conversation

@zpyemont
Copy link
Copy Markdown
Contributor

For ROTOR we would like to have access to the original source files, not their locations within the build directory. To get this, we need the build context and the workspace root. This is an updated PR of #3834.

In this PR the build prefix and the path to the workspace root are added the the beginning of the output of dune describe.

@zpyemont zpyemont force-pushed the main branch 2 times, most recently from debd3d4 to 1a8774a Compare August 22, 2022 15:59
@rgrinberg
Copy link
Copy Markdown
Member

@esope are we ok with this?

@esope
Copy link
Copy Markdown
Collaborator

esope commented Aug 23, 2022

I think that having this extra info in the output of dune describe is indeed useful.
I would suggest, however, the following change to the current implementation, so that it follows better the way dune describe works:

  • do not augment the S-exp output produced by Descr.Workspace.to_dyn with your extra data
  • instead, modify Crawl.workspace so that you add your extra data to a well typed representation (you will need to change the type definitions), then modify Sanitize_for_tests.Workspace.sanitize so that it sanitizes your extra data, and finally convert the whole to S-expressions by modifying Descr.Workspace.to_dyn.
    I think this way, the code will be easier to maintain in the future.

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.

3 participants