Skip to content
Snippets Groups Projects

Make function names safe in schedule dot

Closed Aaron Councilman requested to merge schedule_dot into main
1 unresolved thread
  • Replace "." and "-" with "__"; Juno generates function names that include "." but this seems to produce issues with dot.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Aaron Councilman requested review from @rarbore2

    requested review from @rarbore2

    • Is this not an issue in Hercules IR xdot as well?

    • Yes, actually I made that change on a different branch and just never noticed that I didn't merge it into main (I wasn't using dots in Juno function names in the version on main). I'll add that here as well, if that's alright with you.

      As a note, if I use dots in function names (which is my preference because it avoids possible conflicts with user names) we may need to be careful in the proc macro to only generate rust code for entry functions (for which I'll only generate valid rust/juno names)

    • The proc macro needs to generate non-entry async functions, since those need to be callable. Under what circumstances do we generate dots in function names?

    • I'm using dots to distinguish different instantiations of polymorphic functions, we can probably just replace '.' with '__' or some other naming convention

    • Ah. I suppose the best solution would be to use a character valid in Rust function names, but not Juno function names.

    • Please register or sign in to reply
  • Looking at the Rust docs, I think our best choice is to generate names in the format _<uid>_<name> for non-entry functions (entry functions are non-polymorphic and their names are preserved) since Rust allows identifiers to have leading underscores but Juno does not. This will mean we shouldn't need to change the names for dot. I'll close this MR and include this fix in my Juno MR (coming soon).

Please register or sign in to reply
Loading