Comments (7)
The package name is only use in rebar.config
. In .app.src
you use the application name.
from relx.
Same for the list of applications in the release, as in the list of apps in {relx, [{release, {r, "1"}, [app_1]}]}
. The only place package name is ever used is deps
.
from relx.
Thanks, I hadn't noticed the {AppName, {pkg, PkgName}}
option here: https://hex.pm/docs/rebar3_usage (hiding in plain sight)
It's notable that https://hex.pm/docs/rebar3_publish does specify that you can add pkg_name
to the .app.src
file, but it doesn't specifically mention that if you do that, you'll also need to specify the package name in rebar.config
, otherwise bad things might happen.
I also see that the pkg_name
term for the .app.src
isn't specified anywhere on rebar3.org, and seems to only exist on hex.pm. I will contact the hex.pm team to suggest updates to the documentation, unless you happen to know if the documentation for hex.pm exists somewhere in a publicly editable state.
Thanks again.
from relx.
Oooh, that is about naming the package you are publishing, not the dependency of a package. If you need to name your package different you put pkg_name
in your .app.src
like in the docs. But that is just publishing data.
from relx.
Indeed, but once that's done, it's not currently clear that doing so means you must also specify the package name explicitly in rebar deps
as {AppName, {pkg, PkgName}}
. That bit wasn't obvious (to me, anyway).
This was one of those situations where I wasn't really sure which app or config was at fault, since it's an interplay between rebar3, hex, and relx. But since the error itself manifested when making a release with relx, that's where I went with my questions.
So, in short, I've learned that:
- Specifying
{pkg_name, PackageName}
in.app.src
, means you must: - Specify
{AppName, {pkg, PackageName}}
indeps
inrebar.config
, otherwise: - relx will crash when making a release.
As this isn't a bug with relx, but can be a little difficult to troubleshoot if misconfigured, I propose some improved error messages with this PR: #893
Hopefully this is okay!
Thanks again for the help!
from relx.
It should actually fail earlier than a release build. rebar3 should fail to build the application if you use {deps, [PackageName]}
. So I'm not sure how you were able to get passed that?
from relx.
I'm not sure, but I'm not doing anything particularly crazy.
The package that set this off was erl_pipeline
(with app name pipeline
).
But I tested making a bare application and specifying erl_pipeline
as the only dependency (where it should be {pipeline, {pkg, erl_pipeline}}
), rebar3 compile
pulls deps and compiles just fine.
from relx.
Related Issues (20)
- Relx call to xref should take into account ignore_xref HOT 5
- `cd "$ROOTDIR"` before any `erl` subscript runs in extended_bin HOT 2
- Building a tar doesn't override the erl script like building a release HOT 3
- 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
- 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
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.