Skip to content

Remove all references to unused LitRe tool #21910

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

Merged
merged 2 commits into from
Jan 17, 2019
Merged
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
1 change: 0 additions & 1 deletion docs/ABI/Mangling.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _ABI:

.. highlight:: none
Expand Down
1 change: 0 additions & 1 deletion docs/ABI/TypeLayout.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _ABI:

.. highlight:: none
Expand Down
1 change: 0 additions & 1 deletion docs/ABI/TypeMetadata.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _ABI:

.. highlight:: none
Expand Down
106 changes: 0 additions & 106 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,112 +24,6 @@ else()
message(WARNING "Unable to find sphinx-build program. Not building docs")
endif()

## Example testing

find_program(LITRE_EXECUTABLE
NAMES litre
DOC "LitRe literate programming tool for docutils")

find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
HINTS $ENV{SPHINX_DIR}
PATH_SUFFIXES bin
DOC "Sphinx documentation generator")

if(LITRE_EXECUTABLE)
# Find all the .rst files
file(GLOB_RECURSE rst_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rst)
set(subdir_CMakeLists)

foreach(rst ${rst_files})
# Prepare a testing directory containing a CMakeLists.txt
# and example files extracted from the .rst
set(test_dir "litre-tests/${rst}.litre-tests")

add_custom_command(
OUTPUT
${test_dir}/CMakeLists.txt
COMMAND
${LITRE_EXECUTABLE}
--default_compiler=${CMAKE_BINARY_DIR}/bin/swift
"--dump_dir=${test_dir}"
--traceback
--report=severe # suppress most .rst errors. We have lots of them.
${CMAKE_CURRENT_SOURCE_DIR}/${rst}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/${rst}
COMMENT
"Generating/Updating LitRe tests for ${rst}"
VERBATIM
)

list(APPEND subdir_CMakeLists ${test_dir}/CMakeLists.txt)
endforeach()

# Create a top-level CMakeLists.txt in a temporary file
add_custom_command(
OUTPUT
litre-top-CMakeLists.cmake
COMMAND
${CMAKE_COMMAND} -DOUTPUT=litre-top-CMakeLists.cmake
-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/GenerateTopLevelLitreCMakeLists.cmake
${rst_files}
DEPENDS
${rst_files}
COMMENT
"Generating top-level LitRe CMakeLists.txt content"
VERBATIM
)

# Only update the real top-level CMakeLists.txt if something changed
add_custom_command(
OUTPUT
"litre-tests/CMakeLists.txt"
COMMAND
"${CMAKE_COMMAND}" "-E" "copy_if_different"
"litre-top-CMakeLists.cmake" "litre-tests/CMakeLists.txt"
DEPENDS
"litre-top-CMakeLists.cmake"
COMMENT
"Updating top-level LitRe CMakeLists.txt"
VERBATIM)

# Create a build directory
add_custom_command(
OUTPUT "litre-tests/build"
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "litre-tests/build")

