Comments (5)
Some update:
erlang/rebar3#2580
#874
from relx.
We've communicated by e-mail before on this. In short, we think this is a good idea and something that does indeed need fixing, and greatly appreciate the PRs.
The one bit we're not sure of is the division of responsibility between Relx and Rebar3 in terms of policies and components. The one bit we think needs changing is that we're passing the warning through the Relx state, which sort of piggy-backs on implementation details.
What we think should happen instead is this:
- extend relx state to accept in a filter function for xref. Make it default to
fun(_) -> true end
if unspecified - keep the relx state weaving the way you build it here, but apply the filter before printing the way it was already printing (within relx). We can at this point merge the Relx PR fine independently, which speaks to the isolation we get
- adjust the rebar3 PR to take the adjusted filtering function you already wrote, but wrap it in
fun(Warn) -> YourCode end
and set it in the relx state. You should use a closure to carry whatever rebar3 state you need without relx knowing a thing about the details - The xref filtering is now configured by rebar3 knowing its config state but handled by Relx as if nothing special took place. We're essentially using this to tunnel rebar3's config into the relx state to apply it to the xref warnings, rather than tunneling the xref warnings back to rebar3.
Do you think this make sense? It sounds like it shouldn't be too much of a rewrite since many of the components can be kept and shifted around instead.
from relx.
Thanks for the feedback.
I was able to carry the required modifications pretty easily, except for one little detail. The method filter_xref_results in rebar3
https://github.com/erlang/rebar3/blob/3169392c7d73e6b849fb3117fb76177478c85f38/src/rebar_prv_xref.erl#L183 is a bit more involved than being just a predicate on list.
Therefore, I found it a bit easier to pass the whole filter method as a fun(list()) -> list(), which default to the identity.
from relx.
On Relx side #882
On rebar3 side erlang/rebar3#2611
from relx.
Resolved on the relx side in #882
from relx.
Related Issues (20)
- The configuration registry key could not be read HOT 13
- Custom name of the start script HOT 1
- `init terminating in do_boot` error after adding _checkouts dependency.
- Replace of OS Variables enters endless loop if OS variable contains an ampersand HOT 1
- Rebar3 .app file pkg_name for hex and relx HOT 7
- Tar --output-dir error HOT 7
- extended_bin does not account for cookie being set in an extended vm.args HOT 2
- First "daemon" startup hangs if no cookie is specified HOT 2
- Bash error while running in a directory with space in the name HOT 4
- Outdated website
- Allow applications to provide alternative user-facing messages HOT 10
- Mode = prod + system_libs = false produces broken release
- "rebar3 as prod tar" overlay does not take effect HOT 1
- Some extended start script commands fail on Windows
- Proposal: Allow disabling extended start script commands HOT 1
- Changes made to sys.config.src are not taking effect under windows
- https://erlanger.slack.com/archives/C055DJA49/p1703153178619079
- relx_app_info:optional_applications/1 looks at wrong attribute HOT 1
- Make tar structure compatible with plain `release_handler` upgrades HOT 1
- Add fail_if_missing option
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 relx.