Skip to content

Commit 73d5eba

Browse files
authored
Rename "textual interface" to "parseable interface" (swiftlang#19713)
We already have something called "module interfaces" -- it's the generated interface view that you can see in Xcode, the interface that's meant for developers using a library. Of course, that's also a textual format. To reduce confusion, rename the new module stability feature to "parseable [module] interfaces".
1 parent 01c4c3c commit 73d5eba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+75
-72
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ERROR(error_mode_cannot_emit_module,none,
121121
ERROR(error_mode_cannot_emit_module_doc,none,
122122
"this mode does not support emitting module documentation files", ())
123123
ERROR(error_mode_cannot_emit_interface,none,
124-
"this mode does not support emitting textual interface files", ())
124+
"this mode does not support emitting parseable interface files", ())
125125

126126
WARNING(emit_reference_dependencies_without_primary_file,none,
127127
"ignoring -emit-reference-dependencies (requires -primary-file)", ())
@@ -260,8 +260,8 @@ ERROR(error_invalid_debug_prefix_map, none,
260260
ERROR(invalid_vfs_overlay_file,none,
261261
"invalid virtual overlay file '%0'", (StringRef))
262262

263-
WARNING(textual_interface_scoped_import_unsupported,none,
264-
"scoped imports are not yet supported in textual module interfaces",
263+
WARNING(parseable_interface_scoped_import_unsupported,none,
264+
"scoped imports are not yet supported in parseable module interfaces",
265265
())
266266

267267
#ifndef DIAG_NO_UNDEF

include/swift/AST/PrintOptions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,13 @@ struct PrintOptions {
449449
return result;
450450
}
451451

452-
/// Retrieve the set of options suitable for stable textual interfaces.
452+
/// Retrieve the set of options suitable for parseable module interfaces.
453453
///
454454
/// This is a format that will be parsed again later, so the output must be
455455
/// consistent and well-formed.
456456
///
457-
/// \see swift::emitModuleInterface
458-
static PrintOptions printTextualInterfaceFile();
457+
/// \see swift::emitParseableInterface
458+
static PrintOptions printParseableInterfaceFile();
459459

460460
static PrintOptions printModuleInterface();
461461
static PrintOptions printTypeInterface(Type T);

include/swift/Basic/SupplementaryOutputPaths.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ struct SupplementaryOutputPaths {
113113
/// \sa swift::writeTBDFile
114114
std::string TBDPath;
115115

116-
/// The path to which we should emit a textual module interface, which can be
117-
/// used by a client source file to import this module.
116+
/// The path to which we should emit a parseable module interface, which can
117+
/// be used by a client source file to import this module.
118118
///
119119
/// This format is similar to the binary format used for #ModuleOutputPath,
120120
/// but is intended to be stable across compiler versions.
121121
///
122122
/// Currently only makes sense when the compiler has whole-module knowledge.
123123
///
124-
/// \sa swift::emitModuleInterface
125-
std::string ModuleInterfaceOutputPath;
124+
/// \sa swift::emitParseableInterface
125+
std::string ParseableInterfaceOutputPath;
126126

127127
SupplementaryOutputPaths() = default;
128128
SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default;
@@ -132,7 +132,7 @@ struct SupplementaryOutputPaths {
132132
ModuleDocOutputPath.empty() && DependenciesFilePath.empty() &&
133133
ReferenceDependenciesFilePath.empty() &&
134134
SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() &&
135-
TBDPath.empty() && ModuleInterfaceOutputPath.empty();
135+
TBDPath.empty() && ParseableInterfaceOutputPath.empty();
136136
}
137137
};
138138
} // namespace swift

include/swift/Driver/Driver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ class Driver {
341341
StringRef workingDirectory,
342342
CommandOutput *Output) const;
343343

344-
void chooseTextualInterfacePath(Compilation &C, const JobAction *JA,
345-
StringRef workingDirectory,
346-
llvm::SmallString<128> &buffer,
347-
CommandOutput *output) const;
344+
void chooseParseableInterfacePath(Compilation &C, const JobAction *JA,
345+
StringRef workingDirectory,
346+
llvm::SmallString<128> &buffer,
347+
CommandOutput *output) const;
348348

349349
void chooseRemappingOutputPath(Compilation &C, const TypeToPathMap *OutputMap,
350350
CommandOutput *Output) const;

include/swift/Frontend/Frontend.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ class CompilerInvocation {
338338
/// if not in that mode.
339339
std::string getTBDPathForWholeModule() const;
340340

341-
/// ModuleInterfaceOutputPath only makes sense in whole module compilation
342-
/// mode, so return the ModuleInterfaceOutputPath when in that mode and fail
343-
/// an assert if not in that mode.
344-
std::string getModuleInterfaceOutputPathForWholeModule() const;
341+
/// ParseableInterfaceOutputPath only makes sense in whole module compilation
342+
/// mode, so return the ParseableInterfaceOutputPath when in that mode and
343+
/// fail an assert if not in that mode.
344+
std::string getParseableInterfaceOutputPathForWholeModule() const;
345345
};
346346

347347
/// A class which manages the state and execution of the compiler.

include/swift/Frontend/FrontendInputsAndOutputs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class FrontendInputsAndOutputs {
235235
bool hasLoadedModuleTracePath() const;
236236
bool hasModuleOutputPath() const;
237237
bool hasModuleDocOutputPath() const;
238-
bool hasModuleInterfaceOutputPath() const;
238+
bool hasParseableInterfaceOutputPath() const;
239239
bool hasTBDPath() const;
240240

241241
bool hasDependencyTrackerPath() const;

include/swift/Option/FrontendOptions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def emit_fixits_path
6565

6666
def emit_interface_path
6767
: Separate<["-"], "emit-interface-path">, MetaVarName<"<path>">,
68-
HelpText<"Output textual interface file to <path>">;
68+
HelpText<"Output parseable interface file to <path>">;
6969

7070
def tbd_install_name
7171
: Separate<["-"], "tbd-install_name">, MetaVarName<"<path>">,

include/swift/Option/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
302302

303303
def experimental_emit_interface : Flag<["-"], "experimental-emit-interface">,
304304
Flags<[NoInteractiveOption, HelpHidden]>,
305-
HelpText<"Test out the textual interfaces feature">;
305+
HelpText<"Test out the parseable interfaces feature">;
306306

307307
def emit_objc_header : Flag<["-"], "emit-objc-header">,
308308
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,

lib/AST/ASTPrinter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static bool contributesToParentTypeStorage(const AbstractStorageDecl *ASD) {
7979
return !ND->isResilient() && ASD->hasStorage() && !ASD->isStatic();
8080
}
8181

82-
PrintOptions PrintOptions::printTextualInterfaceFile() {
82+
PrintOptions PrintOptions::printParseableInterfaceFile() {
8383
PrintOptions result;
8484
result.PrintLongAttrsOnSeparateLines = true;
8585
result.TypeDefinitions = true;
@@ -100,7 +100,7 @@ PrintOptions PrintOptions::printTextualInterfaceFile() {
100100
printer << " " << AFD->getInlinableBodyText(scratch);
101101
};
102102

103-
class ShouldPrintForTextualInterface : public ShouldPrintChecker {
103+
class ShouldPrintForParseableInterface : public ShouldPrintChecker {
104104
bool shouldPrint(const Decl *D, const PrintOptions &options) override {
105105
// Skip anything that isn't 'public' or '@usableFromInline'.
106106
if (auto *VD = dyn_cast<ValueDecl>(D)) {
@@ -143,7 +143,7 @@ PrintOptions PrintOptions::printTextualInterfaceFile() {
143143
}
144144
};
145145
result.CurrentPrintabilityChecker =
146-
std::make_shared<ShouldPrintForTextualInterface>();
146+
std::make_shared<ShouldPrintForParseableInterface>();
147147

148148
// FIXME: We don't really need 'public' on everything; we could just change
149149
// the default to 'public' and mark the 'internal' things.

lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,7 @@ Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA,
24742474
Output.get());
24752475

24762476
if (C.getArgs().hasArg(options::OPT_experimental_emit_interface))
2477-
chooseTextualInterfacePath(C, JA, workingDirectory, Buf, Output.get());
2477+
chooseParseableInterfacePath(C, JA, workingDirectory, Buf, Output.get());
24782478

24792479
if (C.getArgs().hasArg(options::OPT_update_code) && isa<CompileJobAction>(JA))
24802480
chooseRemappingOutputPath(C, OutputMap, Output.get());
@@ -2772,7 +2772,7 @@ void Driver::chooseRemappingOutputPath(Compilation &C,
27722772
}
27732773
}
27742774

2775-
void Driver::chooseTextualInterfacePath(Compilation &C, const JobAction *JA,
2775+
void Driver::chooseParseableInterfacePath(Compilation &C, const JobAction *JA,
27762776
StringRef workingDirectory,
27772777
llvm::SmallString<128> &buffer,
27782778
CommandOutput *output) const {

0 commit comments

Comments
 (0)