# Run CMake itself to configure/build the tests
add_custom_command(
OUTPUT
litre-tests/results
COMMAND
${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "${CMAKE_CURRENT_BINARY_DIR}/litre-tests"
COMMAND
${CMAKE_COMMAND} --build .
COMMAND
${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/litre-tests/results"
WORKING_DIRECTORY
litre-tests/build
DEPENDS
${CMAKE_BINARY_DIR}/bin/swift
litre-tests/CMakeLists.txt litre-tests/build ${subdir_CMakeLists}
COMMENT
"Running LitRe tests"
VERBATIM
)

# Add a target so these tests show up in the Xcode project.
add_custom_target(
LiterateTests SOURCES ${rst_files}
DEPENDS litre-tests/results
)
set_target_properties(LiterateTests PROPERTIES FOLDER "Tests")
else()
message(WARNING "LitRe not found; code examples won't be tested.")
endif()

if (LLVM_ENABLE_DOXYGEN)
if (DOXYGEN_FOUND)
set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 0 additions & 2 deletions docs/DependencyAnalysis.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
===================
Dependency Analysis
===================
Expand Down
6 changes: 0 additions & 6 deletions docs/GenerateTopLevelLitreCMakeLists.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions docs/Lexicon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
.. title:: Lexicon
.. default-role:: term

.. @raise litre.TestsAreMissing
This file defines several terms used by the Swift compiler and standard library
source code, tests, and commit messages. See also the `LLVM lexicon`_.

Expand Down
2 changes: 0 additions & 2 deletions docs/Literals.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
Literals
========

Expand Down
18 changes: 0 additions & 18 deletions docs/LitreTemplate.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions docs/LogicalObjects.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. @raise litre.TestsAreMissing
Logical Objects
===============

Expand Down
1 change: 0 additions & 1 deletion docs/Modules.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. default-role:: term
.. title:: Modules User Model

Expand Down
1 change: 0 additions & 1 deletion docs/PatternMatching.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. @raise litre.TestsAreMissing
.. _PatternMatching:

Pattern Matching
Expand Down
1 change: 0 additions & 1 deletion docs/SIL.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. @raise litre.TestsAreMissing
.. highlight:: none

Swift Intermediate Language (SIL)
Expand Down
1 change: 0 additions & 1 deletion docs/SequencesAndCollections.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. default-role:: code

====================================
Expand Down
2 changes: 0 additions & 2 deletions docs/StdlibRationales.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
=================================================
Rationales for the Swift standard library designs
=================================================
Expand Down
2 changes: 0 additions & 2 deletions docs/StoredAndComputedVariables.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. @raise litre.TestsAreMissing
=============================
Stored and Computed Variables
=============================
Expand Down
2 changes: 0 additions & 2 deletions docs/StringDesign.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. raw:: html

<style>
Expand Down
2 changes: 0 additions & 2 deletions docs/TypeChecker.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. @raise litre.TestsAreMissing
Type Checker Design and Implementation
========================================

Expand Down
2 changes: 0 additions & 2 deletions docs/archive/LangRefNew.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
===============================
Swift Language Reference Manual
===============================
Expand Down
2 changes: 0 additions & 2 deletions docs/archive/NamespaceLevelVarsAndTopLevelCode.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. warning:: This document was used in planning Swift 1.0; it has not been kept
up to date and does not describe the current or planned behavior of Swift.

Expand Down
2 changes: 0 additions & 2 deletions docs/archive/Objective-CInteroperability.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
============================
Objective-C Interoperability
============================
Expand Down
1 change: 0 additions & 1 deletion docs/archive/Resilience.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _Resilience:

Resilience
Expand Down
1 change: 0 additions & 1 deletion docs/contents.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. @raise litre.TestsAreMissing
.. _contents:

Contents
Expand Down
1 change: 0 additions & 1 deletion docs/proposals/Concurrency.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. ConcurrencyModel:
*Note*: This document is **not an accepted Swift proposal**. It does not describe Swift's concurrency mechanisms as they currently exist, nor is it a roadmap for the addition of concurrency mechanisms in future versions of Swift.
Expand Down
2 changes: 0 additions & 2 deletions docs/proposals/DeclarationTypeChecker.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
Declaration Type Checker
========================

Expand Down
2 changes: 0 additions & 2 deletions docs/proposals/Inplace.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
=====================
In-Place Operations
=====================
Expand Down
2 changes: 0 additions & 2 deletions docs/proposals/TypeState.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
General Type State Notes
========================

Expand Down
1 change: 0 additions & 1 deletion docs/proposals/ValueSemantics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _ValueSemantics:

==========================
Expand Down
1 change: 0 additions & 1 deletion docs/proposals/archive/MemoryAndConcurrencyModel.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _MemoryAndConcurrencyModel:

Swift Memory and Concurrency Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _ProgramStructureAndCompilationModel:

.. highlight:: none
Expand Down
2 changes: 0 additions & 2 deletions docs/proposals/rejected/Clonable.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
==========
Clonable
==========
Expand Down
1 change: 0 additions & 1 deletion docs/proposals/valref.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:orphan:

.. @raise litre.TestsAreMissing
.. _valref:

=======================
Expand Down
2 changes: 1 addition & 1 deletion utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def __str__(self, indent=''):


def expand(filename, line_directive=_default_line_directive, **local_bindings):
r"""Return the contents of the givepn template file, executed with the given
r"""Return the contents of the given template file, executed with the given
local bindings.

>>> from tempfile import NamedTemporaryFile
Expand Down