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

Asset3D:s constructors are named differently in C++ and Rust #6881

Open
emilk opened this issue Jul 13, 2024 · 1 comment
Open

Asset3D:s constructors are named differently in C++ and Rust #6881

emilk opened this issue Jul 13, 2024 · 1 comment
Labels
🪵 Log & send APIs Affects the user-facing API for all languages 🐍 Python API Python logging API 🏎️ Quick Issue Can be fixed in a few hours or less 🦀 Rust API Rust logging API
Milestone

Comments

@emilk
Copy link
Member

emilk commented Jul 13, 2024

In C++ we have from_file and from_bytes.
In Rust we have from_file and from_file_contents.

Basically we have two sources we care about:

  • A file path
  • The contents of a file

from_file_contents is very descriptive, so I think it winds out over from_byte.

from_file isn't great though - I could easily see someone be confused and pass a path to that (which I would not be surprised if it worked on some C++ compilers).

So I suggest we go with: from_file_path and from_file_contents.
Or shorten it to: from_path and from_contents.

Whatever we chose, we should pick the same for the new ImageEncoded.

We should also keep the old functions with a deprecation marker.

Python

In Python we use named arguments instead, and those are named path and contents, which I think are good, and go well with the suggested names.

@emilk emilk added 🐍 Python API Python logging API 🦀 Rust API Rust logging API 🪵 Log & send APIs Affects the user-facing API for all languages labels Jul 13, 2024
@emilk emilk added this to the 0.18 - Chunks and MHz scalars milestone Jul 13, 2024
@emilk emilk modified the milestones: 0.18 - MHz logging, 0.19 Aug 28, 2024
@emilk emilk mentioned this issue Aug 28, 2024
6 tasks
@emilk
Copy link
Member Author

emilk commented Sep 10, 2024

We now have VideoAsset too, so high time to make this consistent

@emilk emilk modified the milestones: 0.20 - Maps, H.264, Triage Nov 11, 2024
@emilk emilk added the 🏎️ Quick Issue Can be fixed in a few hours or less label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪵 Log & send APIs Affects the user-facing API for all languages 🐍 Python API Python logging API 🏎️ Quick Issue Can be fixed in a few hours or less 🦀 Rust API Rust logging API
Projects
None yet
Development

No branches or pull requests

2 participants