10000 Comparing v1.10.0...v1.11.0 · uber-go/atomic · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uber-go/atomic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.10.0
Choose a base ref
...
head repository: uber-go/atomic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.11.0
Choose a head ref
  • 6 commits
  • 26 files changed
  • 5 contributors

Commits on Sep 6, 2022

  1. chore(gen-*): Move templates into external files (#121)

    This moves the templates used by gen-atomicint and gen-atomicwrapper
    into external files embedded into the corresponding gen binary with
    go:embed.
    abhinav authored Sep 6, 2022
    Configuration menu
    Copy the full SHA
    159e329 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Implement String method for pointers (#122)

    * Implement String method for pointers
    
    By implementing this method ourselves using atomic
    loading and fmt.Sprint, we can avoid possible unguarded
    accesses to the embedded pointer if someone attempts to
    fmt.Print the atomic.Pointer
    .
    
    * Use Pointer.Load, not wrapped.Load
    
    Co-authored-by: Abhinav Gupta <abg@uber.com>
    josephinedotlee and abhinav authored Sep 20, 2022
    Configuration menu
    Copy the full SHA
    78a3b8e View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Fix Swap and CompareAndSwap for Value wrappers (#130)

    * Regenerate code to update copyright end year to 2023
    
    * Test behaviour of default values initialized in different ways
    
    This adds repro tests for #126 and #129
    
    * Fix Swap and CompareAndSwap for Value wrappers
    
    Fixes #126, #129
    
    All atomic types can be used without initialization, e.g., `var v
    <AtomicType>`. This works fine for integer types as the initialized
    value of 0 matches the default value for the user-facing type.  However,
    for Value wrappers, they are initialized to `nil`, which is a value that
    can't be set (triggers a panic) so the default value for the user-facing
    type is forced to be stored as a different value. This leads to multiple
    possible values representing the default user-facing type.
    
    E.g., an `atomic.String` with value `""` may be represented by the
    underlying atomic as either `nil`, or `""`. This causes issues when we
    don't handle the `nil` value correctly, causing to panics in `Swap` and
    incorrectly not swapping values in `CompareAndSwap`.
    
    This change fixes the above issues by:
     * Requiring `pack` and `unpack` function in gen-atomicwrapper as the
       only place we weren't supplying them was for `String`, and the
       branching adds unnecessary complexity, especially with added `nil`
       handling.
     * Extending `CompareAndSwap` for `Value` wrappers to try an additional
       `CompareAndSwap(nil, <new>)` only if the original `CompareAndSwap`
       fails and the old value is the zero value.
    prashantv authored Feb 6, 2023
    Configuration menu
    Copy the full SHA
    1505d28 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Minimize permissions to CI workflows (#133)

    Set only read permission on CI workflows since they don't need write access.
    
    Fixes #132.
    sywhang authored Mar 20, 2023
    Configuration menu
    Copy the full SHA
    544d6aa View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Preparing release v1.11.0

    manjari25 committed May 2, 2023
    Configuration menu
    Copy the full SHA
    2a750c4 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Update CHANGELOG.md

    manjari25 committed May 3, 2023
    Configuration menu
    Copy the full SHA
    76f817c View commit details
    Browse the repository at this point in the history
Loading
0