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

C++ samples not checked for use of deprecated methods #1603

Open
speth opened this issue Aug 25, 2023 · 2 comments
Open

C++ samples not checked for use of deprecated methods #1603

speth opened this issue Aug 25, 2023 · 2 comments
Labels
tests Issues about tests, running the tests, or test results

Comments

@speth
Copy link
Member

speth commented Aug 25, 2023

Problem description

Currently, the C++ samples can (and do) contain use of deprecated methods. While these samples are compiled and run as part of scons test, we do not force deprecation warnings to be errors in these samples, and the output written to stdout and stederr is not included in the test comparisons for most of these tests, which means the warnings printed to the screen go unnoticed

Steps to reproduce

  1. Run scons test
  2. Run ./build/samples/cxx/bvp/blasius (may require fiddling with LD_LIBRARY_PATH)
  3. See DeprecationWarning in the output

Behavior

Step 1 passes with no errors. Step 2 produces output starting with:

DeprecationWarning: OneDim::OneDim(vector<Domain1D*>): To be removed after Cantera 3.0; superseded by OneDim::OneDim(v
ector<shared_ptr<Domain1D>>).
DeprecationWarning: OneDim::addDomain(Domain1D*): To be removed after Cantera 3.0; superseded by OneDim::addDomain(shared_ptr<Domain1D>).
DeprecationWarning: Sim1D::Sim1D(vector<Domain1D*>&): To be removed after Cantera 3.0; superseded by Sim1D::Sim1D(vector<shared_ptr<Domain1D>>&).

..............................................................................
Attempt Newton solution of steady-state problem...    failure. 
Take 10 timesteps     0.0003844     0.7784
Attempt Newton solution of steady-state problem...    success.

Problem solved on [6] point grid(s).

System information

  • Cantera version: 3.0.0 (806842d)
  • OS: macOS 13.5.1

Additional context

I already have a fix prepared for the specific warnings here that will be included in an upcoming PR, but thought it was helpful to track this gap in our testing separately.

@speth speth added the tests Issues about tests, running the tests, or test results label Aug 25, 2023
@ischoegl
Copy link
Member

@speth - as there have been several PR's merged since creating this issue, this may already be fixed?

@speth
Copy link
Member Author

speth commented Jan 20, 2024

This issue does not affect the sample programs in the C++ tutorial (https://cantera.org/dev/userguide/cxx-tutorial.html) which are now included in the test suite as of #1657, because the regression tests for these make comparisons of the combined stdout and stderr of the samples.

However, nothing has changed for the other C++ sample programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Issues about tests, running the tests, or test results
Projects
None yet
Development

No branches or pull requests

2 participants