Questions tagged [deprecated]

Deprecation is a status applied to software features or language terms to indicate that they should be avoided, typically because they have been superseded. Use this tag for questions about deprecated features or how to deprecate features yourself (e.g. using annotations).

In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded. Although deprecated features remain in the software, their use may raise warning messages recommending alternative practices, and deprecation may indicate that the feature will be removed in the future.

Features are deprecated—rather than immediately removed—in order to provide backward compatibility and give programmers who have used the feature time to bring their code into compliance with the new standard.

2508 questions
44
votes
5 answers

Gem.source_index is deprecated, use Specification. Should I re-install Gem or Rails?

I'm learning RoR on Ubuntu 11. Got the following message when I was trying to generate an app. Did I install something incorrectly? $ rails generate controller Pages home contact NOTE: Gem.source_index is deprecated, use Specification. It will be…
Kevin H
  • 599
  • 1
  • 5
  • 10
44
votes
6 answers

What is the clearest way to deprecate a package in Java?

I'm working on a new codebase and migrating the system to a new framework. There are a number of packages that I would like to deprecate, just to make it very clear to other developers that everything inside this package should not be used anymore…
Daniel Alexiuc
  • 13,078
  • 9
  • 58
  • 73
44
votes
3 answers

JasperReports 5.6: JRXlsExporter.setParameter is deprecated

I have this code to export a JasperReprot to XLS: JasperPrint jprint=JasperFillManager.fillReport(expRpg, null, new JRBeanCollectionDataSource(datalist)); JRXlsExporter exporter = new JRXlsExporter(); …
Tobia
  • 9,165
  • 28
  • 114
  • 219
43
votes
5 answers

How do I flag a function as being deprecated in an iOS Objective-C header file?

How do I flag a function as being deprecated in an iOS Objective-C header file? I'm guessing there's just some keyword I can stick after the function somewhere? I would like for a compiler warning to be generated should anyone try and use the…
Nick Cartwright
  • 8,334
  • 15
  • 45
  • 56
43
votes
2 answers

Replacement for "purpose" property of CLLocationManager

In iOS 6, the purpose property of CLLocationManager, to describe the reason for using location services (@property(copy, nonatomic) NSString *purpose) has been deprecated. What replacement, if any, is proposed by Apple?
Guillaume
  • 21,685
  • 6
  • 63
  • 95
42
votes
4 answers

org.hibernate.annotations.Entity deprecated in Hibernate 4?

I am attempting to update to Hibernate 4 and I am getting that org.hibernate.annotations.Entity is deprecated. None of the documentation however seems to indicate that this is the case. Anyone have any insight into…
MTR
  • 1,411
  • 4
  • 14
  • 23
42
votes
2 answers

Why were the case classes without a parameter list deprecated?

Why were the case classes without a parameter list deprecated from Scala? And why does compiler suggest to use () as parameter list instead? EDIT : Someone please answer my second question... :|
missingfaktor
  • 90,905
  • 62
  • 285
  • 365
41
votes
6 answers

How to deprecate a function in PHP?

At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass…
Milan Babuškov
  • 59,775
  • 49
  • 126
  • 179
40
votes
11 answers

Kubectl Export is deprecated . Any alternative

I'm looking for a way to export a yaml file from a deployed component but without the cluster specific information. kubectl get MYOBJECT --export -o yaml > my.yaml but since "export" is now deprecated (since 1.14 and should normally disappear in…
Bobbob601
  • 433
  • 1
  • 4
  • 6
40
votes
1 answer

Android MenuItemCompat.getActionView is Deprecated

I am implementing a SearchView like this: MenuItem search = menu.findItem(R.id.search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(search); But this gives me an inspection report 'getActionView(android.view.MenuItem)' is…
Kartik Shandilya
  • 3,796
  • 5
  • 24
  • 42
40
votes
3 answers

Why are classes inside Scala package objects dispreferred?

Starting with 2.10, -Xlint complains about classes defined inside of package objects. But why? Defining a class inside a package object should be exactly equivalent to defining the classes inside of a separate package with the same name, except a…
Urban Vagabond
  • 7,282
  • 3
  • 28
  • 31
39
votes
8 answers

Why can't I use strerror?

I'm porting some code to Windows, and the Microsoft compiler (Visual C++ 8) is telling me that strerror() is unsafe. Putting aside the annoyance factor in all the safe string stuff from Microsoft, I can actually see that some of the deprecated…
JamieH
  • 1,257
  • 3
  • 12
  • 19
38
votes
5 answers

How can I deprecate a C++ header?

I would like to deprecate a C++ header so that if someone includes it in their code, the compiler issues a warning. I know that I can deprecate individual symbols, for example, using C++14 [[deprecated]], but is there a similar thing for headers?…
herr_shamanskiy
  • 414
  • 4
  • 9
38
votes
2 answers

How to create a page header in Bootstrap 4?

Since the .page-header class has been deprecated in Bootstrap 4, how can someone create a page header with the same style as Bootstrap 3 .page-header class?
pgmank
  • 5,303
  • 5
  • 36
  • 52
38
votes
3 answers

An alternative for the deprecated __malloc_hook functionality of glibc

I am writing a memory profiler for C and for that am intercepting calls to the malloc, realloc and free functions via malloc_hooks. Unfortunately, these are deprecated because of their poor behavior in multi threaded environments. I could not find a…
Andreas Grapentin
  • 5,499
  • 4
  • 39
  • 57