Commit Graph

25 Commits

Author SHA1 Message Date
Ramon Asuncion 4a162723bd Remove extra t in %t/x.swift 2025-09-30 15:20:49 -07:00
Ramon Asuncion a774255380 [Test][Interfacehash] Rewrite cp commands for Lit shell
Convert `// RUN: cp %t/{a,x}.swift` to `// RUN: cp %t/a.swift %t/x.swift` in InterfaceHash test
for compatibility with LLVM Lit interal shell.
2025-09-29 10:33:04 -07:00
Artem Chikin 71970fcf1f Fix and re-enable disabled 'InterfaceHash' tests
- Force loading of module dependencies from interface
- Set a unique module cache path for these tests
2024-03-18 11:39:51 -07:00
Alexis Laferrière e4494d8353 Tests: fixup UNSUPPORTED in edited_method_body & edited_method_property
rdar://124402245
2024-03-12 08:17:30 -07:00
Alexis Laferrière 73fc71e7ef Tests: disable 2 InterfacefaceHash tests on Linux as they are flaky 2024-03-11 13:36:54 -07:00
Artem Chikin c3aa6bfeb9 Temporarily disable 'edited_method_body.swift' and 'edited_property_getter.swift' while investigating CI failures 2024-02-26 09:22:41 -08:00
Saleem Abdulrasool 5acd3e5755 test: replace shell with python to enable portability
This replaces the `process_fine_grained_swiftdeps_with_fingerprints`
helper with a python script that mimics the shell behaviour. Adjust the
generated interface diffs to use unified formats. This allows us to
enable these tests on Windows.
2023-09-17 11:28:46 -07:00
Evan Wilde f13cda8bb0 Use diff instead of cmp
We're seeing some flakiness in this test, but aren't sure what it's
complaining about. `cmp` only says where the differencewas, but doesn't
print what was different. `diff` prints what was difference so we have a
chance to figure out what happened.
2023-04-21 11:52:00 -07:00
Alexis Laferrière fdc748591a [Frontend] Generate an interface has for emit-module-separately jobs 2021-08-18 13:58:16 -07:00
Rintaro Ishizaki 4c9d9337ea [Parse] Fix hash accumulation in decl member parsing
For example, given:

  class C: P {
    func foo() {}
  }

For the outer context (i.e. source file), the interface hash shoule be
'class C : P { }' for the member list, it's '{ func foo ( ) { } }'.
This must be the same regardless delayed parsing is enabled.
2021-02-01 17:46:44 -08:00
Robert Widmann 74765a8ba8 Remove Type Body Fingerprints Flags
This infrastructure has more than proven itself. Drop the code paths and tests supporting the status quo.
2020-10-01 13:09:00 -07:00
Slava Pestov fe3f6b3616 Dependencies: Update tests for new binary format 2020-06-10 23:43:40 -04:00
David Ungar bbffc0959b Tests for type fingerprints are enabled. 2020-01-28 20:06:44 -08:00
David Ungar 84fa03f757 Added -disable-type-fingerprints to tests. 2020-01-27 15:14:46 -08:00
Xi Ge fe0046ba26 Parser: calculating interface hash only for primary files. 2018-09-07 14:24:30 -07:00
Rintaro Ishizaki 327c69e563 [Parse] Don't update interface hash unless parsing interface tokens
Previously, parsing function bodies used to update interface hash
regardless of the flag. Parsing local function should not update it.
2018-08-29 01:00:02 +09:00
Saleem Abdulrasool 64268be652 test: invoke python tools properly
Ensure that we use the correct python to run the python based tools.
This also allows these tools to run on Windows which will not
necessarily associate the python script with an interpreter (python).
2018-04-23 17:30:09 -07:00
Dmitri Gribenko 984210aa53 tests: replace '// RUN: rm -rf' '// RUN: mkdir' pairs with '%empty-directory(...)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Jordan Rose 396c9f23b4 [Parse] Stop ignoring private decls for incremental purposes. (#3352)
We'd really like to say that private decls can't affect other files,
but we don't have enough information at parse-time:

- Private members of non-private classes still show up in vtables,
  which affects subclasses and callers in other files.

- Private stored properties of non-private structs change the
  layout of the struct.

- Private types may be used in private stored properties, affecting
  the layout of the containing struct.

- Private decls of /any kind/ can be used as the initial value of a
  stored property without an explicit type.

    private class Evil {
      class func defaultAlignment() -> Alignment { return .evil }
    }
    public struct Character {
      // Inferred type here!
      private var alignment = Evil.defaultAlignment()
    }

To be safe and correct, go back to only ignoring method bodies.

https://bugs.swift.org/browse/SR-1030
2016-07-06 12:32:06 -07:00
Rintaro Ishizaki 1bdce7ced6 [lit] Add substitutions: %utils and %line-directive
%utils => ${SWIFT_SOURCE_DIR}/utils
%line-directive => ${SWIFT_SOURCE_DIR}/utils/line-directive
2016-06-11 02:41:15 +09:00
Chris Willmore 8639248e15 Adding private property to struct or class should trigger downstream builds.
Swift SVN r32241
2015-09-25 21:48:10 +00:00
Chris Willmore 1a92333426 Add test for effect of new private property of class on interface hash.
Swift SVN r32240
2015-09-25 21:20:49 +00:00
Chris Willmore 538f7847f5 Only ignore private decls at global level.
<rdar://problem/22856386> Changing a private stored property (in a
struct or class) or a private method (in a class) /should/ force other
files to recompile

Swift SVN r32239
2015-09-25 21:16:54 +00:00
Chris Willmore 0e326dbeeb Exclude private decls from interface token hash.
After parsing a private decl, reset the token hash state to what it was
before the decl was parsed. This way, adding a private decl or editing
its type or name will not trigger a rebuild of downstream files.

<rdar://problem/22239821> Modifying private APIs shouldn't cause dependents to recompile

Swift SVN r31358
2015-08-20 03:43:43 +00:00
Jordan Rose fbb8d3f9a8 Add "interface hash" for improved incremental builds.
Compute the hash of all interface tokens when parsing; write the
interface hash to the swiftdeps file, or if the -dump-interface-hash
option is passed to the frontend. This hash will be used in incremental
mode to determine whether a file's interface has changed, and therefore
whether dependent files need to be rebuilt in response to the change.

Committed on ChrisW's behalf while he gets his setup unborked.

rdar://problem/15352929

Swift SVN r30477
2015-07-22 00:13:54 +00:00