-
Notifications
You must be signed in to change notification settings - Fork 0
Guide for OSD good first issue
The end of life of PostgreSQL 9.5 was on February 11, 2021 (read here)(https://www.postgresql.org/support/versioning/] While PostgreSQL 9.5 (or under) was supported there was the need to add some directives to avoid some type problems. Those directives can now be removed
#if PGSQL_VERSION > 95
funcctx->max_calls = result_count;
#else
funcctx->max_calls = (uint32_t)result_count;
#endif
These C directives can be deleted and changed to:
funcctx->max_calls = result_count;
- src/allpairs
- src/alpha_shape
- src/astar
- src/bdAstar
- src/bdDijkstra
- src/bellman_ford
- src/breadthFirstSearch
- src/chinese
- src/coloring
- src/components
- src/contraction
- src/dagShortestPath
- src/dijkstra
- src/dominator
- src/driving_distance
- src/ksp
- src/lineGraph
- src/max_flow
- src/mincut
- src/pickDeliver
- src/planar
- src/spanningTree
- src/topologicalSort
- src/transitiveClosure
- src/traversal
- src/trsp
- src/tsp
- src/withPoints
- Choose the issue (from the list above) that you are planning to solve
- State in the issue that is your plan to solve the issue
- Work on the issue
- Edit all the C files that are in the directory of the issue and make the change on all of them
- Commit the changes with a commit message like: '[nameofdirectory] removing directive PGSQL_VERSION > 95'
This guideline is written using Unix commands.
To develop is better to do it in your own fork, so first you need to Create a fork of the repository: https://github.com/pgRouting/pgrouting/tree/develop/ We call fork to the "copy" of the repository For example this is Vicky's fork: https://github.com/cvvergara/pgrouting
A Clone resides on your computer, for example this is done by Vicky:
git clone https://github.com/cvvergara/pgrouting
The command will create a directory named pgrouting Go to the root of the repository:
cd pgrouting
First add as a remote the main repository
git remote add upstream https://github.com/pgRouting/pgrouting
git fetch upstream
Branch out from develop
and name the working branch with the issue you are fixing
git checkout upstream/develop
git status
the last message will have the:
You are in 'detached HEAD' state ....
Create the working branch, and push. making sure that the actions are executed:
git switch -c issue1903
git push --set-upstream=origin issue1903
Go to your fork and click the "Actions" button
Using the editor of your preference, edit the C files found, in this case:
src/allpairs/floydWarshall.c
src/allpairs/johnson.c
Change from:
#if PGSQL_VERSION > 95
funcctx->max_calls = result_count;
#else
funcctx->max_calls = (uint32_t)result_count;
#endif
by keeping only the second line above, change to:
funcctx->max_calls = result_count;
Add the change and commit
git add src/allpairs/floydWarshall.c
git add src/allpairs/johnson.c
prepare for compilation as follows:
mkdir build
cd build
cmake ..
Now, let the compiler tell you if there was a mistake on your change:
make
Fix if needed and recompile
commit and push
# to verify that no other file was modified accidentally
git status
git commit -a -m '[nameofdirectory] removing directive PGSQL_VERSION > 95'
git push
Create a Pull Request mentioning the solved issue.