Commit Graph

7 Commits

Author SHA1 Message Date
Jordan Rose
2727a70b90 Make AtomicValue's lock-sharing explicit
Also:
- Remove AtomicUInt's @objc, it's no longer used from ObjC
- Remove Codable conformances, they would implicitly use shared locks
  and weren't used in practice
2024-03-27 10:57:32 -07:00
Max Radermacher
b2affe679b
Fix testChainingPromiseLongChain 2023-10-31 00:43:53 -05:00
Max Radermacher
dfabf88f0c Don’t inherit from SSKBaseTestSwift unless needed 2023-04-07 10:09:32 -07:00
Harry
f7bc793ae9
Make SystemStoryManagerTest synchronous to end its reign of flaky terror
* Use schedulers with ChainedPromise

* Add full queue initializer redirection in Schedulers

* pass scheduler to OWSURLSession

* Use schedulers in SystemStoryManager

* make SystemStoryManagerTest synchronous
2023-03-29 08:47:49 -07:00
Max Radermacher
3a2b5a37bf Fix SwiftLint violations 2022-11-29 14:47:23 -08:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
Harry
7ee39eef63
Add SystemStoryManager
* Add OnboardingStoryManager

* mark onboarding story viewed

* Add tests and fix issues that came up from testing

* up test timeout for slower CI

* rename SystemStoryManager and put into dependency injecton container

* Use viewed state on StoryMessage itself. Have SystemStoryManager observe app lifecyle events to automatically manage the onboarding story

* use iOS assets which are now in s3

* todo cleanup

* increment timestamp for uniqueness

* pr comments

* change literal delimiter

* Add ChainedPromise utility, tests, and use in SystemStoryManager

* discretionarily observe app backgrounding in SystemStoryManager

* renaming from PR comments
2022-08-30 14:49:59 -07:00