Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !602

Resolve "Don't print file/location information in stack trace for interactive environments"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Quinten Cabo requested to merge 2528-don-t-print-file-location-information-in-stack-trace-for-interactive-environments into develop Jan 28, 2026
  • Overview 0
  • Commits 2
  • Changes 7

Closes #2528 by adding -st-filename and -st-exclude-line-col stack trace compiler flags. These flags allow us to deal with the case where you generate SaC code from Jupyter notebooks, but you do want to point back to the original source code.

You can now do this by setting -st-filename to the name or Path of the Jupyter notebook file and use -st-exclude-line-col to remove the line and col numbers behind the filename from those frames.

Note that -st-filename and -st-exclude-line-col only affect the current compilation unit because they work by changing the values of the inserted virtual stack push functions for the module that is being compiled. The push functions of other modules stay in tact so libraries called from the notebook will still have their own file location along with line numbers as long as they themselves have not been compiled with -st-filename and -st-exclude-line-col.

I also added another flag because why not. If you do not care about the file location at all use -st-hide-locations or the rterror::stackSetShowLocations function to remove any file location information from the stack trace. This is a global Stack flag and will affect all call frames, it is just a cosmetic change and it does not change the data that is stored in the virtual stack. You do not need this flag to solve the notebook issue.

Edited Jan 28, 2026 by Quinten Cabo
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2528-don-t-print-file-location-information-in-stack-trace-for-interactive-environments