Thanks Jose and Eric and other people who spend time for answer. All understand, disqussion closed.
четверг, 8 июня 2017 г., 18:37:37 UTC+3 пользователь Eric Meadows-Jönsson написал: > > The :manager option for dependencies is for the tool that manages BUILDING > the dependency, not how to fetch it. SCMs is how you fetch dependencies in > Mix https://hexdocs.pm/mix/Mix.SCM.html#content. This is how Hex works: > https://github.com/hexpm/hex/blob/master/lib/hex/scm.ex > > Hex is a package manager for BEAM languages that run on the same virtual > machine that Elixir runs. Hex is not part of Elixir. Why should we make a > package manager for code that runs on a completely different virtual > machine part of Elixir core when the package manager for Elixir code is not > part of Elixir core? > > On Thu, Jun 8, 2017 at 2:24 PM, Aleksandr Pavliutin < > [email protected] <javascript:>> wrote: > >> You talk about js build tools, I talk about deps manager. >> >> For example, in mix.exs I have {:bootstrap, '~> x.y.z', manager: :npm}. >> I want mix fetch this package and deps from package.json to deps/ folder, >> make package using "npm run build && npm install" if need in _build folder. >> >> After that I can build my assets using grunt, gulp, brunch, webpack from >> deps/bootstrap or _build/dev/lib/bootstrap. >> mix with npm module can make all my deps(and js too) and subdeps >> idempotent, because mix have lock and cache mechanism. >> >> четверг, 8 июня 2017 г., 13:57:20 UTC+3 пользователь Norbert Melzer >> написал: >>> >>> Yes, mix is part of elixir core. But JavaScript or NPM aren't. Both >>> aren't related to elixir even in the slightliest. There is no need to pull >>> in a dependency on nodejs or similar into the languages core, to make a >>> feature available that only a small fraction of users need, if there is at >>> all. >>> >>> So far, I am happy with running npm_install once after the first clone >>> of my project and on CI. The remainder of my buildstuff is heavily >>> customized, and relies on various JS buildtools, since there is JavaScript >>> generated from PureScript, Elm and ElixirScript. (Wan't to move to have >>> only ElixirScript though). >>> >>> All of this is pretty well handled by a simple shell script. Also >>> changes in the scriptfiles are very seldom such that it is only rarely >>> needed to run. >>> >>> Even then, I do not consider all the JS stuff a dependency of my >>> application. In fact, its a JavaScript implementation of a client to my >>> application. My server side stuff does not depend on the existence of a >>> client. The server is fine without. So I do not see any necessity to make >>> my server software aware of all that JavaScript, except for delivering it >>> to the clients browser. On the other hand side, that client has a hard >>> dependency on the server, but only that it has to exist **somewhere**. >>> >>> Also it would be very nice if you could a little bit more effort into >>> wording. I had a hard time to actually understand what you wanted in your >>> last mail and I am still not sure if I got you right. >>> >>> >>> >>> Aleksandr Pavliutin <[email protected]> schrieb am Do., 8. Juni >>> 2017 um 12:31 Uhr: >>> >>>> IMHO, if mix in elixir source tree, mix part of elixir core. >>>> >>>> Third party plugin will allow me to do like this >>>> {:babel-core, '~> 6.24.1', manager: :npm, ovveride: true} or >>>> {:babel-core, '~> 6.24.1', manager: :npm, only: [:dev, :test]} or >>>> {:test_dep, '~> 0.1.1', git: "http://..../test_dep.git", manager: :npm} >>>> or >>>> {:test_dep, path: '.../test_dep", manager: :npm} or >>>> other case available for mix, make or rebar manager? >>>> No, I don't think. >>>> >>>> May be good solution, split mix to core and managers with unified api. >>>> The same situation, if elixir core team or phoenix team or other teem >>>> won't support this manager, but they can apply pull request for this >>>> manager. >>>> >>>> четверг, 8 июня 2017 г., 11:29:06 UTC+3 пользователь Norbert Melzer >>>> написал: >>>> >>>>> Not every phoenix-project uses javascript, not every elixir project is >>>>> phoenix. So this does not belong into mix or elixir core. Perhaps your >>>>> proposal is better to be done to the phoenix team, but absolutely not in >>>>> the elixir language core team. >>>>> >>>>> Even for phoenix I think it is a bad choice, since the phoenix team >>>>> once said they won't force anyone to a certain javascript buildtool, >>>>> which >>>>> would essentially happen once they support a single one through mix >>>>> tasks, >>>>> while supporting all is essentially impossible. >>>>> >>>>> So please do roll your own third party plugin which does build the >>>>> javascript for you and everyone else who chooses to use the same >>>>> javascript >>>>> buildsystem as you did. >>>>> >>>>> Aleksandr Pavliutin <[email protected]> schrieb am Do., 8. Juni >>>>> 2017 um 10:21 Uhr: >>>>> >>>> As I undestand, mix part of Elixir *core*. Without mix you can't build >>>>>> application more difficult than "hello world". >>>>>> >>>>>> I don't agree with Justin, this functionality not for third party >>>>>> libraries, because mix have 90% for work with npm. >>>>>> I can undestand this position if I propose make rust projects with >>>>>> mix using cargo or something like this. >>>>>> >>>>>> Most of all phoenix projects have package.json and default build >>>>>> instrustion "mix deps.get && npm install". >>>>>> It would be great if all npm deps and builds store in main tree (deps >>>>>> and _build/[MIX_ENV] folders). All brunch scripts would be more simple, >>>>>> because they work with one dir in all projects. >>>>>> >>>>>> Mix have buildin functionality in core for make c/c++ projects and >>>>>> erlang with rebar. And some erlang developers use mix for build they >>>>>> projects instead rebar. >>>>>> >>>>>> четверг, 8 июня 2017 г., 1:57:46 UTC+3 пользователь José Valim >>>>>> написал: >>>>>> >>>>>>> What Justin Wood said: this definitely does not belong in Elixir >>>>>>> *core*. This is a mailing list about the Elixir language and standard >>>>>>> library. >>>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>> *José Valim* >>>>>>> www.plataformatec.com.br >>>>>>> Skype: jv.ptec >>>>>>> Founder and Director of R&D >>>>>>> >>>>>>> On Thu, Jun 8, 2017 at 12:43 AM, Justin Wood <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>> I think this functionality would be good for a third party library. >>>>>>>> Not all Elixir applications would have use for something like this. >>>>>>>> >>>>>>> On Jun 7, 2017 6:41 PM, "Aleksandr Pavliutin" < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>> It would be great, if I can manage node deps with mix. >>>>>>>>> >>>>>>>>> As I understand, logic same as for hex repo: >>>>>>>>> - fetch need files from repo(github) using package.json config >>>>>>>>> instead mix.exs, package.exs or rebar.config; >>>>>>>>> - fetch dependencies for package using MIX_ENV; >>>>>>>>> - save package, write metadata, lock and other; >>>>>>>>> - run npm build and install scripts if need with >>>>>>>>> NODE_ENV=production(if MIX_ENV == prod) or NODE_ENV = develompert if >>>>>>>>> (MIX_ENV == dev or MIX_ENV == test); >>>>>>>>> - make symlinks to executable files if need; >>>>>>>>> >>>>>>>>> I think problem only in semvers, they use caret ^ for versions, >>>>>>>>> oftem this behaviour brakes build. >>>>>>>>> Bower, npm don't have override or lock mechanism for fix this >>>>>>>>> behaviour. >>>>>>>>> Yarn try solve this problems, but many packages can't build(some >>>>>>>>> issues open more than year), now they have 783 open issues. >>>>>>>>> >>>>>>>>> I think need simple functionality: >>>>>>>>> npm.docs - open npmjs.com/package/[PACKAGE] >>>>>>>>> <http://npmjs.com/package/%5BPACKAGE%5D> >>>>>>>>> npm.info - print info >>>>>>>>> npm.outdated - print outdated packages >>>>>>>>> npm.search - search package >>>>>>>>> >>>>>>>>> May be good have many repos, and tools for manage npm repos. >>>>>>>>> And I think don't need functionality for publishes packages in npm >>>>>>>>> repo with mix. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "elixir-lang-core" group. >>>>>>>>> >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to [email protected]. >>>>>>>> >>>>>>>> >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/elixir-lang-core/f6fac075-949a-45d5-9781-4f8077fb364b%40googlegroups.com >>>>>>>>> >>>>>>>>> <https://groups.google.com/d/msgid/elixir-lang-core/f6fac075-949a-45d5-9781-4f8077fb364b%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>> . >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "elixir-lang-core" group. >>>>>>>> >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> >>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/elixir-lang-core/CAFsaqD_722qJj-YUoyo26sPLTSWaxX72X9sPJkoWzMZAu0%2BoWg%40mail.gmail.com >>>>>>>> >>>>>>>> <https://groups.google.com/d/msgid/elixir-lang-core/CAFsaqD_722qJj-YUoyo26sPLTSWaxX72X9sPJkoWzMZAu0%2BoWg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "elixir-lang-core" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> >>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/elixir-lang-core/21b8086b-a244-4343-9612-d2bab78fdef5%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/elixir-lang-core/21b8086b-a244-4343-9612-d2bab78fdef5%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "elixir-lang-core" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/elixir-lang-core/c0794d20-d8e3-4279-b876-652550ffbac7%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/elixir-lang-core/c0794d20-d8e3-4279-b876-652550ffbac7%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "elixir-lang-core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/60dd9df8-2eb7-46fa-ad29-0fd3f99db88b%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elixir-lang-core/60dd9df8-2eb7-46fa-ad29-0fd3f99db88b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Eric Meadows-Jönsson > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/49894d86-1bf5-43cd-9d92-90eddb0ff955%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
