Coder Social home page Coder Social logo

Comments (17)

bitwalker avatar bitwalker commented on July 26, 2024

Could you describe the steps to replicate the issue you are seeing?

from exrm.

d0rc avatar d0rc commented on July 26, 2024

Just create empty elixir project, create priv dir, add exrm to deps and release.
Then inspect rel/ - there will be no priv dir under lib/project directory for elixir projects.

from exrm.

d0rc avatar d0rc commented on July 26, 2024

If you wish I can give detailed step by step guide with screenshots and will try find some releases made with prev versions of exrm

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

That's fine, did you add a file to priv, or just create an empty directory? If the latter, I would imagine that directory is only generated if there are files to copy over into the release. I'll walk through the process here in a few, just updating my projects to 0.14.3 at the moment.

from exrm.

d0rc avatar d0rc commented on July 26, 2024

Yes, I did. I'm just trying to release new version of project. There are many files in priv dirs of main project and some deps.

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

Ok, looking now, I'll get back to you shortly.

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

Oh, one more thing, are you moving to 0.14.3? Or are you locked on a specific version right now?

from exrm.

d0rc avatar d0rc commented on July 26, 2024

Yes, I'm moving to 0.14.3

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

@d0rc On the latest version of exrm (0.12.4), with the sample project located here, priv is being generated as expected, and placed under rel/test/lib/test-0.0.1. Do you have any additional information that might help me reproduce the issue you're seeing?

from exrm.

d0rc avatar d0rc commented on July 26, 2024

@bitwalker that's very strange...
I've tried to release exrm-test project and no sample.txt under rel/ tree:

$ find . -name sample.txt
./priv/sample.txt

the only thing I've changed was:

$ git diff
diff --git a/mix.exs b/mix.exs
index 9a24cfc..b44c894 100644
--- a/mix.exs
+++ b/mix.exs
@@ -19,6 +19,6 @@ defmodule Test.Mixfile do
   # To specify particular versions, regardless of the tag, do:
   # { :barbat, "~> 0.1", github: "elixir-lang/barbat" }
   defp deps do
-    [{:exrm, path: "../exrm"}]
+    [{:exrm, github: "bitwalker/exrm"}]
   end
 end

just to ensure I'm using the same version:

$ cat mix.lock | grep exrm
  "exrm": {:git, "git://github.com/bitwalker/exrm.git", "579bc809768fafdcb6b636438853d7b2ed26a966", []}}

and

$ iex
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (0.14.3) - press Ctrl+C to exit (type h() ENTER for help)

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

Huh, so here is what I'm seeing:

Schoens at Revenant in ~/R/exrm git:(master)
↪ elixir --version
Elixir 0.14.3
Schoens at Revenant in ~/R/exrm git:(master)
↪ git describe --always
579bc80
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ mix clean
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ mix deps.clean --all
* Cleaning conform
* Cleaning exrm
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ mix deps.get
* Getting conform (package)
Fetching package (http://s3.hex.pm/tarballs/conform-0.8.2.tar)
Unpacked package tarball (/Users/Schoens/.mix/.package-cache/conform-0.8.2.tar)
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ mix release.clean --implode
... truncated output ...
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ mix release
... truncated output ...
Schoens at Revenant in ~/R/exrm-test git:(master)
↪ tree rel/test/lib/test-0.0.1/
rel/test/lib/test-0.0.1/
├── ebin
│   ├── Elixir.Test.Server.beam
│   ├── Elixir.Test.Supervisor.beam
│   ├── Elixir.Test.beam
│   └── test.app
└── priv
    └── sample.txt

2 directories, 5 files

Is there anything different about the above that you aren't doing? If you are going to change the dependency on exrm in exrm-test to point to something other than a local repo, I would use the hex package {:exrm, "~> 0.12.4"}, or make sure you specify a ref {:exrm, github: "bitwalker/exrm", ref: "0.12.4"}. I would guess you aren't doing mix release.clean --implode, so I could investigate that route, but you said you are getting the same thing with the exrm-test project, so that doesn't make sense. Thoughts?

from exrm.

d0rc avatar d0rc commented on July 26, 2024

I'm lost... it doesn't make any sense. I can see I'm on 17cabf4 commit of exrm-test, but I think that's because you've commited {:exrm, "~ 0.12.4"} to mix.exs or something like that.

I'm on Mac. I guess you too..

(exrm-test) $ elixir --version
Elixir 0.14.3
(exrm-test) $ git describe --always
17cabf4
(exrm-test) $ mix clean
(exrm-test) $ mix deps.clean --all
* Cleaning exrm
(exrm-test) $ mix deps.get
Running dependency resolution
Unlocked:   exrm
Dependency resolution completed successfully
  exrm: v0.12.4
* Getting exrm (package)
Fetching package (http://s3.hex.pm/tarballs/exrm-0.12.4.tar)
Unpacked package tarball (/Users/ds/.mix/.package-cache/exrm-0.12.4.tar)
(exrm-test) $ mix release.clean --implode
==> exrm
Compiled lib/exrm/config.ex
Compiled lib/exrm/plugin.ex
Compiled lib/exrm/utils.ex
Compiled lib/exrm/plugins/consolidation.ex
Compiled lib/exrm/plugins/conform.ex
Compiled lib/mix/tasks/release.clean.ex
Compiled lib/exrm/appups.ex
Compiled lib/mix/tasks/release.ex
Generated exrm.app
==> test
Compiled lib/test.ex
Compiled lib/test/supervisor.ex
Compiled lib/test/server.ex
Generated test.app
==> Removing release files for test-0.0.1...

THIS WILL REMOVE ALL RELEASES AND RELATED CONFIGURATION FOR TEST!
Are you absolutely sure you want to proceed?
 [Yn] y

==> All release files for test-0.0.1 were removed successfully!
(exrm-test) $ mix release
==> Generating sys.config...
==> Generating boot script...
==> Performing protocol consolidation...
==> Conform: Checking for test.schema.exs...
==> Conform: Checking for test.conf...
==> Conform: Generating escript..
==> Conform: Adding overlays to relx.config
==> Conform: Done!
==> Generating release...
==> Generating nodetool...
==> Packaging release...
==> The release for test-0.0.1 is ready!
(exrm-test) $ tree rel/test/lib/test-0.0.1/
rel/test/lib/test-0.0.1/
└── ebin
    ├── Elixir.Test.Server.beam
    ├── Elixir.Test.Supervisor.beam
    ├── Elixir.Test.beam
    └── test.app

1 directory, 4 files

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

Ok, I pushed a change to the exrm-test project which sets the exrm dep to use the hex package (0.12.4), and adds the mix.lock file back to the repo. With that, you and I should be on exactly the same page. Just for reference, I'm on OSX 10.9.3.

With the latest change, when I run through the same process you just did, I get priv listed out under the rel/test/lib/test-0.0.1 directory. I double checked to make sure the entire rel tree was removed when mix release.clean --implode was executed.

If you pull the latest exrm-test, run the same steps you just did above, and you still aren't seeing it, we'll have to do some digging I think. I can't see any way that we would be getting different results though.

from exrm.

d0rc avatar d0rc commented on July 26, 2024

no, still no priv...

what erlang version are you running? I'm on 17.1

(exrm-test) $ git pull origin master
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From https://github.com/bitwalker/exrm-test
 * branch            master     -> FETCH_HEAD
Updating 17cabf4..6c386fe
Fast-forward
 .gitignore | 1 -
 mix.exs    | 2 +-
 mix.lock   | 2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 mix.lock
(exrm-test) $ git describe --always
6c386fe
(exrm-test) $ mix deps.clean --all
* Cleaning conform
* Cleaning exrm
(exrm-test) $ mix clean
(exrm-test) $ rm -rf rel/
(exrm-test) $ ls -al
total 32
drwxr-xr-x   13 ds  staff   442 13 июл 10:24 .
drwxr-xr-x  194 ds  staff  6596 13 июл 09:38 ..
drwxr-xr-x   15 ds  staff   510 13 июл 10:23 .git
-rw-r--r--    1 ds  staff    53 13 июл 10:23 .gitignore
-rw-r--r--    1 ds  staff    36 13 июл 09:38 README.md
drwxr-xr-x    4 ds  staff   136 13 июл 09:39 _build
drwxr-xr-x    8 ds  staff   272 13 июл 09:38 config
drwxr-xr-x    2 ds  staff    68 13 июл 10:24 deps
drwxr-xr-x    4 ds  staff   136 13 июл 09:38 lib
-rw-r--r--    1 ds  staff   577 13 июл 10:23 mix.exs
-rw-r--r--    1 ds  staff    66 13 июл 10:23 mix.lock
drwxr-xr-x    3 ds  staff   102 13 июл 09:38 priv
drwxr-xr-x    4 ds  staff   136 13 июл 09:38 test
(exrm-test) $ rm -rf _build/
(exrm-test) $ mix deps.get
* Getting exrm (package)
Fetching package (http://s3.hex.pm/tarballs/exrm-0.12.4.tar)
Unpacked package tarball (/Users/ds/.mix/.package-cache/exrm-0.12.4.tar)
* Getting conform (package)
Fetching package (http://s3.hex.pm/tarballs/conform-0.8.2.tar)
Unpacked package tarball (/Users/ds/.mix/.package-cache/conform-0.8.2.tar)
(exrm-test) $ mix deps.compile
==> conform
Compiled src/conf_parse.erl
Compiled lib/conform_parse.ex
Compiled lib/conform_config.ex
Compiled lib/mix/tasks/conform.release.ex
Compiled lib/conform_utils.ex
Compiled lib/mix/tasks/conform.configure.ex
Compiled lib/conform.ex
Compiled lib/mix/tasks/conform.new.ex
Compiled lib/mix/tasks/conform.effective.ex
Compiled lib/conform_schema.ex
Compiled lib/conform_translate.ex
Generated conform.app
==> exrm
Compiled lib/exrm/config.ex
Compiled lib/exrm/plugin.ex
Compiled lib/exrm/utils.ex
Compiled lib/exrm/plugins/consolidation.ex
Compiled lib/exrm/plugins/conform.ex
Compiled lib/mix/tasks/release.clean.ex
Compiled lib/exrm/appups.ex
Compiled lib/mix/tasks/release.ex
Generated exrm.app
(exrm-test) $ mix release.clean --implode
==> Removing release files for test-0.0.1...

THIS WILL REMOVE ALL RELEASES AND RELATED CONFIGURATION FOR TEST!
Are you absolutely sure you want to proceed?
 [Yn] y

==> All release files for test-0.0.1 were removed successfully!
(exrm-test) $ mix release
==> Generating sys.config...
==> Generating boot script...
==> Performing protocol consolidation...
==> Conform: Checking for test.schema.exs...
==> Conform: Checking for test.conf...
==> Conform: Generating escript..
==> Conform: Adding overlays to relx.config
==> Conform: Done!
==> Generating release...
==> Generating nodetool...
==> Packaging release...
==> The release for test-0.0.1 is ready!
(exrm-test) $ tree rel/test/lib/test-0.0.1/
rel/test/lib/test-0.0.1/
└── ebin
    ├── Elixir.Test.Server.beam
    ├── Elixir.Test.Supervisor.beam
    ├── Elixir.Test.beam
    └── test.app

1 directory, 4 files
(exrm-test) $ tree priv/
priv/
└── sample.txt

0 directories, 1 file

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

OH. I know what the problem is. 17.1 has a bug with symlinks, per this issue. If you update to 17.1.2, the issue has been fixed there. That's why the priv directory isn't being copied on your system. I'm still on 17.0.

from exrm.

d0rc avatar d0rc commented on July 26, 2024

Thank you very much:)

that was scary...!

(exrm-test) $ tree rel/test/lib/test-0.0.1/
rel/test/lib/test-0.0.1/
├── ebin
│   ├── Elixir.Test.Server.beam
│   ├── Elixir.Test.Supervisor.beam
│   ├── Elixir.Test.beam
│   └── test.app
└── priv
    └── sample.txt

from exrm.

bitwalker avatar bitwalker commented on July 26, 2024

Awesome :), I'm glad you mentioned what version of Erlang you were running, or we would've been pulling our hair out trying to figure out what was going on!

from exrm.

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.