Code Monkey home page Code Monkey logo

Comments (6)

bob-carpenter avatar bob-carpenter commented on September 4, 2024

from stanc3.

VMatthijs avatar VMatthijs commented on September 4, 2024

Thanks, @bob-carpenter !

from stanc3.

VMatthijs avatar VMatthijs commented on September 4, 2024

@bob-carpenter , @seantalts , I currently have a local solution to this issue. However, it generates quite wordy warnings for a lot of files and I'm not sure what is most desirable. It generates warnings like

Warning: deprecated language construct used at file "wishart2x2.stan", line 51, column 19:
   -------------------------------------------------
    49:    //     | rho * sd2               rho * sd1        sd1 * sd2 * (1 - rho^2)   |
    50:
    51:    increment_log_prob(log(2.0 * sd1)
                            ^
    52:                       + log(2.0 * sd2)
    53:                       + log(sd1 * sd2 * (1.0 - rho * rho)));
   -------------------------------------------------

increment_log_prob(...); is deprecated and will be removed in the future. Use target += ...; instead.

for every use of a deprecated construct in a file. Some files have many deprecated constructs in them, so we get a lot of these warnings. For instance, on the file

model {
   real x;
   x <- 24.2; #wrong
   #again
   increment_log_prob(14.0);
   print(get_lp());
}

we get the warnings

Warning: deprecated language construct used at file "test2.stan", line 3, column 6:
   -------------------------------------------------
     1:  model {
     2:     real x;
     3:     x <- 24.2; #wrong
               ^
     4:     #again
     5:     increment_log_prob(14.0);
   -------------------------------------------------

assignment operator <- is deprecated in the Stan language; use = instead.


Warning: deprecated language construct used at file "test2.stan", line 3, column 14:
   -------------------------------------------------
     1:  model {
     2:     real x;
     3:     x <- 24.2; #wrong
                       ^
     4:     #again
     5:     increment_log_prob(14.0);
   -------------------------------------------------

Comments beginning with # are deprecated. Please use // in place of # for line comments.


Warning: deprecated language construct used at file "test2.stan", line 4, column 3:
   -------------------------------------------------
     2:     real x;
     3:     x <- 24.2; #wrong
     4:     #again
            ^
     5:     increment_log_prob(14.0);
     6:     print(get_lp());
   -------------------------------------------------

Comments beginning with # are deprecated. Please use // in place of # for line comments.


Warning: deprecated language construct used at file "test2.stan", line 5, column 20:
   -------------------------------------------------
     3:     x <- 24.2; #wrong
     4:     #again
     5:     increment_log_prob(14.0);
                             ^
     6:     print(get_lp());
     7:  }
   -------------------------------------------------

increment_log_prob(...); is deprecated and will be removed in the future. Use target += ...; instead.


Warning: deprecated language construct used at file "test2.stan", line 6, column 14:
   -------------------------------------------------
     4:     #again
     5:     increment_log_prob(14.0);
     6:     print(get_lp());
                       ^
     7:  }
   -------------------------------------------------

get_lp() function is deprecated. It will be removed in a future release. Use target() instead.

I could of course make the warnings less verbose or make sure at most one warning gets thrown per file, but that might also make them less useful. What is desirable here in your opinions?

from stanc3.

VMatthijs avatar VMatthijs commented on September 4, 2024

Update: I have now pushed my local implementation with the behaviour described above. If you would prefer a different kind of behaviour, I'm happy to change it!

from stanc3.

bob-carpenter avatar bob-carpenter commented on September 4, 2024

from stanc3.

VMatthijs avatar VMatthijs commented on September 4, 2024

Great! Then, this should be solved. Thanks, @bob-carpenter !

from stanc3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.