Skip to content
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

options still not being honored #226

Open
vsoch opened this issue Mar 3, 2021 · 4 comments
Open

options still not being honored #226

vsoch opened this issue Mar 3, 2021 · 4 comments

Comments

@vsoch
Copy link
Contributor

vsoch commented Mar 3, 2021

I'm not sure what broke since early this morning, but I'm running the same command, and none of my options are honored - the files are generated in the root directory instead of the subfolder I specified, and all formats are produced (even though I just asked for Python). I just installed fresh from the develop branch. Here is my abispack.yaml file:

library: abispack

# This must be relative to python directory targeted by shroud
cxx_header: ../abispack.hpp

options:
  wrap_fortran: False
  wrap_c: False
  wrap_python: True
  debug: True

declarations:
- decl: namespace abispack
  declarations:
  - decl: class Libabigail
    declarations:
    - decl: int HelloWorld()
    - decl: int Load(std::string path)
    - decl: int GetVersion()
    - decl: int ReadElfCorpus(std::string in_file_path, 
            std::vector<char> prepared_di_root_paths, bool load_all_types = true, 
            bool linux_kernel_mode = false);

And when I run the Makefile command:

# make shroud
cp setup.py _setup.py
shroud abispack.yaml --outdir-python abispack
.yaml

Everything is dumped in the present working directory (for all files types) AND generated in the subfolder. So maybe my options are being honored, but it's generated the default "everything" in the root anyway?

Wrote abispack_types.yaml
Wrote wrapabispack_Libabigail.h
Wrote wrapabispack_Libabigail.cpp
Wrote wrapabispack.cpp
Wrote typesabispack.h
Wrote wrapfabispack_abispack.f
Wrote wrapfabispack.f
Wrote pyabispack_Libabigailtype.cpp
Wrote pyabispack_abispackmodule.cpp
Wrote pyabispackmodule.cpp
Wrote pyabispackutil.cpp
Wrote pyabispackmodule.hpp
Wrote setup.py
cp _setup.py setup.py

I'm guessing this was a bug introduced this morning? Sorry for the noise, this was working at around 5am and isn't anymore.

@vsoch
Copy link
Contributor Author

vsoch commented Mar 3, 2021

The options aren't honored even from the command line:

shroud abispack.yaml --outdir-python abispack --option wrap_fortran=False --option wrap_python=True --option wrap_c=False

(generated the same thing).

@vsoch
Copy link
Contributor Author

vsoch commented Mar 3, 2021

It looks like if I add an extra --outdir the files are moved there:

$ shroud abispack.yaml --outdir-python abispack --outdir abispack

And the setup.py is also generated there, at least it doesn't overwrite the one in the root anymore! But I'm wondering why the fortran, c, etc. are being generated?

@ltaylor16
Copy link
Member

I see why the extra Fortran and C files. I made a "fix" recently that allowed wrap_fortran=True to be set on a single function instead of just at the top, but it's wrapping too much now. I'll add a fix.

@vsoch
Copy link
Contributor Author

vsoch commented Mar 3, 2021

woohoo! 🎉 Thank you @ltaylor16 !

ltaylor16 added a commit that referenced this issue Mar 3, 2021
tutorial.yaml was creating fortran and C wrappers because of a recent
change which promoted wrap_fortran up to the top level.
has_default_args was creating functions for Fortran and C when the
wrapper was not requested.

Add a regression test to process tutorial with only wrap_python=True.

#226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants