Comments (6)
from stanc3.
Thanks, @bob-carpenter !
from stanc3.
@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.
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.
from stanc3.
Great! Then, this should be solved. Thanks, @bob-carpenter !
from stanc3.
Related Issues (20)
- [BUG] (Nightly) mac-stanc --version prints %%NAME%%3 ... HOT 1
- [BUG] Build error: This expression has type [ `Use_Sys_unix ]. This is not a function; it cannot be applied. HOT 18
- Improving external C++ integration HOT 4
- SoA optimization can over-promote objects used inside loops to produce slower code
- Expose `hypergeometric_2F1` and `hypergeometric_3F2` HOT 2
- Creating empty arrays with {} HOT 13
- [BUG] Inline matrix construction fails to promote with mixed types
- [BUG] eigenvalues_sym fails to compile in expression context HOT 3
- [BUG] Compiler optimizations can prevent bounds checks
- [BUG] `--standalone-functions` ignores undefined functions (external c++) HOT 4
- [BUG] `--info` does not print function information HOT 9
- [BUG] `transform_inits` code for complex numbers is incorrect.
- [FR] `--standalone-functions` change auto return to plain type? HOT 1
- [BUG] `transform_inits` does not check validity of var_context
- Debug flag `--debug-generate-inits` fails if sizes of parameters are based on data HOT 2
- [FR] UDFs taking another UDF as argument HOT 1
- [FR] Bool data type? HOT 1
- `--filename-in-msg` should also update error strings in generated C++
- [BUG] Array literals in `return` statements may generate wrong type in C++
- [BUG] Tilde syntax does not properly generate promote_scalar for array arguments HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stanc3.