File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ NPM_INSTALL_CACHE=true
1414NPMRC =
1515BUILD_DIR =/undefined
1616LKQL_DIR =$(BUILD_DIR ) /lkql
17- # Default impact-db directory as set in an ancr devenv
18- IMPACTDB_DIR =$(ANCR_ROOT_DIR_POSIX ) /src/impact-db
1917GPRBUILD =gprbuild -j$(PROCS ) -p -XBUILD_MODE=$(BUILD_MODE )
2018GPRINSTALL =gprinstall --prefix=$(PREFIX ) -p -XBUILD_MODE=$(BUILD_MODE )
2119BUILD_FOR_JIT =false
4341 cd lkql_checker/doc && make generate html-all
4442
4543impacts :
46- [ -f " $( KP_JSON) " ] || PYTHONPATH= " $( IMPACTDB_DIR ) " " $( PYTHON) " " ./utils/impact-db_impacts_gen.py" " $( IMPACTDB_DIR ) "
44+ [ -f " $( KP_JSON) " ] || " $( PYTHON) " " ./utils/impact-db_impacts_gen.py"
4745
4846format :
4947 gnatformat -P lkql_checker/gnatcheck.gpr --no-subprojects
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
3- # This script should be run at the top level of the langkit-query-language with
4- # PYTHONPATH set to the impact-db repository path. The impact-db repository path
5- # should also be passed as first argument:
6- #
7- # $ PYTHONPATH=/path/to/impact-db ./impact-db_impacts_gen.py /path/to/impact-db
3+ # This script should be run at the top level of the langkit-query-language.
84
95import glob
6+ import inspect
107import json
11- import sys
8+ import os
129from collections import OrderedDict
1310from pathlib import Path
1411from impactdb import db
1512
16- impactdb_dir = sys .argv [1 ]
1713res = {}
1814
1915
@@ -27,7 +23,8 @@ def format_name(name: str) -> str:
2723
2824
2925def list_impacts (issues : [str ]) -> None :
30- entries = [e for e in db .load (impactdb_dir + "/entries" ) if e .type == "kp" ]
26+ entries = os .path .join (os .path .dirname (inspect .getfile (db )), ".." , "entries" )
27+ entries = [e for e in db .load (entries ) if e .type == "kp" ]
3128 for e in entries :
3229 if e .name in issues :
3330 res .update ({format_name (e .name ): format_impacts (e .impacts )})
You can’t perform that action at this time.
0 commit comments