Questions tagged [requires]
32 questions
107
votes
7 answers
What's the difference between requires and requires transitive statements in Java 9?
What's the difference between requires and requires transitive module statements in module declaration?
For example:
module foo {
requires java.base;
requires transitive java.compiler;
}

Michał Szewczyk
- 7,540
- 8
- 35
- 47
19
votes
4 answers
How can I access a variable defined in a Ruby file I required in IRB?
The file welcome.rb contains:
welcome_message = "hi there"
But in IRB, I can't access the variable I just created:
require './welcome.rb'
puts welcome_message
# => undefined local variable or method `welcome_message' for main:Object
What is the…

BuddyJoe
- 69,735
- 114
- 291
- 466
10
votes
3 answers
How can I make an RPM depend on package a OR package b?
This seems like a simple question, but the docs don't seem to have anything to say on the subject. I would like to do something like Requires: vim or emacs but when I do that, I in fact depend on vim, or and emacs. What is the syntax for depending…

kdt
- 27,905
- 33
- 92
- 139
4
votes
1 answer
spring transaction management Propagation.REQUIRES_NEW not working
My Service Class.
@Service
@Transactional(value = "transactionManager", readOnly = true, propagation = Propagation.REQUIRED)
public class DeviceServiceImpl{
@Transactional(readOnly = false)
public void blockAllDevices(){
…

Dinesh Appuhami
- 710
- 1
- 11
- 24
4
votes
4 answers
Code Contracts and failure on private static readonly fields
I have a private static readonly field in my class:
public class MyClass
{
// ISSUE #1 -- requires unproven: path != null
private static readonly DirectoryInfo MyDirectory =
new DirectoryInfo(Settings.Default.MyDirectoryPath);
…

myermian
- 31,823
- 24
- 123
- 215
2
votes
2 answers
Why is rpmbuild not including a manual 'Requires' directive in the spec file?
I am creating rpms of various PHP extensions to be manually installed after PHP7, which itself I have built an rpm for (in this case the version is 7.1.4).
In my spec file for a particular extension (in this case gd) I have specified that PHP is a…

pathogenferry
- 41
- 3
2
votes
1 answer
How to find all referenced files in Ruby
I want to detect all the files a Ruby file directly references for documentation purposes. Reading the basic requires list is not complete because there are some files that are imported transitively and others that are imported but never used. For…

alexloh
- 1,606
- 2
- 15
- 29
1
vote
3 answers
how to change the 'Requires Android' version in the android market
I have published an app in the android market
Strangely, even though it uses google maps, in the market it says:
Requires Android:
1.0 and up
How can I change this without messing with the manifest file? is there a way?
I have been changing the…

Juan
- 111
- 1
- 7
1
vote
0 answers
Problem of Global symbol "$new_cat_id" requires explicit package name at merging3.pl
I want to run the merging3.pl. but alway have errors like this:
Global symbol "$new_cat_id" requires explicit package name at merging3.pl line 2
51.
Global symbol "$new_cat_id" requires explicit package name at merging3.pl line 2
65.
Execution of…

miaomiao
- 11
- 2
1
vote
1 answer
jigsaw "requires transitive" not working
Hi I currently have the problem that the "requires transitive" directive does not open the used module in my dependent module.
To get familiar with jigsaw I started to write a new application with spring and JDK 10. I got a module named "database"…

Goldfish
- 614
- 1
- 7
- 19
1
vote
0 answers
CMake/CPack: How to avoid adding dependencies to devel packages
In my current setup (C++ project under Mageia 5 built using cmake), the cpack commands below cause the construction of RPM packages with dependencies to devel packages which is unnecessary.
The _CPack_Packages/Linux/RPM/rpmbuild.out file contain the…

Kleag
- 642
- 7
- 14
1
vote
1 answer
Restrict app to be installed on android tablets and kindle devices only
Until now I was restricting my app to only run on tablets by having something like this in the manifest file:

Lalilalu
- 13
- 3
1
vote
0 answers
How do I clean up the requires clause in a Delphi Package
I have a project that contains a number of design time packages (for installing components into the IDE). Some of these packages have quite long requires clauses and I was wondering if there is a way to remove any packages listed there that are not…

Alister
- 6,527
- 4
- 46
- 70
1
vote
0 answers
JML can't catch a violated precondition
In my class Test I've an array of five int named a, and the method addOne(int index) that add one to the selected cell. I wrote in JML a simple precondition to control the index passed to the method. Then I try to violate this precondition calling…

MaleMale
- 11
- 2
1
vote
2 answers
WordPress Comment Image plugin doesn't save uploaded image when Apache Requires are used
I've got an Apache 2.4.7 box with a WordPress 4.1 installation and a plugin added which allows users to add images to comments on pages/posts (https://wordpress.org/plugins/comment-images/). The image upload feature isn't working when Require…

Charlie Anstey
- 11
- 3