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

improve language of templates #2444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uniffi_bindgen/src/bindings/kotlin/templates/wrapper.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
// This file was autogenerated by the `uniffi` crate.
// DO NOT manually edit this file.

{%- call kt::docstring_value(ci.namespace_docstring(), 0) %}

Expand Down
4 changes: 2 additions & 2 deletions uniffi_bindgen/src/bindings/python/templates/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- call py::docstring_value(ci.namespace_docstring(), 0) %}

# This file was autogenerated by some hot garbage in the `uniffi` crate.
# Trust me, you don't want to mess with it!
# This file was autogenerated by the `uniffi` crate.
# DO NOT manually edit this file.

# Common helper code.
#
Expand Down
4 changes: 2 additions & 2 deletions uniffi_bindgen/src/bindings/ruby/templates/wrapper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by some hot garbage in the `uniffi` crate.
# Trust me, you don't want to mess with it!
# This file was autogenerated by the `uniffi` crate.
# DO NOT manually edit this file.

# Common helper code.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
// This file was autogenerated by the `uniffi` crate.
// DO NOT manually edit this file.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open class {{ impl_class_name }}: {{ protocol_name }}, @unchecked Sendable {
public init() {}
}

// TODO: We'd like this to be `private` but for Swifty reasons,
// TODO: We'd like this to be `private` but for Swift reasons,
// we can't implement `FfiConverter` without making this `required` and we can't
// make it `required` without making it `public`.
#if swift(>=5.8)
Expand Down
6 changes: 3 additions & 3 deletions uniffi_bindgen/src/bindings/swift/templates/wrapper.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
// This file was autogenerated by the `uniffi` crate.
// DO NOT manually edit this file.
Copy link

Choose a reason for hiding this comment

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

You use "DO NOT manually edit this file." here but in other templates you keep "Trust me, you don't want to mess with it!"

Personally I think the original "Trust me, you don't want to mess with it!" is fine

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, Joe-- not sure why my IDE didn't pick up these changes. Pushed the changes.

Trust me, you don't want to mess with it!

While I agree with personally this language didn't bother me, it did get flagged in an internal audit on our end, which is my motivation for the change.

Open to other language suggestions here, but thought I'd open this PR in case others had similar thoughts / experiences.

Thank you for the consideration.

Copy link

Choose a reason for hiding this comment

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

it did get flagged in an internal audit on our end

Don't have strong opinion either way, but I'm curious... is this an automated tool that picked up these comments or a manual audit?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure, but I believe it was a manual audit-- not sure if a (or what) tool was used.


// swiftlint:disable all

Expand All @@ -13,7 +13,7 @@ import {{ imported_class }}

// Depending on the consumer's build setup, the low-level FFI code
// might be in a separate module, or it might be compiled inline into
// this module. This is a bit of light hackery to work with both.
// this module.
#if canImport({{ config.ffi_module_name() }})
import {{ config.ffi_module_name() }}
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was autogenerated by some hot garbage in the `uniffi` crate.
// This file was autogenerated by the `uniffi` crate.
// Trust me, you don't want to mess with it!
{% import "macros.rs" as rs %}

Expand Down