| Author |
Message |
|
| Guest |
Posted: Sun Feb 28, 2010 9:10 am |
|
|
|
Guest
|
Hi,
is this a bug?
Erlang R13B01 (erts-5.7.2) [smp:2:2] [rq:2] [async-threads:0]
Eshell V5.7.2 (abort with ^G)
4> c('fm2.2').
fm2.2.beam: Module name 'fm2.2' does not match file name 'fm2.2'
error
5>
i have:
-module('fm2.2').
BR
Johan
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| rvirding |
Posted: Sun Feb 28, 2010 4:16 pm |
|
|
|
User
Joined: 30 Aug 2006
Posts: 452
Location: Stockholm, Sweden
|
My guess is that you are interacting with the experimental, and poorly
documented, package system which assumes things when it sees module
names with '.'. As far as I know there is no way to turn this off.
Someone else may know more about this. My only suggestion is to avoid
module names with a '.'.
Robert
On 28 February 2010 10:09, J K <jmakarlsson@yahoo.com> wrote:
> Hi,
> is this a bug?
>
> Erlang R13B01 (erts-5.7.2) [smp:2:2] [rq:2] [async-threads:0]
>
> Eshell V5.7.2 |
|
|
| Back to top |
|
| Guest |
Posted: Sun Feb 28, 2010 4:57 pm |
|
|
|
Guest
|
My opinion is that experimental stuff should be off by default.
I'm using "_" now.
I tried comma just for "fun":
254> c(fm2,2).
./fm2.erl:none: no such file or directory
error
255> compile:file(fm2,2.erl).
* 1: illegal expression
256> compile:file('fm2,2.erl').
{ok,'fm2,2'}
257>
Maybe something with the shell?
Johan
----- Original Message ----
From: Robert Virding <rvirding@gmail.com>
To: J K <jmakarlsson@yahoo.com>
Cc: Erlang Bugs <erlang-bugs@erlang.org>
Sent: Sun, February 28, 2010 5:15:36 PM
Subject: Re: [erlang-bugs] module name with .
My guess is that you are interacting with the experimental, and poorly
documented, package system which assumes things when it sees module
names with '.'. As far as I know there is no way to turn this off.
Someone else may know more about this. My only suggestion is to avoid
module names with a '.'.
Robert
On 28 February 2010 10:09, J K <jmakarlsson@yahoo.com> wrote:
> Hi,
> is this a bug?
>
> Erlang R13B01 (erts-5.7.2) [smp:2:2] [rq:2] [async-threads:0]
>
> Eshell V5.7.2 (abort with ^G)
>
> 4> c('fm2.2').
> fm2.2.beam: Module name 'fm2.2' does not match file name 'fm2.2'
> error
> 5>
>
> i have:
> -module('fm2.2').
>
> BR
> Johan
>
>
>
>
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>
>
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sun Feb 28, 2010 9:44 pm |
|
|
|
Guest
|
On Sun, Feb 28, 2010 at 5:57 PM, J K <jmakarlsson@yahoo.com> wrote:
> My opinion is that experimental stuff should be off by default.
>
> I'm using "_" now.
>
> I tried comma just for "fun":
>
> 254> c(fm2,2).
> ./fm2.erl:none: no such file or directory
> error
> 255> compile:file(fm2,2.erl).
> * 1: illegal expression
> 256> compile:file('fm2,2.erl').
> {ok,'fm2,2'}
> 257>
>
> Maybe something with the shell?
Try c('fm2,2').
It's just erlang syntax.
>
> Johan
>
>
> ----- Original Message ----
> From: Robert Virding <rvirding@gmail.com>
> To: J K <jmakarlsson@yahoo.com>
> Cc: Erlang Bugs <erlang-bugs@erlang.org>
> Sent: Sun, February 28, 2010 5:15:36 PM
> Subject: Re: [erlang-bugs] module name with .
>
> My guess is that you are interacting with the experimental, and poorly
> documented, package system which assumes things when it sees module
> names with '.'. As far as I know there is no way to turn this off.
> Someone else may know more about this. My only suggestion is to avoid
> module names with a '.'.
>
> Robert
>
> On 28 February 2010 10:09, J K <jmakarlsson@yahoo.com> wrote:
>> Hi,
>> is this a bug?
>>
>> Erlang R13B01 (erts-5.7.2) [smp:2:2] [rq:2] [async-threads:0]
>>
>> Eshell V5.7.2 |
|
|
| Back to top |
|
| Spectra |
Posted: Sun Feb 28, 2010 9:54 pm |
|
|
|
User
Joined: 08 Dec 2008
Posts: 56
Location: Australia
|
Actually, all these look pretty much as I'd expect:
J K wrote:
> I tried comma just for "fun":
>
> 254> c(fm2,2).
> ./fm2.erl:none: no such file or directory
> error
>
By putting a comma there you've passed two parameters to the 'c'
function. While the shell docs don't seem to mention it, a quick glance
at the source shows that there is indeed a c/2 where the second
parameter is the compilation options. So you're trying to compile a
module called 'fm2' with an option of 2 (which probably doesn't mean
anything, but the missing file is the first problem that is picked up).
> 255> compile:file(fm2,2.erl).
> * 1: illegal expression
>
Here, you've put a full stop/period in the middle of an expression
(prior to closing the parentheses). That's the character the ends
expressions, so of course it makes it illegal.
> 256> compile:file('fm2,2.erl').
> {ok,'fm2,2'}
>
And here, by correctly wrapping the whole term in single quotes to make
it an atom, the syntax becomes correct. The compile module seems to be
a little more permissive here than the docs suggest, allowing you to add
'.erl' to the module name and have it still work.
> Maybe something with the shell?
>
If by 'something with the shell' you mean 'the shell doing exactly what
it should', then yeah, I'd say there is indeed 'something with the shell'
B
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| rvirding |
Posted: Mon Mar 01, 2010 3:20 am |
|
|
|
User
Joined: 30 Aug 2006
Posts: 452
Location: Stockholm, Sweden
|
Ah, so there is documentation. But I must say it has been put in a
place where I would definitely not look for it, among the kernel
documentation, as it is not something you call.
And I think that as it is something experimental you should have to
turn it on to use it, it should not *always* be there. The two other
experimental features, parametrised modules and extends, are better in
this respect in that you actually have to explicitly do something to
get them.
There was another thread which discussed the existence of parametrised
modules and packages briefly appeared there as well (introduced by
me). And, as I stated there, I don't see the need for either of them.
Robert
On 28 February 2010 18:29, Richard Carlsson <carlsson.richard@gmail.com> wrote:
> Not that poorly documented (under kernel):
>
> |
|
|
| Back to top |
|
| Guest |
Posted: Tue Mar 02, 2010 12:07 am |
|
|
|
Guest
|
Well... hehe, I know... i must have had a blackout or something...
----- Original Message ----
From: Bernard Duggan <bernie@m5net.com>
To: J K <jmakarlsson@yahoo.com>
Cc: Erlang Bugs <erlang-bugs@erlang.org>
Sent: Sun, February 28, 2010 10:54:19 PM
Subject: Re: [erlang-bugs] module name with .
Actually, all these look pretty much as I'd expect:
J K wrote:
> I tried comma just for "fun":
>
> 254> c(fm2,2).
> ./fm2.erl:none: no such file or directory
> error
>
By putting a comma there you've passed two parameters to the 'c'
function. While the shell docs don't seem to mention it, a quick glance
at the source shows that there is indeed a c/2 where the second
parameter is the compilation options. So you're trying to compile a
module called 'fm2' with an option of 2 (which probably doesn't mean
anything, but the missing file is the first problem that is picked up).
> 255> compile:file(fm2,2.erl).
> * 1: illegal expression
>
Here, you've put a full stop/period in the middle of an expression
(prior to closing the parentheses). That's the character the ends
expressions, so of course it makes it illegal.
> 256> compile:file('fm2,2.erl').
> {ok,'fm2,2'}
>
And here, by correctly wrapping the whole term in single quotes to make
it an atom, the syntax becomes correct. The compile module seems to be
a little more permissive here than the docs suggest, allowing you to add
'.erl' to the module name and have it still work.
> Maybe something with the shell?
>
If by 'something with the shell' you mean 'the shell doing exactly what
it should', then yeah, I'd say there is indeed 'something with the shell'
B
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|