Skip to content

Commit fbdd0bb

Browse files
authored
add types db (#25)
1 parent 7a905a4 commit fbdd0bb

14 files changed

+431
-510
lines changed

.github/workflows/ci.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
julia-version: ['1.7', '1.8', 'nightly']
10+
julia-version: ['1.8', '1.9']
1111
julia-arch: [x64]
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313

@@ -17,8 +17,6 @@ jobs:
1717
with:
1818
version: ${{ matrix.julia-version }}
1919
arch: ${{ matrix.julia-arch }}
20-
- run: rm Manifest.toml
21-
if: matrix.julia-version != '1.7'
2220
- uses: julia-actions/julia-buildpkg@v1
2321
- uses: julia-actions/julia-runtest@v1
2422
with:

Manifest.toml

-271
This file was deleted.

Project.toml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ version = "0.1.0"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
8+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
89
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
910
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
11+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1012
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ is written in `aggregate.csv`.
7070

7171
See examples in the `tests` directory.
7272

73+
## Types Database
74+
75+
Normally, we don't check methods with `Any` in the parameters types
76+
because there is no sensible way to enumerate subtypes of `Any` without
77+
any additional knowledge. One way we can get around it is to collect
78+
a set of types and test only enumerate that set every time we see
79+
an `Any`-parameter. That's what the “types database” idea about.
80+
81+
The implementation with further comments in the source code lives in
82+
[src/typesDB.jl](src/typesDB.jl) (you may be interested in the format of the
83+
database). A simple example of how to use it is shown in the test suite:
84+
85+
```
86+
juila> f(x)=1
87+
juila> typesdb_cfg = build_typesdb_scfg("merged-small.csv")
88+
juila> is_stable_method((@which f(1)), typesdb_cfg)
89+
Stb(2)
90+
```
91+
7392
## Package History Checking
7493

7594
There is a suite of scripts to examine the git history of packages

scripts/aggregate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
ADD_HEAD='1i Module,Methods,Stable,Partial,Unstable,Any,Vararg,Generic,TcFail,NoFuel'
44

5-
find . -maxdepth 1 -name "*-agg.txt" -exec cat {} + | sort | sed "$ADD_HEAD" > aggregate.csv
5+
find . -maxdepth 2 -name "*-agg.txt" -exec cat {} + | sort | sed "$ADD_HEAD" > aggregate.csv

0 commit comments

Comments
 (0)